From 9f38d6a22f3954c5c6c62bf02fcb485d90b5254d Mon Sep 17 00:00:00 2001 From: Jingyi Wang Date: Tue, 27 Jul 2021 15:59:31 +0800 Subject: [PATCH] add new CPU model Cooperlake Signed-off-by: Jingyi Wang --- cpu_map-Add-Cooperlake-x86-CPU-model.patch | 167 ++++++++++++++++++ ...ange-mc-no-bit-in-IA32_ARCH_CAPABILI.patch | 131 ++++++++++++++ cpu_map-Distribute-x86_Cooperlake.xml.patch | 30 ++++ libvirt.spec | 8 +- 4 files changed, 335 insertions(+), 1 deletion(-) create mode 100644 cpu_map-Add-Cooperlake-x86-CPU-model.patch create mode 100644 cpu_map-Add-pschange-mc-no-bit-in-IA32_ARCH_CAPABILI.patch create mode 100644 cpu_map-Distribute-x86_Cooperlake.xml.patch diff --git a/cpu_map-Add-Cooperlake-x86-CPU-model.patch b/cpu_map-Add-Cooperlake-x86-CPU-model.patch new file mode 100644 index 0000000..96d36bb --- /dev/null +++ b/cpu_map-Add-Cooperlake-x86-CPU-model.patch @@ -0,0 +1,167 @@ +From 41717af8988db9c2d9d8b753f306f6deaa1cec8d Mon Sep 17 00:00:00 2001 +From: Jiri Denemark +Date: Tue, 19 May 2020 15:08:11 +0200 +Subject: [PATCH 2/3] cpu_map: Add Cooperlake x86 CPU model + +The stepping range (10-11) is likely incomplete. QEMU uses 10 and the +CPUID data for Cooperlake show 11. We will update the range if needed +once more details about he CPU are available. + +Signed-off-by: Jiri Denemark +Reviewed-by: Pavel Hrdina +Signed-off-by: Jingyi Wang +--- + src/cpu_map/index.xml | 1 + + src/cpu_map/x86_Cooperlake.xml | 89 +++++++++++++++++++ + .../domaincapsdata/qemu_5.0.0-q35.x86_64.xml | 1 + + .../domaincapsdata/qemu_5.0.0-tcg.x86_64.xml | 1 + + tests/domaincapsdata/qemu_5.0.0.x86_64.xml | 1 + + 5 files changed, 93 insertions(+) + create mode 100644 src/cpu_map/x86_Cooperlake.xml + +diff --git a/src/cpu_map/index.xml b/src/cpu_map/index.xml +index 672d0a3c92..3ccc76b9ed 100644 +--- a/src/cpu_map/index.xml ++++ b/src/cpu_map/index.xml +@@ -54,6 +54,7 @@ + + + ++ + + + +diff --git a/src/cpu_map/x86_Cooperlake.xml b/src/cpu_map/x86_Cooperlake.xml +new file mode 100644 +index 0000000000..77e695aea4 +--- /dev/null ++++ b/src/cpu_map/x86_Cooperlake.xml +@@ -0,0 +1,89 @@ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ +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 ff721530cd..fa945fc002 100644 +--- a/tests/domaincapsdata/qemu_5.0.0-q35.x86_64.xml ++++ b/tests/domaincapsdata/qemu_5.0.0-q35.x86_64.xml +@@ -93,6 +93,7 @@ + EPYC-IBPB + EPYC + Dhyana ++ Cooperlake + Conroe + Cascadelake-Server-noTSX + Cascadelake-Server +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 d567863f49..a0eeed7c2d 100644 +--- a/tests/domaincapsdata/qemu_5.0.0-tcg.x86_64.xml ++++ b/tests/domaincapsdata/qemu_5.0.0-tcg.x86_64.xml +@@ -101,6 +101,7 @@ + EPYC-IBPB + EPYC + Dhyana ++ Cooperlake + Conroe + Cascadelake-Server-noTSX + Cascadelake-Server +diff --git a/tests/domaincapsdata/qemu_5.0.0.x86_64.xml b/tests/domaincapsdata/qemu_5.0.0.x86_64.xml +index 2c6066003d..fbde7a6ba2 100644 +--- a/tests/domaincapsdata/qemu_5.0.0.x86_64.xml ++++ b/tests/domaincapsdata/qemu_5.0.0.x86_64.xml +@@ -92,6 +92,7 @@ + EPYC-IBPB + EPYC + Dhyana ++ Cooperlake + Conroe + Cascadelake-Server-noTSX + Cascadelake-Server +-- +2.27.0 + diff --git a/cpu_map-Add-pschange-mc-no-bit-in-IA32_ARCH_CAPABILI.patch b/cpu_map-Add-pschange-mc-no-bit-in-IA32_ARCH_CAPABILI.patch new file mode 100644 index 0000000..79420a7 --- /dev/null +++ b/cpu_map-Add-pschange-mc-no-bit-in-IA32_ARCH_CAPABILI.patch @@ -0,0 +1,131 @@ +From 9696e88e150fce9ea82eadb16726c8c3a7a197ae Mon Sep 17 00:00:00 2001 +From: Jiri Denemark +Date: Mon, 18 May 2020 20:55:42 +0200 +Subject: [PATCH 1/3] cpu_map: Add pschange-mc-no bit in IA32_ARCH_CAPABILITIES + MSR + +Signed-off-by: Jiri Denemark +Reviewed-by: Pavel Hrdina +Signed-off-by: Jingyi Wang +--- + src/cpu_map/x86_features.xml | 3 +++ + tests/cputestdata/x86_64-cpuid-Core-i7-8550U-enabled.xml | 2 +- + tests/cputestdata/x86_64-cpuid-Core-i7-8550U-guest.xml | 1 + + tests/cputestdata/x86_64-cpuid-Core-i7-8550U-host.xml | 1 + + tests/cputestdata/x86_64-cpuid-Core-i7-8550U-json.xml | 1 + + tests/domaincapsdata/qemu_4.2.0-q35.x86_64.xml | 1 + + tests/domaincapsdata/qemu_4.2.0.x86_64.xml | 1 + + tests/domaincapsdata/qemu_5.0.0-q35.x86_64.xml | 1 + + tests/domaincapsdata/qemu_5.0.0.x86_64.xml | 1 + + 9 files changed, 11 insertions(+), 1 deletion(-) + +diff --git a/src/cpu_map/x86_features.xml b/src/cpu_map/x86_features.xml +index 2c4c29dc99..8525ae0fa5 100644 +--- a/src/cpu_map/x86_features.xml ++++ b/src/cpu_map/x86_features.xml +@@ -509,6 +509,9 @@ + + + ++ ++ ++ + + + +diff --git a/tests/cputestdata/x86_64-cpuid-Core-i7-8550U-enabled.xml b/tests/cputestdata/x86_64-cpuid-Core-i7-8550U-enabled.xml +index 6c480eeacf..57f8ebabba 100644 +--- a/tests/cputestdata/x86_64-cpuid-Core-i7-8550U-enabled.xml ++++ b/tests/cputestdata/x86_64-cpuid-Core-i7-8550U-enabled.xml +@@ -5,5 +5,5 @@ + + + +- ++ + +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..ed06515e99 100644 +--- a/tests/cputestdata/x86_64-cpuid-Core-i7-8550U-guest.xml ++++ b/tests/cputestdata/x86_64-cpuid-Core-i7-8550U-guest.xml +@@ -26,6 +26,7 @@ + + + ++ + + + +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 7f6fe2eac3..7681c94649 100644 +--- a/tests/cputestdata/x86_64-cpuid-Core-i7-8550U-host.xml ++++ b/tests/cputestdata/x86_64-cpuid-Core-i7-8550U-host.xml +@@ -27,4 +27,5 @@ + + + ++ + +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..4774d39c7e 100644 +--- a/tests/cputestdata/x86_64-cpuid-Core-i7-8550U-json.xml ++++ b/tests/cputestdata/x86_64-cpuid-Core-i7-8550U-json.xml +@@ -14,6 +14,7 @@ + + + ++ + + + +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 1b8b8be2f5..fcb0505da0 100644 +--- a/tests/domaincapsdata/qemu_4.2.0-q35.x86_64.xml ++++ b/tests/domaincapsdata/qemu_4.2.0-q35.x86_64.xml +@@ -47,6 +47,7 @@ + + + ++ + + + qemu64 +diff --git a/tests/domaincapsdata/qemu_4.2.0.x86_64.xml b/tests/domaincapsdata/qemu_4.2.0.x86_64.xml +index 213dcc5a08..e22ef8e032 100644 +--- a/tests/domaincapsdata/qemu_4.2.0.x86_64.xml ++++ b/tests/domaincapsdata/qemu_4.2.0.x86_64.xml +@@ -46,6 +46,7 @@ + + + ++ + + + qemu64 +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 45c3e00b1e..ff721530cd 100644 +--- a/tests/domaincapsdata/qemu_5.0.0-q35.x86_64.xml ++++ b/tests/domaincapsdata/qemu_5.0.0-q35.x86_64.xml +@@ -47,6 +47,7 @@ + + + ++ + + + qemu64 +diff --git a/tests/domaincapsdata/qemu_5.0.0.x86_64.xml b/tests/domaincapsdata/qemu_5.0.0.x86_64.xml +index d2a884eed1..2c6066003d 100644 +--- a/tests/domaincapsdata/qemu_5.0.0.x86_64.xml ++++ b/tests/domaincapsdata/qemu_5.0.0.x86_64.xml +@@ -46,6 +46,7 @@ + + + ++ + + + qemu64 +-- +2.27.0 + diff --git a/cpu_map-Distribute-x86_Cooperlake.xml.patch b/cpu_map-Distribute-x86_Cooperlake.xml.patch new file mode 100644 index 0000000..bcef2fb --- /dev/null +++ b/cpu_map-Distribute-x86_Cooperlake.xml.patch @@ -0,0 +1,30 @@ +From fc20e12b3be7a4c96ff0a71112d69181408506d1 Mon Sep 17 00:00:00 2001 +From: Jiri Denemark +Date: Tue, 26 May 2020 12:52:00 +0200 +Subject: [PATCH 3/3] cpu_map: Distribute x86_Cooperlake.xml +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Jiri Denemark +Reviewed-by: Daniel P. Berrangé +Signed-off-by: Jingyi Wang +--- + src/cpu_map/Makefile.inc.am | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/cpu_map/Makefile.inc.am b/src/cpu_map/Makefile.inc.am +index ab5268d94f..8eb818706a 100644 +--- a/src/cpu_map/Makefile.inc.am ++++ b/src/cpu_map/Makefile.inc.am +@@ -22,6 +22,7 @@ cpumap_DATA = \ + cpu_map/x86_Cascadelake-Server.xml \ + cpu_map/x86_Cascadelake-Server-noTSX.xml \ + cpu_map/x86_Conroe.xml \ ++ cpu_map/x86_Cooperlake.xml \ + cpu_map/x86_core2duo.xml \ + cpu_map/x86_coreduo.xml \ + cpu_map/x86_cpu64-rhel5.xml \ +-- +2.27.0 + diff --git a/libvirt.spec b/libvirt.spec index ff2580b..9fabba8 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -99,7 +99,7 @@ Summary: Library providing a simple virtualization API Name: libvirt Version: 6.2.0 -Release: 11 +Release: 12 License: LGPLv2+ URL: https://libvirt.org/ @@ -140,6 +140,9 @@ Patch0029: virdevmapper-Don-t-use-libdevmapper-to-obtain-depend.patch Patch0030: libvirt-Add-retry-support-for-error-policy.patch Patch0031: qemu-Support-retry-BLOCK_IO_ERROR-event.patch Patch0032: libvirt-conf-Set-default-values-of-retry-fileds.patch +Patch0033: cpu_map-Add-Cooperlake-x86-CPU-model.patch +Patch0034: cpu_map-Add-pschange-mc-no-bit-in-IA32_ARCH_CAPABILI.patch +Patch0035: cpu_map-Distribute-x86_Cooperlake.xml.patch Requires: libvirt-daemon = %{version}-%{release} Requires: libvirt-daemon-config-network = %{version}-%{release} @@ -1872,6 +1875,9 @@ exit 0 %changelog +* Tue Jul 27 2021 Jingyi Wang +- add new CPU model Cooperlake + * Fri Apr 23 2021 Chen Qun - libvirt: Add 'retry' support for error policy - qemu: Support 'retry' BLOCK_IO_ERROR event. -- Gitee