Load KUT's actual GS.base on VM-Entry and VM-Exit so that the VMX tests can access per-cpu data. A future commit will track xAPIC vs. x2APIC ops on a per-cpu basis. Signed-off-by: Sean Christopherson <seanjc@xxxxxxxxxx> --- x86/vmx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x86/vmx.c b/x86/vmx.c index f4fbb94d..756deb38 100644 --- a/x86/vmx.c +++ b/x86/vmx.c @@ -1209,7 +1209,7 @@ static void init_vmcs_host(void) vmcs_write(HOST_BASE_GDTR, gdt_descr.base); vmcs_write(HOST_BASE_IDTR, idt_descr.base); vmcs_write(HOST_BASE_FS, 0); - vmcs_write(HOST_BASE_GS, 0); + vmcs_write(HOST_BASE_GS, rdmsr(MSR_GS_BASE)); /* Set other vmcs area */ vmcs_write(PF_ERROR_MASK, 0); @@ -1261,7 +1261,7 @@ static void init_vmcs_guest(void) vmcs_write(GUEST_BASE_SS, 0); vmcs_write(GUEST_BASE_DS, 0); vmcs_write(GUEST_BASE_FS, 0); - vmcs_write(GUEST_BASE_GS, 0); + vmcs_write(GUEST_BASE_GS, rdmsr(MSR_GS_BASE)); vmcs_write(GUEST_BASE_TR, get_gdt_entry_base(tss_descr)); vmcs_write(GUEST_BASE_LDTR, 0); -- 2.35.0.rc0.227.g00780c9af4-goog