x86/cpuid: Remove the legacy path handling extd leaves
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 20 Jan 2017 13:58:44 +0000 (13:58 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 25 Jan 2017 10:26:29 +0000 (10:26 +0000)
All leaves in the extd union are handled in guest_cpuid() now, so remove
legacy handling.

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

index 97a3dd4473662d09a5c145efc74a90fdf5825654..e0a387ec706ab757a0520f88568358989515e802 100644 (file)
@@ -744,7 +744,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 ... 0x8000001c:
+    case 0x80000000 ... 0xffffffff:
         ASSERT_UNREACHABLE();
         /* Now handled in guest_cpuid(). */
     }
@@ -826,7 +826,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 ... 0x8000001c:
+    case 0x80000000 ... 0xffffffff:
         ASSERT_UNREACHABLE();
         /* Now handled in guest_cpuid(). */
     }
@@ -904,15 +904,7 @@ void guest_cpuid(const struct vcpu *v, uint32_t leaf,
                                      ARRAY_SIZE(p->extd.raw) - 1) )
             return;
 
-        switch ( leaf )
-        {
-        default:
-            goto legacy;
-
-        case 0x80000000 ... 0x8000001c:
-            *res = p->extd.raw[leaf & 0xffff];
-            break;
-        }
+        *res = p->extd.raw[leaf & 0xffff];
         break;
 
     default:
index 6cc23aa5a3332115278825f0b1155fdf02130a09..bc3fc7c80271775ed5b3958b0ec2589cf4d6df0e 100644 (file)
@@ -78,7 +78,7 @@ struct cpuid_policy
      * Global *_policy objects:
      *
      * - Guest accurate:
-     *   - All of the feat and xstate unions
+     *   - All of the feat, xstate and extd unions
      *   - max_{,sub}leaf
      *   - All FEATURESET_* words
      *   - Short vendor infomation
@@ -86,7 +86,7 @@ struct cpuid_policy
      * Per-domain objects:
      *
      * - Guest accurate:
-     *   - All of the feat and xstate unions
+     *   - All of the feat, xstate and extd unions
      *   - max_{,sub}leaf
      *   - All FEATURESET_* words
      *   - Short vendor infomation