While in principle it's possible to have a vendor virtualising another, this is fairly tricky in practice. Not doing so enables certain optimisations with regards to vendor checks in later patches.
Signed-off-by: Alejandro Vallejo <[email protected]> --- Patch 1 from the cross-vendor series. Do not merge here. It's simply for consistency. --- xen/lib/x86/policy.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xen/lib/x86/policy.c b/xen/lib/x86/policy.c index f033d22785..079c42a29b 100644 --- a/xen/lib/x86/policy.c +++ b/xen/lib/x86/policy.c @@ -15,7 +15,8 @@ int x86_cpu_policies_are_compatible(const struct cpu_policy *host, #define FAIL_MSR(m) \ do { e.msr = (m); goto out; } while ( 0 ) - if ( guest->basic.max_leaf > host->basic.max_leaf ) + if ( (guest->x86_vendor != host->x86_vendor) || + (guest->basic.max_leaf > host->basic.max_leaf) ) FAIL_CPUID(0, NA); if ( guest->feat.max_subleaf > host->feat.max_subleaf ) -- 2.43.0
