x86/cpuid: Handle leaf 0x80000009 in guest_cpuid()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 20 Jan 2017 13:41:47 +0000 (13:41 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 25 Jan 2017 10:26:23 +0000 (10:26 +0000)
Leaf 0x80000009 is reserved.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/cpuid.c

index b806cc5f07f97e97ad51e6f6e261e9375b9c4bac..f4c7b8bb15940a61aa227c6e22d4b56d02df33be 100644 (file)
@@ -206,6 +206,8 @@ static void recalculate_misc(struct cpuid_policy *p)
 
         p->extd.raw[0x8].a &= 0x0000ffff; /* GuestMaxPhysAddr hidden. */
         p->extd.raw[0x8].c &= 0x0003f0ff;
+
+        p->extd.raw[0x9] = EMPTY_LEAF;
         break;
     }
 }
@@ -712,7 +714,7 @@ static void pv_cpuid(uint32_t leaf, uint32_t subleaf, struct cpuid_leaf *res)
     case 0x2 ... 0x3:
     case 0x7 ... 0x9:
     case 0xc ... XSTATE_CPUID:
-    case 0x80000000 ... 0x80000008:
+    case 0x80000000 ... 0x80000009:
         ASSERT_UNREACHABLE();
         /* Now handled in guest_cpuid(). */
     }
@@ -808,7 +810,7 @@ static void hvm_cpuid(uint32_t leaf, uint32_t subleaf, struct cpuid_leaf *res)
     case 0x2 ... 0x3:
     case 0x7 ... 0x9:
     case 0xc ... XSTATE_CPUID:
-    case 0x80000000 ... 0x80000008:
+    case 0x80000000 ... 0x80000009:
         ASSERT_UNREACHABLE();
         /* Now handled in guest_cpuid(). */
     }
@@ -891,7 +893,7 @@ void guest_cpuid(const struct vcpu *v, uint32_t leaf,
         default:
             goto legacy;
 
-        case 0x80000000 ... 0x80000008:
+        case 0x80000000 ... 0x80000009:
             *res = p->extd.raw[leaf & 0xffff];
             break;
         }