Re: [PATCH v5 00/13] KVM: selftests: Stress save+restore and #PF (ft. nested)

From: Sean Christopherson

Date: Fri Jul 31 2026 - 16:22:09 EST


On Tue, 28 Jul 2026 17:42:19 +0000, Yosry Ahmed wrote:
> Add a stress test for save+restore while the guest is triggering and
> handling #PFs, in both L1 and L2. The goal was to create a generic
> selftest that would catch bugs like the one fixed by commit 5c247d08bc81
> ("KVM: nSVM: Use vcpu->arch.cr2 when updating vmcb12 on nested
> #VMEXIT"), instead of relying on high-level testing (e.g. building GCC
> in L2) to catch it.
>
> [...]

Applied to kvm-x86 selftests, thanks!

[01/13] KVM: selftests: Use __stringify() instead of custom XSTR() macros
https://github.com/kvm-x86/linux/commit/9be54a82656c
[02/13] KVM: selftests: Fix RAX and RFLAGS VMCB offsets when running L2
https://github.com/kvm-x86/linux/commit/53f4ad49d76b
[03/13] KVM: selftests: Rework GPR registers switching for SVM (and fix offsets)
https://github.com/kvm-x86/linux/commit/546455d9c724
[04/13] KVM: selftests: Handle rflags save/restore for SVM in guest_regs
https://github.com/kvm-x86/linux/commit/9547309406d5
[05/13] KVM: selftests: Reuse GPR switching logic for nVMX
https://github.com/kvm-x86/linux/commit/3d31fea7b6d1
[06/13] KVM: selftests: Drop HORRIFIC_L2_UCALL_CLOBBER_HACK
https://github.com/kvm-x86/linux/commit/2bdef77c6019
[07/13] KVM: selftests: Add a blank line before logging assertion failures
https://github.com/kvm-x86/linux/commit/12f4d8b06a53
[08/13] KVM: selftests: Expose PTE masks to guests as part of an MMU
https://github.com/kvm-x86/linux/commit/e21d4dc0ca63
[09/13] KVM: selftests: Do not intercept #PF by default in nVMX tests
https://github.com/kvm-x86/linux/commit/7317f5b143aa
[10/13] KVM: selftests: Add basic stress test for save+restore and #PF handling
https://github.com/kvm-x86/linux/commit/d24dde74f72f
[11/13] KVM: selftests: Trigger save+restore randomly in the #PF stress test
https://github.com/kvm-x86/linux/commit/d99ad3c842f0
[12/13] KVM: selftests: Support running stress save+restore and #PF test in L2
https://github.com/kvm-x86/linux/commit/1494b3d17c95
[13/13] KVM: selftests: Trigger L2->L1 exits stress save+restore and #PF test
https://github.com/kvm-x86/linux/commit/583ad2052ddd

--
https://github.com/kvm-x86/linux/tree/next