x86, 32bit, SMP, HYP: Remove unused vcpu.kernelSP

User context already has a kernelSP, which is used.

Also, the 64-bit also doesn't has this, so probably a leftover.

Signed-off-by: Indan Zupancic <indan@nul.nu>
This commit is contained in:
Indan Zupancic 2026-05-28 17:15:01 +01:00
parent 9d84967424
commit c6c84d7aef
2 changed files with 0 additions and 7 deletions

View file

@ -296,9 +296,6 @@ struct vcpu {
/* General purpose registers that we have to save and restore as they
* are not part of the vmcs */
word_t gp_registers[n_vcpu_gp_register];
#if defined(ENABLE_SMP_SUPPORT) && defined(CONFIG_ARCH_IA32)
word_t kernelSP;
#endif
/* TCB associated with this VCPU. */
struct tcb *vcpuTCB;

View file

@ -36,10 +36,6 @@ static void NORETURN restore_vmx(tcb_t *cur_thread, vcpu_t *vcpu)
/* Do not support breakpoints in VMs, so just disable all breakpoints */
loadAllDisabledBreakpointState(cur_thread);
#endif
#ifdef ENABLE_SMP_SUPPORT
NODE_STATE(vcpu->kernelSP = ((word_t)kernel_stack_alloc[getCurrentCPUIndex()]) + BIT(
CONFIG_KERNEL_STACK_BITS) - 4;
#endif /* ENABLE_SMP_SUPPORT */
if (vcpu->launched) {
/* attempt to do a vmresume */
asm volatile(