summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorYosry Ahmed <yosry@kernel.org>2026-06-09 17:30:27 -0700
committerSean Christopherson <seanjc@google.com>2026-06-17 17:56:15 -0700
commit54adab32d3e0fc0605b4488cce51cce64a82f04d (patch)
tree9d759097c121ecd118ef44fa8f3d2eba4dc8b602 /include/linux
parent3280efa75cf799ff30dd8e32e0e713905d9362f0 (diff)
KVM: selftests: Allocate a dedicated guest page for x86 L2 guest stack
Instead of relying on the L1-provided stack for L2, which is usually an array on L1's own stack, allocate a dedicated page of VM memory for the L2 stack in vcpu_alloc_{vmx/svm}() and use that as L2's RSP in the VMCS/VMCB instead of the L1-provided value. Most L1 guest code does not do anything with the L2 stack other than stuff it in RSP, so this change is transparent and the L1-provided stack is silently ignored. The only exception is memstress nested L1 code which puts the vCPU index on L2's stack, so update this code to use the newly allocated stack. L1-provided stacks will be dropped and cleaned up separately. Suggested-by: Sean Christopherson <seanjc@google.com> Signed-off-by: Yosry Ahmed <yosry@kernel.org> Link: https://patch.msgid.link/20260610003030.2957261-3-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions