mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
x86/hvm: Remove cross-vendor checks from MSR handlers.
Not a functional change now that cross-vendor guests are not launchable. Signed-off-by: Alejandro Vallejo <alejandro.garciavallejo@amd.com> Reviewed-by: Teddy Astie <teddy.astie@vates.tech> Acked-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
1 parent
e39e473188
commit
f2dc22e632
1 file changed
+3
-5
+3
-5
@@ -169,9 +169,9 @@ int guest_rdmsr(struct vcpu *v, uint32_t msr, uint64_t *val)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case MSR_IA32_PLATFORM_ID:
|
case MSR_IA32_PLATFORM_ID:
|
||||||
if ( !(cp->x86_vendor & X86_VENDOR_INTEL) ||
|
if ( boot_cpu_data.vendor != X86_VENDOR_INTEL )
|
||||||
!(boot_cpu_data.vendor & X86_VENDOR_INTEL) )
|
|
||||||
goto gp_fault;
|
goto gp_fault;
|
||||||
|
|
||||||
rdmsrl(MSR_IA32_PLATFORM_ID, *val);
|
rdmsrl(MSR_IA32_PLATFORM_ID, *val);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -189,9 +189,7 @@ int guest_rdmsr(struct vcpu *v, uint32_t msr, uint64_t *val)
|
|||||||
* from Xen's last microcode load, which can be forwarded straight to
|
* from Xen's last microcode load, which can be forwarded straight to
|
||||||
* the guest.
|
* the guest.
|
||||||
*/
|
*/
|
||||||
if ( !(cp->x86_vendor & (X86_VENDOR_INTEL | X86_VENDOR_AMD)) ||
|
if ( !(boot_cpu_data.vendor & (X86_VENDOR_INTEL | X86_VENDOR_AMD)) ||
|
||||||
!(boot_cpu_data.vendor &
|
|
||||||
(X86_VENDOR_INTEL | X86_VENDOR_AMD)) ||
|
|
||||||
rdmsr_safe(MSR_AMD_PATCHLEVEL, val) )
|
rdmsr_safe(MSR_AMD_PATCHLEVEL, val) )
|
||||||
goto gp_fault;
|
goto gp_fault;
|
||||||
break;
|
break;
|
||||||
|
|||||||