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

[Xen-changelog] [xen master] x86/cpuid: Remove the legacy path handling extd leaves



commit 06348811b63e82f9aa0df4d4b44f1f7f2bb2418a
Author:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
AuthorDate: Fri Jan 20 13:58:44 2017 +0000
Commit:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Wed Jan 25 10:26:29 2017 +0000

    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>
    Reviewed-by: 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 97a3dd4..e0a387e 100644
--- a/xen/arch/x86/cpuid.c
+++ b/xen/arch/x86/cpuid.c
@@ -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:
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
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

 


Rackspace

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