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

[PATCH 6/9] x86/gen-cpuid: Distinguish default vs max in feature annotations


  • To: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Mon, 15 Jun 2020 15:15:29 +0100
  • Authentication-results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Wei Liu <wl@xxxxxxx>, Paul Durrant <paul@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Jan Beulich <JBeulich@xxxxxxxx>, Ian Jackson <Ian.Jackson@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Mon, 15 Jun 2020 14:15:59 +0000
  • Ironport-sdr: VXRaQHLY4k7JjwaoxKNDHqKX0pr/aBzrF1Bbk363BgZ0pD1EnDAEaIUav89syhYzpOix2wEk6T fbU6En0io1tAXmylQSQ1n1Z/dSlK5n3ib3bJC1WrvAXEk5HMhUXXPrQnqrOQjEHLfcZ1JceZf3 ivBl5mCl4VuS5CVq+yoJ6j/iurALy7wXY9Yg13AqRvJPkDO+7A6Q15dkywCGG52h96VIhJXoWd r8I/n+eQT9C380AaKmhNNHTKMBa/TU5+FSxvGuADahUtSZoovtv4aEwA/kFkqo1lu1sNkL4WRM YAg=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

The toolstack logic can now correctly distinguish a clean boot from a
migrate/restore.

Allow lowercase a/s/h to be used to annotate a non-default feature.

Due to the emulator work prepared earlier in 4.14, this now allows VMs to
explicity opt in to the TSXLDTRK, MOVDIR{I,64B} and SERIALIZE instructions via
their xl.cfg file, rather than getting them as a matter of default.

Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
---
CC: Jan Beulich <JBeulich@xxxxxxxx>
CC: Wei Liu <wl@xxxxxxx>
CC: Roger Pau Monné <roger.pau@xxxxxxxxxx>
CC: Ian Jackson <Ian.Jackson@xxxxxxxxxx>
CC: Wei Liu <wl@xxxxxxx>
CC: Paul Durrant <paul@xxxxxxx>
---
 xen/tools/gen-cpuid.py | 18 +++++++-----------
 1 file changed, 7 insertions(+), 11 deletions(-)

diff --git a/xen/tools/gen-cpuid.py b/xen/tools/gen-cpuid.py
index 037954cfb8..ffd9529fdf 100755
--- a/xen/tools/gen-cpuid.py
+++ b/xen/tools/gen-cpuid.py
@@ -130,17 +130,13 @@ def crunch_numbers(state):
                  MTRR, PGE, MCA, CMOV, PAT, PSE36, MMX, FXSR)
     state.common_1d = common_1d
 
-    state.pv_def = state.raw['A']
-    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']
+    state.pv_def =                                state.raw['A']
+    state.hvm_shadow_def = state.pv_def         | state.raw['S']
+    state.hvm_hap_def =    state.hvm_shadow_def | state.raw['H']
+
+    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.
-- 
2.11.0




 


Rackspace

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