Skip to content

KVM: PPC: Nested APIv2 : Performance improvements

Vaibhav Jain kvm kvm-ppc linuxppc-dev 1 version Applied

Status from this message: Applied to powerpc/topic/ppc-kvm.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest12 patches 10 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/12KVM: PPC: Book3S HV nestedv2: Invalidate RPT before deleting a guestarch/powerpc/include/asm/kvm_book3s.h arch/powerpc/kvm/book3s_hv.c arch/powerpc/kvm/book3s_hv_nested.c+6 -34 replies
2/12KVM: PPC: Book3S HV nestedv2: Avoid reloading the tb offsetarch/powerpc/include/asm/kvm_book3s.h+6 -30 replies
3/12KVM: PPC: Book3S HV nestedv2: Do not check msr on hcallsarch/powerpc/kvm/book3s_hv.c+2 -20 replies
4/12KVM: PPC: Book3S HV nestedv2: Get the PID only if needed to copy tofrom a guestarch/powerpc/kvm/book3s_64_mmu_radix.c+3 -10 replies
5/12KVM: PPC: Book3S HV nestedv2: Ensure LPCR_MER bit is passed to the L0arch/powerpc/kvm/book3s_hv.c+2 -00 replies
6/12KVM: PPC: Book3S HV: Handle pending exceptions on guest entry with MSR_EEarch/powerpc/kvm/book3s_hv.c+12 -60 replies
7/12KVM: PPC: Book3S HV nestedv2: Do not inject certain interruptsarch/powerpc/kvm/book3s.c+2 -20 replies
8/12KVM: PPC: Book3S HV nestedv2: Avoid msr check in kvmppc_handle_exit_hv()arch/powerpc/kvm/book3s_hv.c+1 -10 replies
9/12KVM: PPC: Book3S HV nestedv2: Do not call H_COPY_TOFROM_GUESTarch/powerpc/kvm/book3s_64_mmu_radix.c+3 -05 replies
10/12KVM: PPC: Book3S HV nestedv2: Register the VPA with the L0arch/powerpc/include/asm/kvm_book3s_64.h arch/powerpc/kvm/book3s_hv.c arch/powerpc/kvm/book3s_hv_nestedv2.c+59 -90 replies
11/12KVM: PPC: Reduce reliance on analyse_instr() in mmio emulationarch/powerpc/kvm/emulate_loadstore.c+10 -110 replies
12/12KVM: PPC: Book3S HV nestedv2: Do not cancel pending decrementer exceptionarch/powerpc/kvm/book3s_hv.c+1 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 00/12] KVM: PPC: Nested APIv2 : Performance improvements

From: vaibhav <[email protected]>

This patch series introduces series of performance improvements to recently added support for Nested APIv2 PPC64 Guests via [1]. Details for Nested APIv2 for PPC64 Guests is available in Documentation/powerpc/kvm-nested.rst.

This patch series introduces various optimizations for a Nested APIv2 guests namely:

* Reduce the number times L1 hypervisor requests for L2 state from L0.
* Register the L2 VPA with L1
* Optimizing interrupt delivery of some interrupt types.
* Optimize emulation of mmio loads/stores for L2 in L1.

The hcalls needed for testing these patches have been implemented in the spapr qemu model and is available at [2].

There are scripts available to assist in setting up an environment for testing nested guests at [3].

These patches are consequence of insights from on going performance engineering effort for improving performance of Nested APIv2 Guests. Special thanks goes to:
* Gautam Menghani
* Jordan Niethe
* Nicholas Piggin
* Vaidyanathan Srinivasan

Refs:
[1] https://lore.kernel.org/all/[email protected]
[2] https://github.com/planetharsh/qemu/tree/upstream-0714-kop
[3] https://github.com/iamjpn/kvm-powervm-test

Jordan Niethe (11):
KVM: PPC: Book3S HV nestedv2: Invalidate RPT before deleting a guest
KVM: PPC: Book3S HV nestedv2: Avoid reloading the tb offset
KVM: PPC: Book3S HV nestedv2: Do not check msr on hcalls
KVM: PPC: Book3S HV nestedv2: Get the PID only if needed to copy
tofrom a guest
KVM: PPC: Book3S HV nestedv2: Ensure LPCR_MER bit is passed to the L0
KVM: PPC: Book3S HV nestedv2: Do not inject certain interrupts
KVM: PPC: Book3S HV nestedv2: Avoid msr check in
kvmppc_handle_exit_hv()
KVM: PPC: Book3S HV nestedv2: Do not call H_COPY_TOFROM_GUEST
KVM: PPC: Book3S HV nestedv2: Register the VPA with the L0
KVM: PPC: Reduce reliance on analyse_instr() in mmio emulation
KVM: PPC: Book3S HV nestedv2: Do not cancel pending decrementer
exception

Nicholas Piggin (1):
KVM: PPC: Book3S HV: Handle pending exceptions on guest entry with
MSR_EE

 arch/powerpc/include/asm/kvm_book3s.h    | 10 +++-
 arch/powerpc/include/asm/kvm_book3s_64.h |  1 +
 arch/powerpc/kvm/book3s.c                |  4 +-
 arch/powerpc/kvm/book3s_64_mmu_radix.c   |  7 ++-
 arch/powerpc/kvm/book3s_hv.c             | 72 +++++++++++++++++-------
 arch/powerpc/kvm/book3s_hv_nested.c      |  2 +-
 arch/powerpc/kvm/book3s_hv_nestedv2.c    | 29 ++++++++++
 arch/powerpc/kvm/emulate_loadstore.c     | 21 ++++---
 8 files changed, 107 insertions(+), 39 deletions(-)
Signature · 1 line
2.42.0