Skip to content

s390x/kvm: Properly detect page size of initial memory

David Hildenbrand qemu-devel 1 version Applied

Status from this message: Thanks, applied.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v3 Latest2 patches 5 repliesApplied

Changes in v3 from the cover letter

- Fix compile error
- Tested that hugepages correctly result in an error with "modprobe kvm hpage=0", but not with "modprobe kvm hpage=1".

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/2s390x/kvm: Configure page size after memory has actually been initializedhw/s390x/s390-virtio-ccw.c target/s390x/cpu.c target/s390x/cpu.h +3 more+39 -210 replies
2/2exec: Introduce qemu_maxrampagesize() and rename qemu_getrampagesize()exec.c hw/ppc/spapr_caps.c hw/s390x/s390-virtio-ccw.c +3 more+47 -103 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchIgor MammedovDavid Gibson
1/2A-b R-b
2/2R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [Qemu-devel] [PATCH v3 0/2] s390x/kvm: Properly detect page size of initial memory

While the detection on s390x of the maximum ram pagesize works by pure luck, we should try to do better. Especially, once "-mem-path" is replaced by memory backends, the current approach will break.

Configure the maximum page size after configuring initital memory. Provide a function to detect the maximum ram pagesize

I think this can be deferred to 4.1 as I don't think anything is actually broken right now.

v2 -> v3:
- Fix compile error
- Tested that hugepages correctly result in an error with "modprobe kvm hpage=0", but not with "modprobe kvm hpage=1".

v1 -> v2:
- Add a better comment describing that only initial memory is considered
- Add "exec: Introduce qemu_getmaxrampagesize() and rename qemu_getrampagesize()"

David Hildenbrand (2):
s390x/kvm: Configure page size after memory has actually been
initialized
exec: Introduce qemu_maxrampagesize() and rename qemu_getrampagesize()

 exec.c                     | 44 ++++++++++++++++++++++++++++++++++----
 hw/ppc/spapr_caps.c        |  4 ++--
 hw/s390x/s390-virtio-ccw.c | 12 +++++++++++
 hw/vfio/spapr.c            |  2 +-
 include/exec/ram_addr.h    |  3 ++-
 target/ppc/kvm.c           |  2 +-
 target/s390x/cpu.c         |  7 ++++++
 target/s390x/cpu.h         |  1 +
 target/s390x/kvm-stub.c    |  4 ++++
 target/s390x/kvm.c         | 35 ++++++++++++------------------
 target/s390x/kvm_s390x.h   |  1 +
 11 files changed, 85 insertions(+), 30 deletions(-)
Signature · 1 line
2.20.1