Skip to content

Commit a7b6fc7

Browse files
jsun26intelacrnsi
authored andcommitted
HV: allow write 0 to MSR_IA32_MCG_STATUS
Per SDM, writing 0 to MSR_IA32_MCG_STATUS is allowed, HV should not return -EACCES on this case; Tracked-On: #3454 Signed-off-by: Victor Sun <victor.sun@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
1 parent 3cf1daa commit a7b6fc7

File tree

1 file changed

+7
-1
lines changed
  • hypervisor/arch/x86/guest

1 file changed

+7
-1
lines changed

hypervisor/arch/x86/guest/vmsr.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,8 +635,14 @@ int32_t wrmsr_vmexit_handler(struct acrn_vcpu *vcpu)
635635
err = vlapic_set_apicbase(vcpu_vlapic(vcpu), v);
636636
break;
637637
}
638-
case MSR_IA32_MCG_CAP:
639638
case MSR_IA32_MCG_STATUS:
639+
{
640+
if (v != 0U) {
641+
err = -EACCES;
642+
}
643+
break;
644+
}
645+
case MSR_IA32_MCG_CAP:
640646
case MSR_IA32_FEATURE_CONTROL:
641647
case MSR_IA32_SGXLEPUBKEYHASH0:
642648
case MSR_IA32_SGXLEPUBKEYHASH1:

0 commit comments

Comments
 (0)