]> xenbits.xensource.com Git - xen.git/commitdiff
x86/gen-cpuid: Distinguish default vs max in feature annotations
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 25 Feb 2020 15:33:31 +0000 (15:33 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 15 May 2020 13:21:20 +0000 (14:21 +0100)
Allow lowercase a/s/h to be used to annotate a non-default feature.

However, until the toolstack migration logic is fixed, it is not safe to
activate yet.  Tolerate the annotations, but ignore them for now.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/include/public/arch-x86/cpufeatureset.h
xen/tools/gen-cpuid.py

index e2749245f334ac234c80e3ae286512e74c8a17eb..0ffab6c57bbcb552efeef32c83984f0878d3e51c 100644 (file)
@@ -87,6 +87,8 @@ enum {
  *   'A' = All guests.
  *   'S' = All HVM guests (not PV guests).
  *   'H' = HVM HAP guests (not PV or HVM Shadow guests).
+ *   Upper case => Available by default
+ *   Lower case => Can be opted-in to, but not available by default.
  */
 
 /* Intel-defined CPU features, CPUID level 0x00000001.edx, word 0 */
index af5610a5e6305695be921a34d9bfaeaa7b635be0..4ec73340de6133598b431bcd3ed8a9b3a92703b1 100755 (executable)
@@ -23,6 +23,7 @@ class State(object):
         self.raw = {
             '!': set(),
             'A': set(), 'S': set(), 'H': set(),
+            'a': set(), 's': set(), 'h': set(),
         }
 
         # State calculated
@@ -133,9 +134,13 @@ def crunch_numbers(state):
     state.hvm_shadow_def = state.pv_def | state.raw['S']
     state.hvm_hap_def = state.hvm_shadow_def | state.raw['H']
 
+    # TODO: Ignore def/max split until the toolstack migration logic is fixed
     state.pv_max = state.pv_def
     state.hvm_shadow_max = state.hvm_shadow_def
     state.hvm_hap_max = state.hvm_hap_def
+    # state.pv_max =                                state.raw['A'] | state.raw['a']
+    # state.hvm_shadow_max = state.pv_max         | state.raw['S'] | state.raw['s']
+    # state.hvm_hap_max =    state.hvm_shadow_max | state.raw['H'] | state.raw['h']
 
     #
     # Feature dependency information.