render / rpms / libvirt

Forked from rpms/libvirt 9 months ago
Clone
b971b8
From 4658a565f5536002c3a65e942eed0d877cd1d070 Mon Sep 17 00:00:00 2001
b971b8
Message-Id: <4658a565f5536002c3a65e942eed0d877cd1d070@dist-git>
b971b8
From: Jiri Denemark <jdenemar@redhat.com>
b971b8
Date: Tue, 26 May 2020 10:58:56 +0200
b971b8
Subject: [PATCH] cpu_map: Add <decode> element to x86 CPU model definitions
b971b8
MIME-Version: 1.0
b971b8
Content-Type: text/plain; charset=UTF-8
b971b8
Content-Transfer-Encoding: 8bit
b971b8
b971b8
The element specifies whether a particular CPU model can be used when
b971b8
creating a CPU definition from raw CPUID/MSR data. The @host attribute
b971b8
determines whether the CPU model can be used (host='on') for creating
b971b8
CPU definition for host capabilities. Usability of the model for domain
b971b8
capabilities and host-model CPU definitions is controlled by the @guest
b971b8
attribute.
b971b8
b971b8
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
b971b8
Reviewed-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
b971b8
Tested-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
b971b8
(cherry picked from commit f4914045c2bff46b120c6c2af80066d24e48b609)
b971b8
b971b8
https://bugzilla.redhat.com/show_bug.cgi?id=1840008
b971b8
b971b8
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
b971b8
Message-Id: <3097db79eff1e45257ef12f891e8f9243bc8580f.1590483392.git.jdenemar@redhat.com>
b971b8
Reviewed-by: Ján Tomko <jtomko@redhat.com>
b971b8
---
b971b8
 src/cpu/cpu_x86.c                             | 43 +++++++++++++++++++
b971b8
 src/cpu_map/x86_486.xml                       |  1 +
b971b8
 src/cpu_map/x86_Broadwell-IBRS.xml            |  1 +
b971b8
 src/cpu_map/x86_Broadwell-noTSX-IBRS.xml      |  1 +
b971b8
 src/cpu_map/x86_Broadwell-noTSX.xml           |  1 +
b971b8
 src/cpu_map/x86_Broadwell.xml                 |  1 +
b971b8
 src/cpu_map/x86_Cascadelake-Server-noTSX.xml  |  1 +
b971b8
 src/cpu_map/x86_Cascadelake-Server.xml        |  1 +
b971b8
 src/cpu_map/x86_Conroe.xml                    |  1 +
b971b8
 src/cpu_map/x86_Dhyana.xml                    |  1 +
b971b8
 src/cpu_map/x86_EPYC-IBPB.xml                 |  1 +
b971b8
 src/cpu_map/x86_EPYC.xml                      |  1 +
b971b8
 src/cpu_map/x86_Haswell-IBRS.xml              |  1 +
b971b8
 src/cpu_map/x86_Haswell-noTSX-IBRS.xml        |  1 +
b971b8
 src/cpu_map/x86_Haswell-noTSX.xml             |  1 +
b971b8
 src/cpu_map/x86_Haswell.xml                   |  1 +
b971b8
 src/cpu_map/x86_Icelake-Client-noTSX.xml      |  1 +
b971b8
 src/cpu_map/x86_Icelake-Client.xml            |  1 +
b971b8
 src/cpu_map/x86_Icelake-Server-noTSX.xml      |  1 +
b971b8
 src/cpu_map/x86_Icelake-Server.xml            |  1 +
b971b8
 src/cpu_map/x86_IvyBridge-IBRS.xml            |  1 +
b971b8
 src/cpu_map/x86_IvyBridge.xml                 |  1 +
b971b8
 src/cpu_map/x86_Nehalem-IBRS.xml              |  1 +
b971b8
 src/cpu_map/x86_Nehalem.xml                   |  1 +
b971b8
 src/cpu_map/x86_Opteron_G1.xml                |  1 +
b971b8
 src/cpu_map/x86_Opteron_G2.xml                |  1 +
b971b8
 src/cpu_map/x86_Opteron_G3.xml                |  1 +
b971b8
 src/cpu_map/x86_Opteron_G4.xml                |  1 +
b971b8
 src/cpu_map/x86_Opteron_G5.xml                |  1 +
b971b8
 src/cpu_map/x86_Penryn.xml                    |  1 +
b971b8
 src/cpu_map/x86_SandyBridge-IBRS.xml          |  1 +
b971b8
 src/cpu_map/x86_SandyBridge.xml               |  1 +
b971b8
 src/cpu_map/x86_Skylake-Client-IBRS.xml       |  1 +
b971b8
 src/cpu_map/x86_Skylake-Client-noTSX-IBRS.xml |  1 +
b971b8
 src/cpu_map/x86_Skylake-Client.xml            |  1 +
b971b8
 src/cpu_map/x86_Skylake-Server-IBRS.xml       |  1 +
b971b8
 src/cpu_map/x86_Skylake-Server-noTSX-IBRS.xml |  1 +
b971b8
 src/cpu_map/x86_Skylake-Server.xml            |  1 +
b971b8
 src/cpu_map/x86_Westmere-IBRS.xml             |  1 +
b971b8
 src/cpu_map/x86_Westmere.xml                  |  1 +
b971b8
 src/cpu_map/x86_athlon.xml                    |  1 +
b971b8
 src/cpu_map/x86_core2duo.xml                  |  1 +
b971b8
 src/cpu_map/x86_coreduo.xml                   |  1 +
b971b8
 src/cpu_map/x86_cpu64-rhel5.xml               |  1 +
b971b8
 src/cpu_map/x86_cpu64-rhel6.xml               |  1 +
b971b8
 src/cpu_map/x86_kvm32.xml                     |  1 +
b971b8
 src/cpu_map/x86_kvm64.xml                     |  1 +
b971b8
 src/cpu_map/x86_n270.xml                      |  1 +
b971b8
 src/cpu_map/x86_pentium.xml                   |  1 +
b971b8
 src/cpu_map/x86_pentium2.xml                  |  1 +
b971b8
 src/cpu_map/x86_pentium3.xml                  |  1 +
b971b8
 src/cpu_map/x86_pentiumpro.xml                |  1 +
b971b8
 src/cpu_map/x86_phenom.xml                    |  1 +
b971b8
 src/cpu_map/x86_qemu32.xml                    |  1 +
b971b8
 src/cpu_map/x86_qemu64.xml                    |  1 +
b971b8
 55 files changed, 97 insertions(+)
b971b8
b971b8
diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c
b971b8
index 8c865bdaa4..7fbb4c9a6c 100644
b971b8
--- a/src/cpu/cpu_x86.c
b971b8
+++ b/src/cpu/cpu_x86.c
b971b8
@@ -125,6 +125,8 @@ typedef struct _virCPUx86Model virCPUx86Model;
b971b8
 typedef virCPUx86Model *virCPUx86ModelPtr;
b971b8
 struct _virCPUx86Model {
b971b8
     char *name;
b971b8
+    bool decodeHost;
b971b8
+    bool decodeGuest;
b971b8
     virCPUx86VendorPtr vendor;
b971b8
     size_t nsignatures;
b971b8
     uint32_t *signatures;
b971b8
@@ -1347,6 +1349,44 @@ x86ModelCompare(virCPUx86ModelPtr model1,
b971b8
 }
b971b8
 
b971b8
 
b971b8
+static int
b971b8
+x86ModelParseDecode(virCPUx86ModelPtr model,
b971b8
+                    xmlXPathContextPtr ctxt)
b971b8
+{
b971b8
+    g_autofree char *host = NULL;
b971b8
+    g_autofree char *guest = NULL;
b971b8
+    int val;
b971b8
+
b971b8
+    if ((host = virXPathString("string(./decode/@host)", ctxt)))
b971b8
+        val = virTristateSwitchTypeFromString(host);
b971b8
+    else
b971b8
+        val = VIR_TRISTATE_SWITCH_ABSENT;
b971b8
+
b971b8
+    if (val <= 0) {
b971b8
+        virReportError(VIR_ERR_INTERNAL_ERROR,
b971b8
+                       _("invalid or missing decode/host attribute in CPU model %s"),
b971b8
+                       model->name);
b971b8
+        return -1;
b971b8
+    }
b971b8
+    model->decodeHost = val == VIR_TRISTATE_SWITCH_ON;
b971b8
+
b971b8
+    if ((guest = virXPathString("string(./decode/@guest)", ctxt)))
b971b8
+        val = virTristateSwitchTypeFromString(guest);
b971b8
+    else
b971b8
+        val = VIR_TRISTATE_SWITCH_ABSENT;
b971b8
+
b971b8
+    if (val <= 0) {
b971b8
+        virReportError(VIR_ERR_INTERNAL_ERROR,
b971b8
+                       _("invalid or missing decode/guest attribute in CPU model %s"),
b971b8
+                       model->name);
b971b8
+        return -1;
b971b8
+    }
b971b8
+    model->decodeGuest = val == VIR_TRISTATE_SWITCH_ON;
b971b8
+
b971b8
+    return 0;
b971b8
+}
b971b8
+
b971b8
+
b971b8
 static int
b971b8
 x86ModelParseAncestor(virCPUx86ModelPtr model,
b971b8
                       xmlXPathContextPtr ctxt,
b971b8
@@ -1521,6 +1561,9 @@ x86ModelParse(xmlXPathContextPtr ctxt,
b971b8
 
b971b8
     model->name = g_strdup(name);
b971b8
 
b971b8
+    if (x86ModelParseDecode(model, ctxt) < 0)
b971b8
+        goto cleanup;
b971b8
+
b971b8
     if (x86ModelParseAncestor(model, ctxt, map) < 0)
b971b8
         goto cleanup;
b971b8
 
b971b8
diff --git a/src/cpu_map/x86_486.xml b/src/cpu_map/x86_486.xml
b971b8
index 61fa3797e8..d05b277392 100644
b971b8
--- a/src/cpu_map/x86_486.xml
b971b8
+++ b/src/cpu_map/x86_486.xml
b971b8
@@ -1,5 +1,6 @@
b971b8
 <cpus>
b971b8
   <model name='486'>
b971b8
+    <decode host='on' guest='on'/>
b971b8
     <feature name='fpu'/>
b971b8
     <feature name='pse'/>
b971b8
     <feature name='vme'/>
b971b8
diff --git a/src/cpu_map/x86_Broadwell-IBRS.xml b/src/cpu_map/x86_Broadwell-IBRS.xml
b971b8
index 4600cacec0..9033d5fcd5 100644
b971b8
--- a/src/cpu_map/x86_Broadwell-IBRS.xml
b971b8
+++ b/src/cpu_map/x86_Broadwell-IBRS.xml
b971b8
@@ -1,5 +1,6 @@
b971b8
 <cpus>
b971b8
   <model name='Broadwell-IBRS'>
b971b8
+    <decode host='on' guest='on'/>
b971b8
     <signature family='6' model='61'/> 
b971b8
     <signature family='6' model='71'/> 
b971b8
     <signature family='6' model='79'/> 
b971b8
diff --git a/src/cpu_map/x86_Broadwell-noTSX-IBRS.xml b/src/cpu_map/x86_Broadwell-noTSX-IBRS.xml
b971b8
index b3fc0b726a..c044b60e36 100644
b971b8
--- a/src/cpu_map/x86_Broadwell-noTSX-IBRS.xml
b971b8
+++ b/src/cpu_map/x86_Broadwell-noTSX-IBRS.xml
b971b8
@@ -1,5 +1,6 @@
b971b8
 <cpus>
b971b8
   <model name='Broadwell-noTSX-IBRS'>
b971b8
+    <decode host='on' guest='on'/>
b971b8
     <signature family='6' model='61'/> 
b971b8
     <signature family='6' model='71'/> 
b971b8
     <signature family='6' model='79'/> 
b971b8
diff --git a/src/cpu_map/x86_Broadwell-noTSX.xml b/src/cpu_map/x86_Broadwell-noTSX.xml
b971b8
index ad932d0853..637f29ba1c 100644
b971b8
--- a/src/cpu_map/x86_Broadwell-noTSX.xml
b971b8
+++ b/src/cpu_map/x86_Broadwell-noTSX.xml
b971b8
@@ -1,5 +1,6 @@
b971b8
 <cpus>
b971b8
   <model name='Broadwell-noTSX'>
b971b8
+    <decode host='on' guest='on'/>
b971b8
     <signature family='6' model='61'/> 
b971b8
     <signature family='6' model='71'/> 
b971b8
     <signature family='6' model='79'/> 
b971b8
diff --git a/src/cpu_map/x86_Broadwell.xml b/src/cpu_map/x86_Broadwell.xml
b971b8
index 6de9227322..82939a4509 100644
b971b8
--- a/src/cpu_map/x86_Broadwell.xml
b971b8
+++ b/src/cpu_map/x86_Broadwell.xml
b971b8
@@ -1,5 +1,6 @@
b971b8
 <cpus>
b971b8
   <model name='Broadwell'>
b971b8
+    <decode host='on' guest='on'/>
b971b8
     <signature family='6' model='61'/> 
b971b8
     <signature family='6' model='71'/> 
b971b8
     <signature family='6' model='79'/> 
b971b8
diff --git a/src/cpu_map/x86_Cascadelake-Server-noTSX.xml b/src/cpu_map/x86_Cascadelake-Server-noTSX.xml
b971b8
index d24415ebce..5adea664e9 100644
b971b8
--- a/src/cpu_map/x86_Cascadelake-Server-noTSX.xml
b971b8
+++ b/src/cpu_map/x86_Cascadelake-Server-noTSX.xml
b971b8
@@ -1,5 +1,6 @@
b971b8
 <cpus>
b971b8
   <model name='Cascadelake-Server-noTSX'>
b971b8
+    <decode host='on' guest='on'/>
b971b8
     <signature family='6' model='85'/> 
b971b8
     <vendor name='Intel'/>
b971b8
     <feature name='3dnowprefetch'/>
b971b8
diff --git a/src/cpu_map/x86_Cascadelake-Server.xml b/src/cpu_map/x86_Cascadelake-Server.xml
b971b8
index b69ac198b6..d7ec42f57e 100644
b971b8
--- a/src/cpu_map/x86_Cascadelake-Server.xml
b971b8
+++ b/src/cpu_map/x86_Cascadelake-Server.xml
b971b8
@@ -1,5 +1,6 @@
b971b8
 <cpus>
b971b8
   <model name='Cascadelake-Server'>
b971b8
+    <decode host='on' guest='on'/>
b971b8
     <signature family='6' model='85'/> 
b971b8
     <vendor name='Intel'/>
b971b8
     <feature name='3dnowprefetch'/>
b971b8
diff --git a/src/cpu_map/x86_Conroe.xml b/src/cpu_map/x86_Conroe.xml
b971b8
index 89fe0ad2cf..4cacee6142 100644
b971b8
--- a/src/cpu_map/x86_Conroe.xml
b971b8
+++ b/src/cpu_map/x86_Conroe.xml
b971b8
@@ -1,5 +1,6 @@
b971b8
 <cpus>
b971b8
   <model name='Conroe'>
b971b8
+    <decode host='on' guest='on'/>
b971b8
     <signature family='6' model='15'/> 
b971b8
     <signature family='6' model='22'/> 
b971b8
     <vendor name='Intel'/>
b971b8
diff --git a/src/cpu_map/x86_Dhyana.xml b/src/cpu_map/x86_Dhyana.xml
b971b8
index cbc8020a94..689daf8649 100644
b971b8
--- a/src/cpu_map/x86_Dhyana.xml
b971b8
+++ b/src/cpu_map/x86_Dhyana.xml
b971b8
@@ -1,5 +1,6 @@
b971b8
 <cpus>
b971b8
   <model name='Dhyana'>
b971b8
+    <decode host='on' guest='on'/>
b971b8
     <signature family='24' model='0'/> 
b971b8
     <vendor name='Hygon'/>
b971b8
     <feature name='3dnowprefetch'/>
b971b8
diff --git a/src/cpu_map/x86_EPYC-IBPB.xml b/src/cpu_map/x86_EPYC-IBPB.xml
b971b8
index 283697ebd1..983c5f4445 100644
b971b8
--- a/src/cpu_map/x86_EPYC-IBPB.xml
b971b8
+++ b/src/cpu_map/x86_EPYC-IBPB.xml
b971b8
@@ -1,5 +1,6 @@
b971b8
 <cpus>
b971b8
   <model name='EPYC-IBPB'>
b971b8
+    <decode host='on' guest='on'/>
b971b8
     <signature family='23' model='1'/> 
b971b8
     <vendor name='AMD'/>
b971b8
     <feature name='3dnowprefetch'/>
b971b8
diff --git a/src/cpu_map/x86_EPYC.xml b/src/cpu_map/x86_EPYC.xml
b971b8
index f0601392fd..3ebba9f4ed 100644
b971b8
--- a/src/cpu_map/x86_EPYC.xml
b971b8
+++ b/src/cpu_map/x86_EPYC.xml
b971b8
@@ -1,5 +1,6 @@
b971b8
 <cpus>
b971b8
   <model name='EPYC'>
b971b8
+    <decode host='on' guest='on'/>
b971b8
     <signature family='23' model='1'/> 
b971b8
     <vendor name='AMD'/>
b971b8
     <feature name='3dnowprefetch'/>
b971b8
diff --git a/src/cpu_map/x86_Haswell-IBRS.xml b/src/cpu_map/x86_Haswell-IBRS.xml
b971b8
index 4f86db838f..0ffe2bae0d 100644
b971b8
--- a/src/cpu_map/x86_Haswell-IBRS.xml
b971b8
+++ b/src/cpu_map/x86_Haswell-IBRS.xml
b971b8
@@ -1,5 +1,6 @@
b971b8
 <cpus>
b971b8
   <model name='Haswell-IBRS'>
b971b8
+    <decode host='on' guest='on'/>
b971b8
     <signature family='6' model='60'/> 
b971b8
     <signature family='6' model='63'/> 
b971b8
     <signature family='6' model='69'/> 
b971b8
diff --git a/src/cpu_map/x86_Haswell-noTSX-IBRS.xml b/src/cpu_map/x86_Haswell-noTSX-IBRS.xml
b971b8
index 47318be6d5..75d709c009 100644
b971b8
--- a/src/cpu_map/x86_Haswell-noTSX-IBRS.xml
b971b8
+++ b/src/cpu_map/x86_Haswell-noTSX-IBRS.xml
b971b8
@@ -1,5 +1,6 @@
b971b8
 <cpus>
b971b8
   <model name='Haswell-noTSX-IBRS'>
b971b8
+    <decode host='on' guest='on'/>
b971b8
     <signature family='6' model='60'/> 
b971b8
     <signature family='6' model='63'/> 
b971b8
     <signature family='6' model='69'/> 
b971b8
diff --git a/src/cpu_map/x86_Haswell-noTSX.xml b/src/cpu_map/x86_Haswell-noTSX.xml
b971b8
index efd10c47de..b0a0faa856 100644
b971b8
--- a/src/cpu_map/x86_Haswell-noTSX.xml
b971b8
+++ b/src/cpu_map/x86_Haswell-noTSX.xml
b971b8
@@ -1,5 +1,6 @@
b971b8
 <cpus>
b971b8
   <model name='Haswell-noTSX'>
b971b8
+    <decode host='on' guest='on'/>
b971b8
     <signature family='6' model='60'/> 
b971b8
     <signature family='6' model='63'/> 
b971b8
     <signature family='6' model='69'/> 
b971b8
diff --git a/src/cpu_map/x86_Haswell.xml b/src/cpu_map/x86_Haswell.xml
b971b8
index ac358d7967..ee16b30f19 100644
b971b8
--- a/src/cpu_map/x86_Haswell.xml
b971b8
+++ b/src/cpu_map/x86_Haswell.xml
b971b8
@@ -1,5 +1,6 @@
b971b8
 <cpus>
b971b8
   <model name='Haswell'>
b971b8
+    <decode host='on' guest='on'/>
b971b8
     <signature family='6' model='60'/> 
b971b8
     <signature family='6' model='63'/> 
b971b8
     <signature family='6' model='69'/> 
b971b8
diff --git a/src/cpu_map/x86_Icelake-Client-noTSX.xml b/src/cpu_map/x86_Icelake-Client-noTSX.xml
b971b8
index cd51881f40..540732af6f 100644
b971b8
--- a/src/cpu_map/x86_Icelake-Client-noTSX.xml
b971b8
+++ b/src/cpu_map/x86_Icelake-Client-noTSX.xml
b971b8
@@ -1,5 +1,6 @@
b971b8
 <cpus>
b971b8
   <model name='Icelake-Client-noTSX'>
b971b8
+    <decode host='on' guest='on'/>
b971b8
     <signature family='6' model='126'/> 
b971b8
     <vendor name='Intel'/>
b971b8
     <feature name='3dnowprefetch'/>
b971b8
diff --git a/src/cpu_map/x86_Icelake-Client.xml b/src/cpu_map/x86_Icelake-Client.xml
b971b8
index fbd53bbe11..5cf32e91fa 100644
b971b8
--- a/src/cpu_map/x86_Icelake-Client.xml
b971b8
+++ b/src/cpu_map/x86_Icelake-Client.xml
b971b8
@@ -1,5 +1,6 @@
b971b8
 <cpus>
b971b8
   <model name='Icelake-Client'>
b971b8
+    <decode host='on' guest='on'/>
b971b8
     <signature family='6' model='126'/> 
b971b8
     <vendor name='Intel'/>
b971b8
     <feature name='3dnowprefetch'/>
b971b8
diff --git a/src/cpu_map/x86_Icelake-Server-noTSX.xml b/src/cpu_map/x86_Icelake-Server-noTSX.xml
b971b8
index 538c656712..5a53da23c7 100644
b971b8
--- a/src/cpu_map/x86_Icelake-Server-noTSX.xml
b971b8
+++ b/src/cpu_map/x86_Icelake-Server-noTSX.xml
b971b8
@@ -1,5 +1,6 @@
b971b8
 <cpus>
b971b8
   <model name='Icelake-Server-noTSX'>
b971b8
+    <decode host='on' guest='on'/>
b971b8
     <signature family='6' model='134'/> 
b971b8
     <vendor name='Intel'/>
b971b8
     <feature name='3dnowprefetch'/>
b971b8
diff --git a/src/cpu_map/x86_Icelake-Server.xml b/src/cpu_map/x86_Icelake-Server.xml
b971b8
index a565371977..367ade7240 100644
b971b8
--- a/src/cpu_map/x86_Icelake-Server.xml
b971b8
+++ b/src/cpu_map/x86_Icelake-Server.xml
b971b8
@@ -1,5 +1,6 @@
b971b8
 <cpus>
b971b8
   <model name='Icelake-Server'>
b971b8
+    <decode host='on' guest='on'/>
b971b8
     <signature family='6' model='134'/> 
b971b8
     <vendor name='Intel'/>
b971b8
     <feature name='3dnowprefetch'/>
b971b8
diff --git a/src/cpu_map/x86_IvyBridge-IBRS.xml b/src/cpu_map/x86_IvyBridge-IBRS.xml
b971b8
index e0f2adfa82..430bc3232d 100644
b971b8
--- a/src/cpu_map/x86_IvyBridge-IBRS.xml
b971b8
+++ b/src/cpu_map/x86_IvyBridge-IBRS.xml
b971b8
@@ -1,5 +1,6 @@
b971b8
 <cpus>
b971b8
   <model name='IvyBridge-IBRS'>
b971b8
+    <decode host='on' guest='on'/>
b971b8
     <signature family='6' model='58'/> 
b971b8
     <signature family='6' model='62'/> 
b971b8
     <vendor name='Intel'/>
b971b8
diff --git a/src/cpu_map/x86_IvyBridge.xml b/src/cpu_map/x86_IvyBridge.xml
b971b8
index 16213dbc62..eaf5d02e82 100644
b971b8
--- a/src/cpu_map/x86_IvyBridge.xml
b971b8
+++ b/src/cpu_map/x86_IvyBridge.xml
b971b8
@@ -1,5 +1,6 @@
b971b8
 <cpus>
b971b8
   <model name='IvyBridge'>
b971b8
+    <decode host='on' guest='on'/>
b971b8
     <signature family='6' model='58'/> 
b971b8
     <signature family='6' model='62'/> 
b971b8
     <vendor name='Intel'/>
b971b8
diff --git a/src/cpu_map/x86_Nehalem-IBRS.xml b/src/cpu_map/x86_Nehalem-IBRS.xml
b971b8
index 8cc19eff03..00d0d2fe51 100644
b971b8
--- a/src/cpu_map/x86_Nehalem-IBRS.xml
b971b8
+++ b/src/cpu_map/x86_Nehalem-IBRS.xml
b971b8
@@ -1,5 +1,6 @@
b971b8
 <cpus>
b971b8
   <model name='Nehalem-IBRS'>
b971b8
+    <decode host='on' guest='on'/>
b971b8
     <signature family='6' model='26'/> 
b971b8
     <signature family='6' model='30'/> 
b971b8
     <signature family='6' model='31'/> 
b971b8
diff --git a/src/cpu_map/x86_Nehalem.xml b/src/cpu_map/x86_Nehalem.xml
b971b8
index 530e5e8a0d..9968001fe7 100644
b971b8
--- a/src/cpu_map/x86_Nehalem.xml
b971b8
+++ b/src/cpu_map/x86_Nehalem.xml
b971b8
@@ -1,5 +1,6 @@
b971b8
 <cpus>
b971b8
   <model name='Nehalem'>
b971b8
+    <decode host='on' guest='on'/>
b971b8
     <signature family='6' model='26'/> 
b971b8
     <signature family='6' model='30'/> 
b971b8
     <signature family='6' model='31'/> 
b971b8
diff --git a/src/cpu_map/x86_Opteron_G1.xml b/src/cpu_map/x86_Opteron_G1.xml
b971b8
index 73cf1de71e..57648ca93f 100644
b971b8
--- a/src/cpu_map/x86_Opteron_G1.xml
b971b8
+++ b/src/cpu_map/x86_Opteron_G1.xml
b971b8
@@ -1,5 +1,6 @@
b971b8
 <cpus>
b971b8
   <model name='Opteron_G1'>
b971b8
+    <decode host='on' guest='on'/>
b971b8
     <signature family='15' model='6'/> 
b971b8
     <vendor name='AMD'/>
b971b8
     <feature name='apic'/>
b971b8
diff --git a/src/cpu_map/x86_Opteron_G2.xml b/src/cpu_map/x86_Opteron_G2.xml
b971b8
index 342105730e..db961b0067 100644
b971b8
--- a/src/cpu_map/x86_Opteron_G2.xml
b971b8
+++ b/src/cpu_map/x86_Opteron_G2.xml
b971b8
@@ -1,5 +1,6 @@
b971b8
 <cpus>
b971b8
   <model name='Opteron_G2'>
b971b8
+    <decode host='on' guest='on'/>
b971b8
     <signature family='15' model='6'/> 
b971b8
     <vendor name='AMD'/>
b971b8
     <feature name='apic'/>
b971b8
diff --git a/src/cpu_map/x86_Opteron_G3.xml b/src/cpu_map/x86_Opteron_G3.xml
b971b8
index 7fbf8ac9e9..dab59d4f82 100644
b971b8
--- a/src/cpu_map/x86_Opteron_G3.xml
b971b8
+++ b/src/cpu_map/x86_Opteron_G3.xml
b971b8
@@ -1,5 +1,6 @@
b971b8
 <cpus>
b971b8
   <model name='Opteron_G3'>
b971b8
+    <decode host='on' guest='on'/>
b971b8
     <signature family='15' model='6'/> 
b971b8
     <vendor name='AMD'/>
b971b8
     <feature name='abm'/>
b971b8
diff --git a/src/cpu_map/x86_Opteron_G4.xml b/src/cpu_map/x86_Opteron_G4.xml
b971b8
index 463b3676a0..a7fc8d5828 100644
b971b8
--- a/src/cpu_map/x86_Opteron_G4.xml
b971b8
+++ b/src/cpu_map/x86_Opteron_G4.xml
b971b8
@@ -1,5 +1,6 @@
b971b8
 <cpus>
b971b8
   <model name='Opteron_G4'>
b971b8
+    <decode host='on' guest='on'/>
b971b8
     <signature family='21' model='1'/> 
b971b8
     <vendor name='AMD'/>
b971b8
     <feature name='3dnowprefetch'/>
b971b8
diff --git a/src/cpu_map/x86_Opteron_G5.xml b/src/cpu_map/x86_Opteron_G5.xml
b971b8
index 0f8fe32c87..ff775bdcef 100644
b971b8
--- a/src/cpu_map/x86_Opteron_G5.xml
b971b8
+++ b/src/cpu_map/x86_Opteron_G5.xml
b971b8
@@ -1,5 +1,6 @@
b971b8
 <cpus>
b971b8
   <model name='Opteron_G5'>
b971b8
+    <decode host='on' guest='on'/>
b971b8
     <signature family='21' model='2'/> 
b971b8
     <vendor name='AMD'/>
b971b8
     <feature name='3dnowprefetch'/>
b971b8
diff --git a/src/cpu_map/x86_Penryn.xml b/src/cpu_map/x86_Penryn.xml
b971b8
index 279bb05570..29d4cd635b 100644
b971b8
--- a/src/cpu_map/x86_Penryn.xml
b971b8
+++ b/src/cpu_map/x86_Penryn.xml
b971b8
@@ -1,5 +1,6 @@
b971b8
 <cpus>
b971b8
   <model name='Penryn'>
b971b8
+    <decode host='on' guest='on'/>
b971b8
     <signature family='6' model='23'/> 
b971b8
     <signature family='6' model='29'/> 
b971b8
     <vendor name='Intel'/>
b971b8
diff --git a/src/cpu_map/x86_SandyBridge-IBRS.xml b/src/cpu_map/x86_SandyBridge-IBRS.xml
b971b8
index 7d1342ec6f..fbdb4f2bf6 100644
b971b8
--- a/src/cpu_map/x86_SandyBridge-IBRS.xml
b971b8
+++ b/src/cpu_map/x86_SandyBridge-IBRS.xml
b971b8
@@ -1,5 +1,6 @@
b971b8
 <cpus>
b971b8
   <model name='SandyBridge-IBRS'>
b971b8
+    <decode host='on' guest='on'/>
b971b8
     <signature family='6' model='42'/> 
b971b8
     <signature family='6' model='45'/> 
b971b8
     <vendor name='Intel'/>
b971b8
diff --git a/src/cpu_map/x86_SandyBridge.xml b/src/cpu_map/x86_SandyBridge.xml
b971b8
index 48e4ac8082..7c85ed42df 100644
b971b8
--- a/src/cpu_map/x86_SandyBridge.xml
b971b8
+++ b/src/cpu_map/x86_SandyBridge.xml
b971b8
@@ -1,5 +1,6 @@
b971b8
 <cpus>
b971b8
   <model name='SandyBridge'>
b971b8
+    <decode host='on' guest='on'/>
b971b8
     <signature family='6' model='42'/> 
b971b8
     <signature family='6' model='45'/> 
b971b8
     <vendor name='Intel'/>
b971b8
diff --git a/src/cpu_map/x86_Skylake-Client-IBRS.xml b/src/cpu_map/x86_Skylake-Client-IBRS.xml
b971b8
index 4440313fc4..5709e7c2f9 100644
b971b8
--- a/src/cpu_map/x86_Skylake-Client-IBRS.xml
b971b8
+++ b/src/cpu_map/x86_Skylake-Client-IBRS.xml
b971b8
@@ -1,5 +1,6 @@
b971b8
 <cpus>
b971b8
   <model name='Skylake-Client-IBRS'>
b971b8
+    <decode host='on' guest='on'/>
b971b8
     <signature family='6' model='94'/> 
b971b8
     <signature family='6' model='78'/> 
b971b8
     
b971b8
diff --git a/src/cpu_map/x86_Skylake-Client-noTSX-IBRS.xml b/src/cpu_map/x86_Skylake-Client-noTSX-IBRS.xml
b971b8
index 3d2976692f..0c2f1e6ac4 100644
b971b8
--- a/src/cpu_map/x86_Skylake-Client-noTSX-IBRS.xml
b971b8
+++ b/src/cpu_map/x86_Skylake-Client-noTSX-IBRS.xml
b971b8
@@ -1,5 +1,6 @@
b971b8
 <cpus>
b971b8
   <model name='Skylake-Client-noTSX-IBRS'>
b971b8
+    <decode host='on' guest='on'/>
b971b8
     <signature family='6' model='94'/> 
b971b8
     <signature family='6' model='78'/> 
b971b8
     
b971b8
diff --git a/src/cpu_map/x86_Skylake-Client.xml b/src/cpu_map/x86_Skylake-Client.xml
b971b8
index 1053fa4a04..14cd57e176 100644
b971b8
--- a/src/cpu_map/x86_Skylake-Client.xml
b971b8
+++ b/src/cpu_map/x86_Skylake-Client.xml
b971b8
@@ -1,5 +1,6 @@
b971b8
 <cpus>
b971b8
   <model name='Skylake-Client'>
b971b8
+    <decode host='on' guest='on'/>
b971b8
     <signature family='6' model='94'/> 
b971b8
     <signature family='6' model='78'/> 
b971b8
     
b971b8
diff --git a/src/cpu_map/x86_Skylake-Server-IBRS.xml b/src/cpu_map/x86_Skylake-Server-IBRS.xml
b971b8
index 71179f9f74..bd6b6457ad 100644
b971b8
--- a/src/cpu_map/x86_Skylake-Server-IBRS.xml
b971b8
+++ b/src/cpu_map/x86_Skylake-Server-IBRS.xml
b971b8
@@ -1,5 +1,6 @@
b971b8
 <cpus>
b971b8
   <model name='Skylake-Server-IBRS'>
b971b8
+    <decode host='on' guest='on'/>
b971b8
     <signature family='6' model='85'/> 
b971b8
     <vendor name='Intel'/>
b971b8
     <feature name='3dnowprefetch'/>
b971b8
diff --git a/src/cpu_map/x86_Skylake-Server-noTSX-IBRS.xml b/src/cpu_map/x86_Skylake-Server-noTSX-IBRS.xml
b971b8
index 455a072119..91a206f575 100644
b971b8
--- a/src/cpu_map/x86_Skylake-Server-noTSX-IBRS.xml
b971b8
+++ b/src/cpu_map/x86_Skylake-Server-noTSX-IBRS.xml
b971b8
@@ -1,5 +1,6 @@
b971b8
 <cpus>
b971b8
   <model name='Skylake-Server-noTSX-IBRS'>
b971b8
+    <decode host='on' guest='on'/>
b971b8
     <signature family='6' model='85'/> 
b971b8
     <vendor name='Intel'/>
b971b8
     <feature name='3dnowprefetch'/>
b971b8
diff --git a/src/cpu_map/x86_Skylake-Server.xml b/src/cpu_map/x86_Skylake-Server.xml
b971b8
index 2da69e0dfc..f96875a85f 100644
b971b8
--- a/src/cpu_map/x86_Skylake-Server.xml
b971b8
+++ b/src/cpu_map/x86_Skylake-Server.xml
b971b8
@@ -1,5 +1,6 @@
b971b8
 <cpus>
b971b8
   <model name='Skylake-Server'>
b971b8
+    <decode host='on' guest='on'/>
b971b8
     <signature family='6' model='85'/> 
b971b8
     <vendor name='Intel'/>
b971b8
     <feature name='3dnowprefetch'/>
b971b8
diff --git a/src/cpu_map/x86_Westmere-IBRS.xml b/src/cpu_map/x86_Westmere-IBRS.xml
b971b8
index 3baf56f47a..c7898f0c22 100644
b971b8
--- a/src/cpu_map/x86_Westmere-IBRS.xml
b971b8
+++ b/src/cpu_map/x86_Westmere-IBRS.xml
b971b8
@@ -1,5 +1,6 @@
b971b8
 <cpus>
b971b8
   <model name='Westmere-IBRS'>
b971b8
+    <decode host='on' guest='on'/>
b971b8
     <signature family='6' model='44'/> 
b971b8
     <vendor name='Intel'/>
b971b8
     <feature name='aes'/>
b971b8
diff --git a/src/cpu_map/x86_Westmere.xml b/src/cpu_map/x86_Westmere.xml
b971b8
index 95c1d690c8..16e4ad6c30 100644
b971b8
--- a/src/cpu_map/x86_Westmere.xml
b971b8
+++ b/src/cpu_map/x86_Westmere.xml
b971b8
@@ -1,5 +1,6 @@
b971b8
 <cpus>
b971b8
   <model name='Westmere'>
b971b8
+    <decode host='on' guest='on'/>
b971b8
     <signature family='6' model='44'/> 
b971b8
     <signature family='6' model='47'/> 
b971b8
     <signature family='6' model='37'/> 
b971b8
diff --git a/src/cpu_map/x86_athlon.xml b/src/cpu_map/x86_athlon.xml
b971b8
index 0d44508e20..81c43c81e8 100644
b971b8
--- a/src/cpu_map/x86_athlon.xml
b971b8
+++ b/src/cpu_map/x86_athlon.xml
b971b8
@@ -1,5 +1,6 @@
b971b8
 <cpus>
b971b8
   <model name='athlon'>
b971b8
+    <decode host='on' guest='on'/>
b971b8
     <vendor name='AMD'/>
b971b8
     <feature name='3dnow'/>
b971b8
     <feature name='3dnowext'/>
b971b8
diff --git a/src/cpu_map/x86_core2duo.xml b/src/cpu_map/x86_core2duo.xml
b971b8
index 3c9a148f3c..412039fe55 100644
b971b8
--- a/src/cpu_map/x86_core2duo.xml
b971b8
+++ b/src/cpu_map/x86_core2duo.xml
b971b8
@@ -1,5 +1,6 @@
b971b8
 <cpus>
b971b8
   <model name='core2duo'>
b971b8
+    <decode host='on' guest='on'/>
b971b8
     <vendor name='Intel'/>
b971b8
     <feature name='apic'/>
b971b8
     <feature name='clflush'/>
b971b8
diff --git a/src/cpu_map/x86_coreduo.xml b/src/cpu_map/x86_coreduo.xml
b971b8
index 676e846920..e2fda9a1d4 100644
b971b8
--- a/src/cpu_map/x86_coreduo.xml
b971b8
+++ b/src/cpu_map/x86_coreduo.xml
b971b8
@@ -1,5 +1,6 @@
b971b8
 <cpus>
b971b8
   <model name='coreduo'>
b971b8
+    <decode host='on' guest='on'/>
b971b8
     <vendor name='Intel'/>
b971b8
     <feature name='apic'/>
b971b8
     <feature name='clflush'/>
b971b8
diff --git a/src/cpu_map/x86_cpu64-rhel5.xml b/src/cpu_map/x86_cpu64-rhel5.xml
b971b8
index 670a92f274..be6bcdb7a6 100644
b971b8
--- a/src/cpu_map/x86_cpu64-rhel5.xml
b971b8
+++ b/src/cpu_map/x86_cpu64-rhel5.xml
b971b8
@@ -1,5 +1,6 @@
b971b8
 <cpus>
b971b8
   <model name='cpu64-rhel5'>
b971b8
+    <decode host='on' guest='on'/>
b971b8
     <feature name='apic'/>
b971b8
     <feature name='clflush'/>
b971b8
     <feature name='cmov'/>
b971b8
diff --git a/src/cpu_map/x86_cpu64-rhel6.xml b/src/cpu_map/x86_cpu64-rhel6.xml
b971b8
index 3cae0f00c2..c62b1b5575 100644
b971b8
--- a/src/cpu_map/x86_cpu64-rhel6.xml
b971b8
+++ b/src/cpu_map/x86_cpu64-rhel6.xml
b971b8
@@ -1,5 +1,6 @@
b971b8
 <cpus>
b971b8
   <model name='cpu64-rhel6'>
b971b8
+    <decode host='on' guest='on'/>
b971b8
     <feature name='apic'/>
b971b8
     <feature name='clflush'/>
b971b8
     <feature name='cmov'/>
b971b8
diff --git a/src/cpu_map/x86_kvm32.xml b/src/cpu_map/x86_kvm32.xml
b971b8
index 5f08a5e7fc..9dd96d5b56 100644
b971b8
--- a/src/cpu_map/x86_kvm32.xml
b971b8
+++ b/src/cpu_map/x86_kvm32.xml
b971b8
@@ -1,5 +1,6 @@
b971b8
 <cpus>
b971b8
   <model name='kvm32'>
b971b8
+    <decode host='on' guest='on'/>
b971b8
     <feature name='apic'/>
b971b8
     <feature name='clflush'/>
b971b8
     <feature name='cmov'/>
b971b8
diff --git a/src/cpu_map/x86_kvm64.xml b/src/cpu_map/x86_kvm64.xml
b971b8
index 80b24e2a49..185af06f78 100644
b971b8
--- a/src/cpu_map/x86_kvm64.xml
b971b8
+++ b/src/cpu_map/x86_kvm64.xml
b971b8
@@ -1,5 +1,6 @@
b971b8
 <cpus>
b971b8
   <model name='kvm64'>
b971b8
+    <decode host='on' guest='on'/>
b971b8
     <feature name='apic'/>
b971b8
     <feature name='clflush'/>
b971b8
     <feature name='cmov'/>
b971b8
diff --git a/src/cpu_map/x86_n270.xml b/src/cpu_map/x86_n270.xml
b971b8
index cb359d968e..5507d2ea3b 100644
b971b8
--- a/src/cpu_map/x86_n270.xml
b971b8
+++ b/src/cpu_map/x86_n270.xml
b971b8
@@ -1,5 +1,6 @@
b971b8
 <cpus>
b971b8
   <model name='n270'>
b971b8
+    <decode host='on' guest='on'/>
b971b8
     <vendor name='Intel'/>
b971b8
     <feature name='apic'/>
b971b8
     <feature name='clflush'/>
b971b8
diff --git a/src/cpu_map/x86_pentium.xml b/src/cpu_map/x86_pentium.xml
b971b8
index d44c1399b0..f0a8982115 100644
b971b8
--- a/src/cpu_map/x86_pentium.xml
b971b8
+++ b/src/cpu_map/x86_pentium.xml
b971b8
@@ -1,5 +1,6 @@
b971b8
 <cpus>
b971b8
   <model name='pentium'>
b971b8
+    <decode host='on' guest='on'/>
b971b8
     <feature name='cx8'/>
b971b8
     <feature name='de'/>
b971b8
     <feature name='fpu'/>
b971b8
diff --git a/src/cpu_map/x86_pentium2.xml b/src/cpu_map/x86_pentium2.xml
b971b8
index 0d772bad2f..aeba082297 100644
b971b8
--- a/src/cpu_map/x86_pentium2.xml
b971b8
+++ b/src/cpu_map/x86_pentium2.xml
b971b8
@@ -1,5 +1,6 @@
b971b8
 <cpus>
b971b8
   <model name='pentium2'>
b971b8
+    <decode host='on' guest='on'/>
b971b8
     <feature name='cmov'/>
b971b8
     <feature name='cx8'/>
b971b8
     <feature name='de'/>
b971b8
diff --git a/src/cpu_map/x86_pentium3.xml b/src/cpu_map/x86_pentium3.xml
b971b8
index 24eb227c28..ab85d2967f 100644
b971b8
--- a/src/cpu_map/x86_pentium3.xml
b971b8
+++ b/src/cpu_map/x86_pentium3.xml
b971b8
@@ -1,5 +1,6 @@
b971b8
 <cpus>
b971b8
   <model name='pentium3'>
b971b8
+    <decode host='on' guest='on'/>
b971b8
     <feature name='cmov'/>
b971b8
     <feature name='cx8'/>
b971b8
     <feature name='de'/>
b971b8
diff --git a/src/cpu_map/x86_pentiumpro.xml b/src/cpu_map/x86_pentiumpro.xml
b971b8
index 9f7a610a87..b6e061187c 100644
b971b8
--- a/src/cpu_map/x86_pentiumpro.xml
b971b8
+++ b/src/cpu_map/x86_pentiumpro.xml
b971b8
@@ -1,5 +1,6 @@
b971b8
 <cpus>
b971b8
   <model name='pentiumpro'>
b971b8
+    <decode host='on' guest='on'/>
b971b8
     <feature name='apic'/>
b971b8
     <feature name='cmov'/>
b971b8
     <feature name='cx8'/>
b971b8
diff --git a/src/cpu_map/x86_phenom.xml b/src/cpu_map/x86_phenom.xml
b971b8
index 71f004057b..f0f8ece57a 100644
b971b8
--- a/src/cpu_map/x86_phenom.xml
b971b8
+++ b/src/cpu_map/x86_phenom.xml
b971b8
@@ -1,5 +1,6 @@
b971b8
 <cpus>
b971b8
   <model name='phenom'>
b971b8
+    <decode host='on' guest='on'/>
b971b8
     <vendor name='AMD'/>
b971b8
     <feature name='3dnow'/>
b971b8
     <feature name='3dnowext'/>
b971b8
diff --git a/src/cpu_map/x86_qemu32.xml b/src/cpu_map/x86_qemu32.xml
b971b8
index 3c9cdec981..f3fb1959be 100644
b971b8
--- a/src/cpu_map/x86_qemu32.xml
b971b8
+++ b/src/cpu_map/x86_qemu32.xml
b971b8
@@ -1,5 +1,6 @@
b971b8
 <cpus>
b971b8
   <model name='qemu32'>
b971b8
+    <decode host='on' guest='on'/>
b971b8
     <feature name='apic'/>
b971b8
     <feature name='cmov'/>
b971b8
     <feature name='cx8'/>
b971b8
diff --git a/src/cpu_map/x86_qemu64.xml b/src/cpu_map/x86_qemu64.xml
b971b8
index a8e8dfe58d..0fe207a2b4 100644
b971b8
--- a/src/cpu_map/x86_qemu64.xml
b971b8
+++ b/src/cpu_map/x86_qemu64.xml
b971b8
@@ -1,5 +1,6 @@
b971b8
 <cpus>
b971b8
   <model name='qemu64'>
b971b8
+    <decode host='on' guest='on'/>
b971b8
     
b971b8
          host does.  So we leave them out:
b971b8
 
b971b8
-- 
b971b8
2.26.2
b971b8