Skip to content

KVM: PPC: Misc fixes and nestedv2 vCPU limit fixes

Ritesh Harjani (IBM) kvm linuxppc-dev lkml 3 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest7 patches 0 repliesNew
  2. v27 patches 0 repliesSuperseded
  3. v1 RFC3 patches 0 repliesSuperseded

Changes in v3 from the cover letter

=========
- Fixed logic bug in patch-2 & patch-6. (realized after sending + sashiko caught this as well).

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7KVM: PPC: Book3S HV: Read EX_DSISR as a 32-bit field on guest exitarch/powerpc/kvm/book3s_hv_p9_entry.c+11 -20 replies
2/7KVM: PPC: Book3S: Don't call __ffs() on an empty pending_exceptions bitmaparch/powerpc/kvm/book3s.c+1 -10 replies
3/7KVM: PPC: BookE: Don't call __ffs() on an empty pending_exceptions bitmaparch/powerpc/kvm/booke.c+1 -10 replies
4/7KVM: PPC: Book3S HV nestedv2: cap max vcpus to PAPR limitarch/powerpc/include/asm/kvm_host.h arch/powerpc/kvm/powerpc.c+7 -00 replies
5/7KVM: PPC: Book3S HV nestedv2: reject vCPU ids beyond the PAPR limitarch/powerpc/kvm/powerpc.c+3 -00 replies
6/7KVM: PPC: Book3S HV: Fix error handling during vcore createarch/powerpc/kvm/book3s_hv.c+6 -40 replies
7/7KVM: PPC: Book3s: nestedv2: Free the guest state buffers if vcpu create failsarch/powerpc/kvm/book3s_hv.c+4 -10 replies

Reviews trailers per patch

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

Read the v3 thread

Cover letter [PATCHv3 0/7] KVM: PPC: Misc fixes and nestedv2 vCPU limit fixes

v2 -> v3:
=========
- Fixed logic bug in patch-2 & patch-6. (realized after sending + sashiko caught this as well).

RFC -> v2:
=========
- Addressed sashiko review comments
- added patch-3 to address similar __ffs(0) problem on booke
- fixed build issues in patch-4
- added patch-5 to reject vcpu ids beyond the PAPR limit
- Few more patches were added. Few of them were reported by Sashiko and few others were caught while doing vcpu create path code walkthrough

Most of these issues were identified while adding kvm powerpc selftests infrastructure support [1] (which is now merged upstream). Patch-1 and Patch-2 were identified while running the selftests on Qemu+TCG+powernv+BE, while Patch-4 can also be reproduced on a real pseries LPAR with nestedv2 capabilities.

[1]: https://lore.kernel.org/linuxppc-dev/179211526968.809012.4905747914183363587.b4-ty@b4/
[RFC]: https://lore.kernel.org/linuxppc-dev/[email protected]/

Ritesh Harjani (IBM) (7):
KVM: PPC: Book3S HV: Read EX_DSISR as a 32-bit field on guest exit
KVM: PPC: Book3S: Don't call __ffs() on an empty pending_exceptions bitmap
KVM: PPC: BookE: Don't call __ffs() on an empty pending_exceptions bitmap
KVM: PPC: Book3S HV nestedv2: cap max vcpus to PAPR limit
KVM: PPC: Book3S HV nestedv2: reject vCPU ids beyond the PAPR limit
KVM: PPC: Book3S HV: Fix error handling during vcore create
KVM: PPC: Book3s: nestedv2: Free the guest state buffers if vcpu create fails

 arch/powerpc/include/asm/kvm_host.h   |  1 +
 arch/powerpc/kvm/book3s.c             |  2 +-
 arch/powerpc/kvm/book3s_hv.c          | 15 ++++++++++-----
 arch/powerpc/kvm/book3s_hv_p9_entry.c | 13 +++++++++++--
 arch/powerpc/kvm/booke.c              |  2 +-
 arch/powerpc/kvm/powerpc.c            |  9 +++++++++
 6 files changed, 33 insertions(+), 9 deletions(-)

--
2.39.5