[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen master] x86/CPUID: also check leaf 7 max subleaf to be compatible



commit e6e85b662be9eab96f4cfc58e9945580cce8b2bb
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Tue Nov 10 14:40:09 2020 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Tue Nov 10 14:40:09 2020 +0100

    x86/CPUID: also check leaf 7 max subleaf to be compatible
    
    Just like is done for basic and extended major leaves.
    
    Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
    Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
 xen/lib/x86/policy.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/xen/lib/x86/policy.c b/xen/lib/x86/policy.c
index 4beca8767a..f6cea4e2f9 100644
--- a/xen/lib/x86/policy.c
+++ b/xen/lib/x86/policy.c
@@ -18,6 +18,9 @@ int x86_cpu_policies_are_compatible(const struct cpu_policy 
*host,
     if ( guest->cpuid->basic.max_leaf > host->cpuid->basic.max_leaf )
         FAIL_CPUID(0, NA);
 
+    if ( guest->cpuid->feat.max_subleaf > host->cpuid->feat.max_subleaf )
+        FAIL_CPUID(7, 0);
+
     if ( guest->cpuid->extd.max_leaf > host->cpuid->extd.max_leaf )
         FAIL_CPUID(0x80000000, NA);
 
--
generated by git-patchbot for /home/xen/git/xen.git#master



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.