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:
Alejandro Vallejo authored and Jan Beulich committed 2026-04-09 08:23:05 +02:00
1 parent e39e473188
commit f2dc22e632
1 file changed
+3 -5
+3 -5
View File
@@ -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;
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.