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

[Xen-devel] [PATCH v2 14/14] x86/cpuid: Remove the legacy path handling extd leaves



All leaves in the extd union are handled in guest_cpuid() now, so remove
legacy handling.

Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
CC: Jan Beulich <JBeulich@xxxxxxxx>
---
 xen/arch/x86/cpuid.c        | 14 +++-----------
 xen/include/asm-x86/cpuid.h |  4 ++--
 2 files changed, 5 insertions(+), 13 deletions(-)

diff --git a/xen/arch/x86/cpuid.c b/xen/arch/x86/cpuid.c
index 78cd287..d28735a 100644
--- a/xen/arch/x86/cpuid.c
+++ b/xen/arch/x86/cpuid.c
@@ -741,7 +741,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(). */
     }
@@ -823,7 +823,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(). */
     }
@@ -901,15 +901,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:
diff --git a/xen/include/asm-x86/cpuid.h b/xen/include/asm-x86/cpuid.h
index 6cc23aa..bc3fc7c 100644
--- a/xen/include/asm-x86/cpuid.h
+++ b/xen/include/asm-x86/cpuid.h
@@ -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
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

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