From 59287d64100517e89dbd3a88af6fec4755ceab42 Mon Sep 17 00:00:00 2001 Message-Id: <59287d64100517e89dbd3a88af6fec4755ceab42@dist-git> From: Christian Ehrhardt Date: Tue, 26 May 2020 10:58:55 +0200 Subject: [PATCH] cpu_map: Add more -noTSX x86 CPU models MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit One of the mitigation methods for TAA[1] is to disable TSX support on the host system. Linux added a mechanism to disable TSX globally through the kernel command line, and many Linux distributions now default to tsx=off. This makes existing CPU models that have HLE and RTM enabled not usable anymore. Add new versions of all CPU models that have the HLE and RTM features enabled, that can be used when TSX is disabled in the host system. On systems disabling the features without those types defined in cpu-maps users end up without modern CPU types in the list of usable CPUs to use in the likes of virsh domcapabilities or tools higher in the stack like virt-manager. This adds: -Cascadelake-Server-noTSX -Icelake-Client-noTSX -Icelake-Server-noTSX -Skylake-Server-noTSX-IBRS -Skylake-Client-noTSX-IBRS Introduced in QEMU by commit v4.2.0-rc2-3-g9ab2237f19 (function) and commit v4.2.0-rc2-4-g02fa60d101 (names) References: [1] TAA, TSX asynchronous Abort: https://software.intel.com/security-software-guidance/insights/deep-dive-intel-transactional-synchronization-extensions-intel-tsx-asynchronous-abort https://www.kernel.org/doc/html/latest/admin-guide/hw-vuln/tsx_async_abort.html Fixes: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1853200 Signed-off-by: Christian Ehrhardt Message-Id: <20200310104806.2723-2-christian.ehrhardt@canonical.com> Reviewed-by: Jiri Denemark (cherry picked from commit dd17a4eba8618aeb0144f268f2222f65a85425fc) https://bugzilla.redhat.com/show_bug.cgi?id=1840008 Signed-off-by: Jiri Denemark Message-Id: Reviewed-by: Ján Tomko --- src/cpu_map/Makefile.inc.am | 5 ++ src/cpu_map/index.xml | 5 ++ src/cpu_map/x86_Cascadelake-Server-noTSX.xml | 78 ++++++++++++++++ src/cpu_map/x86_Icelake-Client-noTSX.xml | 81 +++++++++++++++++ src/cpu_map/x86_Icelake-Server-noTSX.xml | 90 +++++++++++++++++++ src/cpu_map/x86_Skylake-Client-noTSX-IBRS.xml | 73 +++++++++++++++ src/cpu_map/x86_Skylake-Server-noTSX-IBRS.xml | 75 ++++++++++++++++ .../x86_64-cpuid-Core-i7-8550U-guest.xml | 4 +- .../x86_64-cpuid-Core-i7-8550U-host.xml | 11 +-- .../x86_64-cpuid-Core-i7-8550U-json.xml | 4 +- .../domaincapsdata/qemu_4.2.0-q35.x86_64.xml | 5 ++ .../domaincapsdata/qemu_4.2.0-tcg.x86_64.xml | 5 ++ tests/domaincapsdata/qemu_4.2.0.x86_64.xml | 5 ++ .../domaincapsdata/qemu_5.0.0-q35.x86_64.xml | 5 ++ .../domaincapsdata/qemu_5.0.0-tcg.x86_64.xml | 5 ++ tests/domaincapsdata/qemu_5.0.0.x86_64.xml | 5 ++ 16 files changed, 440 insertions(+), 16 deletions(-) create mode 100644 src/cpu_map/x86_Cascadelake-Server-noTSX.xml create mode 100644 src/cpu_map/x86_Icelake-Client-noTSX.xml create mode 100644 src/cpu_map/x86_Icelake-Server-noTSX.xml create mode 100644 src/cpu_map/x86_Skylake-Client-noTSX-IBRS.xml create mode 100644 src/cpu_map/x86_Skylake-Server-noTSX-IBRS.xml diff --git a/src/cpu_map/Makefile.inc.am b/src/cpu_map/Makefile.inc.am index e935178304..be64c9a0d4 100644 --- a/src/cpu_map/Makefile.inc.am +++ b/src/cpu_map/Makefile.inc.am @@ -20,6 +20,7 @@ cpumap_DATA = \ cpu_map/x86_Broadwell-noTSX.xml \ cpu_map/x86_Broadwell-noTSX-IBRS.xml \ cpu_map/x86_Cascadelake-Server.xml \ + cpu_map/x86_Cascadelake-Server-noTSX.xml \ cpu_map/x86_Conroe.xml \ cpu_map/x86_core2duo.xml \ cpu_map/x86_coreduo.xml \ @@ -33,7 +34,9 @@ cpumap_DATA = \ cpu_map/x86_Haswell-noTSX.xml \ cpu_map/x86_Haswell-noTSX-IBRS.xml \ cpu_map/x86_Icelake-Client.xml \ + cpu_map/x86_Icelake-Client-noTSX.xml \ cpu_map/x86_Icelake-Server.xml \ + cpu_map/x86_Icelake-Server-noTSX.xml \ cpu_map/x86_IvyBridge.xml \ cpu_map/x86_IvyBridge-IBRS.xml \ cpu_map/x86_kvm32.xml \ @@ -58,8 +61,10 @@ cpumap_DATA = \ cpu_map/x86_SandyBridge-IBRS.xml \ cpu_map/x86_Skylake-Client.xml \ cpu_map/x86_Skylake-Client-IBRS.xml \ + cpu_map/x86_Skylake-Client-noTSX-IBRS.xml \ cpu_map/x86_Skylake-Server.xml \ cpu_map/x86_Skylake-Server-IBRS.xml \ + cpu_map/x86_Skylake-Server-noTSX-IBRS.xml \ cpu_map/x86_Westmere.xml \ cpu_map/x86_Westmere-IBRS.xml \ $(NULL) diff --git a/src/cpu_map/index.xml b/src/cpu_map/index.xml index ffb2f6fe1b..50b030de29 100644 --- a/src/cpu_map/index.xml +++ b/src/cpu_map/index.xml @@ -44,11 +44,16 @@ + + + + + diff --git a/src/cpu_map/x86_Cascadelake-Server-noTSX.xml b/src/cpu_map/x86_Cascadelake-Server-noTSX.xml new file mode 100644 index 0000000000..d24415ebce --- /dev/null +++ b/src/cpu_map/x86_Cascadelake-Server-noTSX.xml @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/cpu_map/x86_Icelake-Client-noTSX.xml b/src/cpu_map/x86_Icelake-Client-noTSX.xml new file mode 100644 index 0000000000..cd51881f40 --- /dev/null +++ b/src/cpu_map/x86_Icelake-Client-noTSX.xml @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/cpu_map/x86_Icelake-Server-noTSX.xml b/src/cpu_map/x86_Icelake-Server-noTSX.xml new file mode 100644 index 0000000000..538c656712 --- /dev/null +++ b/src/cpu_map/x86_Icelake-Server-noTSX.xml @@ -0,0 +1,90 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/cpu_map/x86_Skylake-Client-noTSX-IBRS.xml b/src/cpu_map/x86_Skylake-Client-noTSX-IBRS.xml new file mode 100644 index 0000000000..3d2976692f --- /dev/null +++ b/src/cpu_map/x86_Skylake-Client-noTSX-IBRS.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/cpu_map/x86_Skylake-Server-noTSX-IBRS.xml b/src/cpu_map/x86_Skylake-Server-noTSX-IBRS.xml new file mode 100644 index 0000000000..455a072119 --- /dev/null +++ b/src/cpu_map/x86_Skylake-Server-noTSX-IBRS.xml @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/cputestdata/x86_64-cpuid-Core-i7-8550U-guest.xml b/tests/cputestdata/x86_64-cpuid-Core-i7-8550U-guest.xml index 92404e4d03..e03c4a06ba 100644 --- a/tests/cputestdata/x86_64-cpuid-Core-i7-8550U-guest.xml +++ b/tests/cputestdata/x86_64-cpuid-Core-i7-8550U-guest.xml @@ -1,5 +1,5 @@ - Skylake-Client-IBRS + Skylake-Client-noTSX-IBRS Intel @@ -26,6 +26,4 @@ - - diff --git a/tests/cputestdata/x86_64-cpuid-Core-i7-8550U-host.xml b/tests/cputestdata/x86_64-cpuid-Core-i7-8550U-host.xml index 808a8ff969..7f6fe2eac3 100644 --- a/tests/cputestdata/x86_64-cpuid-Core-i7-8550U-host.xml +++ b/tests/cputestdata/x86_64-cpuid-Core-i7-8550U-host.xml @@ -1,8 +1,7 @@ x86_64 - Broadwell-noTSX-IBRS + Skylake-Client-noTSX-IBRS Intel - @@ -18,22 +17,14 @@ - - - - - - - - diff --git a/tests/cputestdata/x86_64-cpuid-Core-i7-8550U-json.xml b/tests/cputestdata/x86_64-cpuid-Core-i7-8550U-json.xml index 645c0934c2..3d8e6775bf 100644 --- a/tests/cputestdata/x86_64-cpuid-Core-i7-8550U-json.xml +++ b/tests/cputestdata/x86_64-cpuid-Core-i7-8550U-json.xml @@ -1,5 +1,5 @@ - Skylake-Client-IBRS + Skylake-Client-noTSX-IBRS Intel @@ -14,6 +14,4 @@ - - diff --git a/tests/domaincapsdata/qemu_4.2.0-q35.x86_64.xml b/tests/domaincapsdata/qemu_4.2.0-q35.x86_64.xml index c4c6bfb564..e257657981 100644 --- a/tests/domaincapsdata/qemu_4.2.0-q35.x86_64.xml +++ b/tests/domaincapsdata/qemu_4.2.0-q35.x86_64.xml @@ -63,8 +63,10 @@ athlon Westmere-IBRS Westmere + Skylake-Server-noTSX-IBRS Skylake-Server-IBRS Skylake-Server + Skylake-Client-noTSX-IBRS Skylake-Client-IBRS Skylake-Client SandyBridge-IBRS @@ -79,7 +81,9 @@ Nehalem IvyBridge-IBRS IvyBridge + Icelake-Server-noTSX Icelake-Server + Icelake-Client-noTSX Icelake-Client Haswell-noTSX-IBRS Haswell-noTSX @@ -89,6 +93,7 @@ EPYC Dhyana Conroe + Cascadelake-Server-noTSX Cascadelake-Server Broadwell-noTSX-IBRS Broadwell-noTSX diff --git a/tests/domaincapsdata/qemu_4.2.0-tcg.x86_64.xml b/tests/domaincapsdata/qemu_4.2.0-tcg.x86_64.xml index a7f8d9c5ee..c762b0b600 100644 --- a/tests/domaincapsdata/qemu_4.2.0-tcg.x86_64.xml +++ b/tests/domaincapsdata/qemu_4.2.0-tcg.x86_64.xml @@ -73,8 +73,10 @@ athlon Westmere-IBRS Westmere + Skylake-Server-noTSX-IBRS Skylake-Server-IBRS Skylake-Server + Skylake-Client-noTSX-IBRS Skylake-Client-IBRS Skylake-Client SandyBridge-IBRS @@ -89,7 +91,9 @@ Nehalem IvyBridge-IBRS IvyBridge + Icelake-Server-noTSX Icelake-Server + Icelake-Client-noTSX Icelake-Client Haswell-noTSX-IBRS Haswell-noTSX @@ -99,6 +103,7 @@ EPYC Dhyana Conroe + Cascadelake-Server-noTSX Cascadelake-Server Broadwell-noTSX-IBRS Broadwell-noTSX diff --git a/tests/domaincapsdata/qemu_4.2.0.x86_64.xml b/tests/domaincapsdata/qemu_4.2.0.x86_64.xml index f0e0f182a4..2918ba9715 100644 --- a/tests/domaincapsdata/qemu_4.2.0.x86_64.xml +++ b/tests/domaincapsdata/qemu_4.2.0.x86_64.xml @@ -62,8 +62,10 @@ athlon Westmere-IBRS Westmere + Skylake-Server-noTSX-IBRS Skylake-Server-IBRS Skylake-Server + Skylake-Client-noTSX-IBRS Skylake-Client-IBRS Skylake-Client SandyBridge-IBRS @@ -78,7 +80,9 @@ Nehalem IvyBridge-IBRS IvyBridge + Icelake-Server-noTSX Icelake-Server + Icelake-Client-noTSX Icelake-Client Haswell-noTSX-IBRS Haswell-noTSX @@ -88,6 +92,7 @@ EPYC Dhyana Conroe + Cascadelake-Server-noTSX Cascadelake-Server Broadwell-noTSX-IBRS Broadwell-noTSX diff --git a/tests/domaincapsdata/qemu_5.0.0-q35.x86_64.xml b/tests/domaincapsdata/qemu_5.0.0-q35.x86_64.xml index b635d573ef..7b2a929738 100644 --- a/tests/domaincapsdata/qemu_5.0.0-q35.x86_64.xml +++ b/tests/domaincapsdata/qemu_5.0.0-q35.x86_64.xml @@ -63,8 +63,10 @@ athlon Westmere-IBRS Westmere + Skylake-Server-noTSX-IBRS Skylake-Server-IBRS Skylake-Server + Skylake-Client-noTSX-IBRS Skylake-Client-IBRS Skylake-Client SandyBridge-IBRS @@ -79,7 +81,9 @@ Nehalem IvyBridge-IBRS IvyBridge + Icelake-Server-noTSX Icelake-Server + Icelake-Client-noTSX Icelake-Client Haswell-noTSX-IBRS Haswell-noTSX @@ -89,6 +93,7 @@ EPYC Dhyana Conroe + Cascadelake-Server-noTSX Cascadelake-Server Broadwell-noTSX-IBRS Broadwell-noTSX diff --git a/tests/domaincapsdata/qemu_5.0.0-tcg.x86_64.xml b/tests/domaincapsdata/qemu_5.0.0-tcg.x86_64.xml index 0fbc632267..d634803b29 100644 --- a/tests/domaincapsdata/qemu_5.0.0-tcg.x86_64.xml +++ b/tests/domaincapsdata/qemu_5.0.0-tcg.x86_64.xml @@ -72,8 +72,10 @@ athlon Westmere-IBRS Westmere + Skylake-Server-noTSX-IBRS Skylake-Server-IBRS Skylake-Server + Skylake-Client-noTSX-IBRS Skylake-Client-IBRS Skylake-Client SandyBridge-IBRS @@ -88,7 +90,9 @@ Nehalem IvyBridge-IBRS IvyBridge + Icelake-Server-noTSX Icelake-Server + Icelake-Client-noTSX Icelake-Client Haswell-noTSX-IBRS Haswell-noTSX @@ -98,6 +102,7 @@ EPYC Dhyana Conroe + Cascadelake-Server-noTSX Cascadelake-Server Broadwell-noTSX-IBRS Broadwell-noTSX diff --git a/tests/domaincapsdata/qemu_5.0.0.x86_64.xml b/tests/domaincapsdata/qemu_5.0.0.x86_64.xml index 27f76a8a5e..7609d49020 100644 --- a/tests/domaincapsdata/qemu_5.0.0.x86_64.xml +++ b/tests/domaincapsdata/qemu_5.0.0.x86_64.xml @@ -62,8 +62,10 @@ athlon Westmere-IBRS Westmere + Skylake-Server-noTSX-IBRS Skylake-Server-IBRS Skylake-Server + Skylake-Client-noTSX-IBRS Skylake-Client-IBRS Skylake-Client SandyBridge-IBRS @@ -78,7 +80,9 @@ Nehalem IvyBridge-IBRS IvyBridge + Icelake-Server-noTSX Icelake-Server + Icelake-Client-noTSX Icelake-Client Haswell-noTSX-IBRS Haswell-noTSX @@ -88,6 +92,7 @@ EPYC Dhyana Conroe + Cascadelake-Server-noTSX Cascadelake-Server Broadwell-noTSX-IBRS Broadwell-noTSX -- 2.26.2