Skip to content

Selftest for pKVM ownership transitions

Quentin Perret kvmarm linux-arm-kernel lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest4 patches 1 replyIn review
  2. v24 patches 5 repliesSuperseded

Changes in v3 from the cover letter

- rebased on top of v2 of the hyp-state-in-vmemmap series [2];
- thanks to above rebase, dropped the PKVM_SELFTEST kconfig option and folded the selftest under the existing NVHE_EL2_DEBUG;
- fixed commit message of patch 02

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4KVM: arm64: Add .hyp.data sectionarch/arm64/include/asm/sections.h arch/arm64/kernel/image-vars.h arch/arm64/kernel/vmlinux.lds.S +4 more+32 -30 replies
2/4KVM: arm64: Don't WARN from __pkvm_host_share_guest()arch/arm64/kvm/hyp/nvhe/mem_protect.c+0 -10 replies
3/4KVM: arm64: Selftest for pKVM transitionsarch/arm64/kvm/hyp/include/nvhe/mem_protect.h arch/arm64/kvm/hyp/nvhe/mem_protect.c arch/arm64/kvm/hyp/nvhe/setup.c+119 -00 replies
4/4KVM: arm64: Extend pKVM selftest for np-guestsarch/arm64/include/asm/kvm_pkvm.h arch/arm64/kvm/hyp/include/nvhe/mem_protect.h arch/arm64/kvm/hyp/nvhe/mem_protect.c +2 more+104 -50 replies

Reviews trailers per patch

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

Read the v3 thread

Cover letter [PATCH v3 0/4] Selftest for pKVM ownership transitions

Hi all,

This is the v3 of the pKVM selftest series, v2 was here [1]. This series depends on [2] which moves the hyp tracking to the vmemmap. A full stack on top of v6.15-rc2 with everything applied is available here:

https://android-kvm.googlesource.com/linux qperret/pkvm-selftest-v3

Changes since v2:
- rebased on top of v2 of the hyp-state-in-vmemmap series [2];
- thanks to above rebase, dropped the PKVM_SELFTEST kconfig option and folded the selftest under the existing NVHE_EL2_DEBUG;
- fixed commit message of patch 02

Changes since v1:
- added support for testing NP guest transitions;
- added .data section in pKVM to allow using non-zero globals (needed for previous point);
- dropped superfluous WARN() from __pkvm_host_share_guest() which is a pain for testing;
- updated assertions for hyp/host transitions according to the discussion on v1.

[1] https://lore.kernel.org/kvmarm/[email protected]/
[2] https://lore.kernel.org/kvmarm/[email protected]/

Thanks,
Quentin

David Brazdil (1):
KVM: arm64: Add .hyp.data section

Quentin Perret (3):
KVM: arm64: Don't WARN from __pkvm_host_share_guest()
KVM: arm64: Selftest for pKVM transitions
KVM: arm64: Extend pKVM selftest for np-guests

 arch/arm64/include/asm/kvm_pkvm.h             |   6 +
 arch/arm64/include/asm/sections.h             |   1 +
 arch/arm64/kernel/image-vars.h                |   2 +
 arch/arm64/kernel/vmlinux.lds.S               |  18 +-
 arch/arm64/kvm/arm.c                          |   7 +
 arch/arm64/kvm/hyp/include/nvhe/mem_protect.h |   6 +
 arch/arm64/kvm/hyp/nvhe/hyp.lds.S             |   2 +
 arch/arm64/kvm/hyp/nvhe/mem_protect.c         | 198 +++++++++++++++++-
 arch/arm64/kvm/hyp/nvhe/setup.c               |  12 ++
 arch/arm64/kvm/pkvm.c                         |   2 +
 10 files changed, 250 insertions(+), 4 deletions(-)
Signature · 1 line
2.49.0.604.gff1f9ca942-goog