All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] hw/arm/virt: KVM: Set IPA limit when possible
@ 2021-03-10 13:52 Andrew Jones
  2021-03-10 13:52 ` [PATCH v2 1/2] accel: kvm: Fix kvm_type invocation Andrew Jones
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Andrew Jones @ 2021-03-10 13:52 UTC (permalink / raw)
  To: qemu-devel, qemu-arm; +Cc: pbonzini, maz, eric.auger, peter.maydell

This series fixes IPA limit setting for mach-virt KVM guests. The
first patch restores the setting of IPA limits for values greater
than 40 (the default) when necessary. The second patch ensures values
less than 40 may also be used. The default KVM type=0 (which means
an IPA limit of 40) is still used for legacy KVM, since it must be.

I tested this with a KVM that supports KVM_CAP_ARM_VM_IPA_SIZE and
with a KVM that does not. mach-virt's memory map didn't allow me
to test with less than 40 on the KVM_CAP_ARM_VM_IPA_SIZE supporting
host, but a quick VM fd opening test seemed to prove KVM would be
happy with that. Testing was done with a typical Linux guest and also
with kvm-unit-tests.

I caught the bug that the first patch fixes by instrumenting QEMU
to observe which IPA limit was getting selected, and then seeing
that QEMU wasn't actually running mach-virt's kvm_type method at
all!

Thanks,
drew


Andrew Jones (2):
  accel: kvm: Fix kvm_type invocation
  hw/arm/virt: KVM: The IPA lower bound is 32

 accel/kvm/kvm-all.c  |  2 ++
 hw/arm/virt.c        | 23 ++++++++++++++++-------
 include/hw/boards.h  |  1 +
 target/arm/kvm.c     |  4 +++-
 target/arm/kvm_arm.h |  6 ++++--
 5 files changed, 26 insertions(+), 10 deletions(-)

-- 
2.26.2



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-03-12 12:50 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-10 13:52 [PATCH v2 0/2] hw/arm/virt: KVM: Set IPA limit when possible Andrew Jones
2021-03-10 13:52 ` [PATCH v2 1/2] accel: kvm: Fix kvm_type invocation Andrew Jones
2021-03-10 14:19   ` Auger Eric
2021-03-10 13:52 ` [PATCH v2 2/2] hw/arm/virt: KVM: The IPA lower bound is 32 Andrew Jones
2021-03-10 14:58   ` Auger Eric
2021-03-11  9:59   ` Marc Zyngier
2021-03-12 12:47 ` [PATCH v2 0/2] hw/arm/virt: KVM: Set IPA limit when possible Peter Maydell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.