Skip to content

Commit be4f3b3

Browse files
calmisibonzini
authored andcommitted
KVM: x86: Keep MSR_IA32_XSS unchanged for INIT
It has been corrected from SDM version 075 that MSR_IA32_XSS is reset to zero on Power up and Reset but keeps unchanged on INIT. Fixes: a554d20 ("KVM: X86: Processor States following Reset or INIT") Cc: [email protected] Signed-off-by: Xiaoyao Li <[email protected]> Signed-off-by: Sean Christopherson <[email protected]> Message-Id: <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
1 parent 811f95f commit be4f3b3

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

arch/x86/kvm/x86.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11266,6 +11266,7 @@ void kvm_vcpu_reset(struct kvm_vcpu *vcpu, bool init_event)
1126611266
vcpu->arch.msr_misc_features_enables = 0;
1126711267

1126811268
vcpu->arch.xcr0 = XFEATURE_MASK_FP;
11269+
vcpu->arch.ia32_xss = 0;
1126911270
}
1127011271

1127111272
/* All GPRs except RDX (handled below) are zeroed on RESET/INIT. */
@@ -11282,8 +11283,6 @@ void kvm_vcpu_reset(struct kvm_vcpu *vcpu, bool init_event)
1128211283
cpuid_0x1 = kvm_find_cpuid_entry(vcpu, 1, 0);
1128311284
kvm_rdx_write(vcpu, cpuid_0x1 ? cpuid_0x1->eax : 0x600);
1128411285

11285-
vcpu->arch.ia32_xss = 0;
11286-
1128711286
static_call(kvm_x86_vcpu_reset)(vcpu, init_event);
1128811287

1128911288
kvm_set_rflags(vcpu, X86_EFLAGS_FIXED);

0 commit comments

Comments
 (0)