diff options
| author | Yosry Ahmed <yosry@kernel.org> | 2026-06-09 17:30:28 -0700 |
|---|---|---|
| committer | Sean Christopherson <seanjc@google.com> | 2026-06-17 17:56:15 -0700 |
| commit | 4c396f19de5d59b8993d9606b1e72d9a7def4e76 (patch) | |
| tree | 85512c0e6458ac9b86719e64e85fa791d95cee84 /tools/testing/selftests/kvm/x86/nested_vmsave_vmload_test.c | |
| parent | 54adab32d3e0fc0605b4488cce51cce64a82f04d (diff) | |
| download | linux-next-4c396f19de5d59b8993d9606b1e72d9a7def4e76.tar.gz linux-next-4c396f19de5d59b8993d9606b1e72d9a7def4e76.zip | |
KVM: selftests: Drop L1-provided stacks for L2 guests on x86
Now that a dedicated page is allocated for L2's stack and stuffed in
RSP, the L1-provided stack is unused. Drop the stacks allocated by L1
guest code for L2 in all x86 tests.
Suggested-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Yosry Ahmed <yosry@kernel.org>
Link: https://patch.msgid.link/20260610003030.2957261-4-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'tools/testing/selftests/kvm/x86/nested_vmsave_vmload_test.c')
| -rw-r--r-- | tools/testing/selftests/kvm/x86/nested_vmsave_vmload_test.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/tools/testing/selftests/kvm/x86/nested_vmsave_vmload_test.c b/tools/testing/selftests/kvm/x86/nested_vmsave_vmload_test.c index 85d3f4cc76f3..a130759f39a1 100644 --- a/tools/testing/selftests/kvm/x86/nested_vmsave_vmload_test.c +++ b/tools/testing/selftests/kvm/x86/nested_vmsave_vmload_test.c @@ -28,8 +28,6 @@ #define TEST_VMCB_L2_GPA TEST_VMCB_L1_GPA(0) -#define L2_GUEST_STACK_SIZE 64 - static void l2_guest_code_vmsave(void) { asm volatile("vmsave %0" : : "a"(TEST_VMCB_L2_GPA) : "memory"); @@ -70,10 +68,8 @@ static void l2_guest_code_vmcb1(void) static void l1_guest_code(struct svm_test_data *svm) { - unsigned long l2_guest_stack[L2_GUEST_STACK_SIZE]; - /* Each test case initializes the guest RIP below */ - generic_svm_setup(svm, NULL, &l2_guest_stack[L2_GUEST_STACK_SIZE]); + generic_svm_setup(svm, NULL); /* Set VMSAVE/VMLOAD intercepts and make sure they work with.. */ svm->vmcb->control.intercept |= (BIT_ULL(INTERCEPT_VMSAVE) | |
