Merge ~lvoytek/ubuntu/+source/libvirt:sapphire-rapids-and-libvirt-uri-jammy into ubuntu/+source/libvirt:ubuntu/jammy-devel

Proposed by Lena Voytek
Status: Merged
Approved by: git-ubuntu bot
Approved revision: not available
Merge reported by: Andreas Hasenack
Merged at revision: e73a7076ae6d54afd840cc51808a385c88a2bda0
Proposed branch: ~lvoytek/ubuntu/+source/libvirt:sapphire-rapids-and-libvirt-uri-jammy
Merge into: ubuntu/+source/libvirt:ubuntu/jammy-devel
Diff against target: 1801 lines (+1633/-0)
26 files modified
debian/changelog (+7/-0)
debian/libvirt0.install (+2/-0)
debian/patches/series (+24/-0)
debian/patches/ubuntu/lp-2028057-01-alias-names-allow-additional-feature-node-children.patch (+33/-0)
debian/patches/ubuntu/lp-2028057-02-alias-names-ignore.patch (+45/-0)
debian/patches/ubuntu/lp-2028057-03-alias-names-make-machine-readable.patch (+161/-0)
debian/patches/ubuntu/lp-2028057-04-qemu-i386-sync-cpu-features.patch (+292/-0)
debian/patches/ubuntu/lp-2028057-05-add-missing-feature-amx.patch (+41/-0)
debian/patches/ubuntu/lp-2028057-06-qemu-i386-rename-file.patch (+15/-0)
debian/patches/ubuntu/lp-2028057-07-alias-names-add-to-features.patch (+39/-0)
debian/patches/ubuntu/lp-2028057-08-add-missing-feature-sgx.patch (+236/-0)
debian/patches/ubuntu/lp-2028057-09-add-missing-feature-sgxlc.patch (+83/-0)
debian/patches/ubuntu/lp-2028057-10-add-missing-feature-sgx-exinfo.patch (+22/-0)
debian/patches/ubuntu/lp-2028057-11-add-missing-feature-sgx1.patch (+21/-0)
debian/patches/ubuntu/lp-2028057-12-add-missing-feature-sgx2.patch (+20/-0)
debian/patches/ubuntu/lp-2028057-13-add-missing-feature-sgx-additional.patch (+36/-0)
debian/patches/ubuntu/lp-2028057-14-add-missing-feature-bus-lock-detect.patch (+20/-0)
debian/patches/ubuntu/lp-2028057-15-add-missing-feature-pks.patch (+52/-0)
debian/patches/ubuntu/lp-2028057-16-add-missing-feature-avx512-vp2intersect.patch (+20/-0)
debian/patches/ubuntu/lp-2028057-17-add-missing-feature-avx512-fp16.patch (+20/-0)
debian/patches/ubuntu/lp-2028057-18-add-missing-feature-serialize.patch (+20/-0)
debian/patches/ubuntu/lp-2028057-19-add-missing-feature-tsx-ldtrk.patch (+20/-0)
debian/patches/ubuntu/lp-2028057-20-add-missing-feature-arch-lbr.patch (+20/-0)
debian/patches/ubuntu/lp-2028057-21-add-missing-feature-xfd.patch (+20/-0)
debian/patches/ubuntu/lp-2028057-22-add-missing-feature-intel-pt-lip.patch (+54/-0)
debian/patches/ubuntu/lp-2028057-23-add-new-CPU-model-Intel-SapphireRapids.patch (+310/-0)
Reviewer Review Type Date Requested Status
git-ubuntu bot Approve
Bryce Harrington (community) Approve
Canonical Server Reporter Pending
Review via email: mp+455072@code.launchpad.net

Description of the change

Add support for Sapphire Rapids and keep a consistent LIBVIRT_DEFAULT_URI value.

Jammy requires substantially more patches than Lunar for Sapphire Rapids with the addition of xfd, tsx-ldtrk, serialize, bus-lock-detect, avx512-fp16, and amx

Still working on architecture-specific testing for Sapphire Rapids alongside the SRU template for both bugs.

PPA: https://launchpad.net/~lvoytek/+archive/ubuntu/libvirt-sapphirerapids-uri

To post a comment you must log in.
Revision history for this message
Bryce Harrington (bryce) wrote :

This looks to be properly carrying the changes from https://code.launchpad.net/~lvoytek/ubuntu/+source/libvirt/+git/libvirt/+merge/455071 back to jammy, and the further support as mentioned. PPA builds properly, I didn't check autopkgtests but this type of change is unlikely to be adequately exercised by those tests. There is a quantity of patches here but they're principally all XML tweaks along with corresponding python and C code, all of which looks good on a quick visual inspection.

LGTM, +1

review: Approve
Revision history for this message
git-ubuntu bot (git-ubuntu-bot) wrote :

Approvers: lvoytek, bryce
Uploaders: lvoytek, bryce
MP auto-approved

review: Approve
e73a707... by Lena Voytek

changelog

Revision history for this message
Lena Voytek (lvoytek) wrote :

Thanks for the reviews Bryce! I'll go ahead and upload the Sapphire Rapids changes for lunar, and jammy. Still need some time for the URI update and I don't want the wishlist item to block this off

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

This is already in jammy-proposed[1], and git-ubuntu imported it. Marking the MP as merged.

1. https://launchpad.net/ubuntu/+source/libvirt/8.0.0-1ubuntu7.8

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index ce7b258..d28b52e 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,10 @@
6+libvirt (8.0.0-1ubuntu7.8) jammy; urgency=medium
7+
8+ * d/p/u/lp-2028057-*, d/libvirt0.install: Add named types and definitions,
9+ along with QEMU alias syncing for Intel SapphireRapids (LP: #2028057)
10+
11+ -- Lena Voytek <lena.voytek@canonical.com> Wed, 29 Nov 2023 14:52:52 -0700
12+
13 libvirt (8.0.0-1ubuntu7.7) jammy; urgency=medium
14
15 * When attempting to launch a VM with SGX enabled, there is an
16diff --git a/debian/libvirt0.install b/debian/libvirt0.install
17index b384c41..ca07f96 100644
18--- a/debian/libvirt0.install
19+++ b/debian/libvirt0.install
20@@ -58,6 +58,8 @@ usr/share/libvirt/cpu_map/x86_Opteron_G5.xml
21 usr/share/libvirt/cpu_map/x86_Penryn.xml
22 usr/share/libvirt/cpu_map/x86_SandyBridge-IBRS.xml
23 usr/share/libvirt/cpu_map/x86_SandyBridge.xml
24+usr/share/libvirt/cpu_map/x86_SapphireRapids-noTSX.xml
25+usr/share/libvirt/cpu_map/x86_SapphireRapids.xml
26 usr/share/libvirt/cpu_map/x86_Skylake-Client-IBRS.xml
27 usr/share/libvirt/cpu_map/x86_Skylake-Client-noTSX-IBRS.xml
28 usr/share/libvirt/cpu_map/x86_Skylake-Client.xml
29diff --git a/debian/patches/series b/debian/patches/series
30index fa31371..8b1d998 100644
31--- a/debian/patches/series
32+++ b/debian/patches/series
33@@ -29,6 +29,30 @@ ubuntu/dnsmasq-as-priv-user
34 ubuntu/ovmf_paths.patch
35 ubuntu/wait-for-qemu-kvm.patch
36
37+ubuntu/lp-2028057-01-alias-names-allow-additional-feature-node-children.patch
38+ubuntu/lp-2028057-02-alias-names-ignore.patch
39+ubuntu/lp-2028057-03-alias-names-make-machine-readable.patch
40+ubuntu/lp-2028057-04-qemu-i386-sync-cpu-features.patch
41+ubuntu/lp-2028057-05-add-missing-feature-amx.patch
42+ubuntu/lp-2028057-06-qemu-i386-rename-file.patch
43+ubuntu/lp-2028057-07-alias-names-add-to-features.patch
44+ubuntu/lp-2028057-08-add-missing-feature-sgx.patch
45+ubuntu/lp-2028057-09-add-missing-feature-sgxlc.patch
46+ubuntu/lp-2028057-10-add-missing-feature-sgx-exinfo.patch
47+ubuntu/lp-2028057-11-add-missing-feature-sgx1.patch
48+ubuntu/lp-2028057-12-add-missing-feature-sgx2.patch
49+ubuntu/lp-2028057-13-add-missing-feature-sgx-additional.patch
50+ubuntu/lp-2028057-14-add-missing-feature-bus-lock-detect.patch
51+ubuntu/lp-2028057-15-add-missing-feature-pks.patch
52+ubuntu/lp-2028057-16-add-missing-feature-avx512-vp2intersect.patch
53+ubuntu/lp-2028057-17-add-missing-feature-avx512-fp16.patch
54+ubuntu/lp-2028057-18-add-missing-feature-serialize.patch
55+ubuntu/lp-2028057-19-add-missing-feature-tsx-ldtrk.patch
56+ubuntu/lp-2028057-20-add-missing-feature-arch-lbr.patch
57+ubuntu/lp-2028057-21-add-missing-feature-xfd.patch
58+ubuntu/lp-2028057-22-add-missing-feature-intel-pt-lip.patch
59+ubuntu/lp-2028057-23-add-new-CPU-model-Intel-SapphireRapids.patch
60+
61 # Ubuntu Apparmor Changes
62 ubuntu-aa/0020-virt-aa-helper-ubuntu-storage-paths.patch
63 ubuntu-aa/0029-appmor-libvirt-qemu-Add-9p-support.patch
64diff --git a/debian/patches/ubuntu/lp-2028057-01-alias-names-allow-additional-feature-node-children.patch b/debian/patches/ubuntu/lp-2028057-01-alias-names-allow-additional-feature-node-children.patch
65new file mode 100644
66index 0000000..bd4d6be
67--- /dev/null
68+++ b/debian/patches/ubuntu/lp-2028057-01-alias-names-allow-additional-feature-node-children.patch
69@@ -0,0 +1,33 @@
70+Description: Allow for more than one child in feature nodes in cpu-data.py.
71+ cpu-data.py assumes that all "feature" nodes have exactly one child. This
72+ assumption is no longer true when the cpumap includes alias-names for
73+ features.
74+Author: Tim Wiederhake <twiederh@redhat.com>
75+Origin: upstream, https://gitlab.com/libvirt/libvirt/-/commit/10a41a8cbdf4bcaba0039e97704afda8220cd8e0
76+Bug-Ubuntu: https://launchpad.net/bugs/2028057
77+Forwarded: not-needed
78+Last-Update: 2023-11-29
79+---
80+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
81+--- a/tests/cputestdata/cpu-data.py
82++++ b/tests/cputestdata/cpu-data.py
83+@@ -445,12 +445,15 @@
84+
85+ cpuMap = dict()
86+ for f in xml.etree.ElementTree.parse(path).getroot().iter("feature"):
87+- if f[0].tag not in ("cpuid", "msr"):
88++ data = f.find("cpuid")
89++ if data is None:
90++ data = f.find("msr")
91++ if data is None:
92+ continue
93+
94+- feature = {"type": f[0].tag}
95+- for reg in _KEYS[f[0].tag] + _REGS[f[0].tag]:
96+- feature[reg] = int(f[0].attrib.get(reg, "0"), 0)
97++ feature = {"type": data.tag}
98++ for reg in _KEYS[data.tag] + _REGS[data.tag]:
99++ feature[reg] = int(data.attrib.get(reg, "0"), 0)
100+ cpuMap[f.attrib["name"]] = feature
101+ return cpuMap
102+
103diff --git a/debian/patches/ubuntu/lp-2028057-02-alias-names-ignore.patch b/debian/patches/ubuntu/lp-2028057-02-alias-names-ignore.patch
104new file mode 100644
105index 0000000..3eb2351
106--- /dev/null
107+++ b/debian/patches/ubuntu/lp-2028057-02-alias-names-ignore.patch
108@@ -0,0 +1,45 @@
109+Description: Ignore alias names in feature maps when parsing in cpu_x86.
110+ This patch makes sure cpu_x86 skips over feature map alias names which will
111+ be added in this series as they are meant only for QEMU synchronization.
112+Author: Tim Wiederhake <twiederh@redhat.com>
113+Origin: upstream, https://gitlab.com/libvirt/libvirt/-/commit/7b0c01db75b0c11ba6f80999b822cfadff4d28da
114+Bug-Ubuntu: https://launchpad.net/bugs/2028057
115+Forwarded: not-needed
116+Last-Update: 2023-11-29
117+---
118+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
119+--- a/src/cpu/cpu_x86.c
120++++ b/src/cpu/cpu_x86.c
121+@@ -1089,7 +1089,7 @@
122+ x86ParseDataItemList(virCPUx86Data *cpudata,
123+ xmlNodePtr node)
124+ {
125+- size_t i;
126++ size_t i = 0;
127+
128+ if (xmlChildElementCount(node) <= 0) {
129+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("no x86 CPU data found"));
130+@@ -1097,9 +1097,14 @@
131+ }
132+
133+ node = xmlFirstElementChild(node);
134+- for (i = 0; node; ++i) {
135++ while (node) {
136+ virCPUx86DataItem item;
137+
138++ if (virXMLNodeNameEqual(node, "alias")) {
139++ node = xmlNextElementSibling(node);
140++ continue;
141++ }
142++
143+ if (virXMLNodeNameEqual(node, "cpuid")) {
144+ if (x86ParseCPUID(node, &item) < 0) {
145+ virReportError(VIR_ERR_INTERNAL_ERROR,
146+@@ -1116,6 +1121,7 @@
147+
148+ if (virCPUx86DataAddItem(cpudata, &item) < 0)
149+ return -1;
150++ ++i;
151+
152+ node = xmlNextElementSibling(node);
153+ }
154diff --git a/debian/patches/ubuntu/lp-2028057-03-alias-names-make-machine-readable.patch b/debian/patches/ubuntu/lp-2028057-03-alias-names-make-machine-readable.patch
155new file mode 100644
156index 0000000..9200c9e
157--- /dev/null
158+++ b/debian/patches/ubuntu/lp-2028057-03-alias-names-make-machine-readable.patch
159@@ -0,0 +1,161 @@
160+Description: Make x86 feature alias names machine readable.
161+Author: Tim Wiederhake <twiederh@redhat.com>
162+Origin: upstream, https://gitlab.com/libvirt/libvirt/-/commit/1d946ac79416f3731262c059c35a234c95285d46
163+Bug-Ubuntu: https://launchpad.net/bugs/2028057
164+Forwarded: not-needed
165+Last-Update: 2023-11-29
166+---
167+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
168+--- a/src/cpu_map/x86_features.xml
169++++ b/src/cpu_map/x86_features.xml
170+@@ -98,10 +98,12 @@
171+ </feature>
172+
173+ <!-- standard features, ECX -->
174+- <feature name='pni'> <!-- sse3 -->
175++ <feature name='pni'>
176++ <alias name='sse3' source='qemu'/>
177+ <cpuid eax_in='0x01' ecx='0x00000001'/>
178+ </feature>
179+- <feature name='pclmuldq'> <!-- pclmulqdq -->
180++ <feature name='pclmuldq'>
181++ <alias name='pclmulqdq' source='qemu'/>
182+ <cpuid eax_in='0x01' ecx='0x00000002'/>
183+ </feature>
184+ <feature name='dtes64'>
185+@@ -110,7 +112,8 @@
186+ <feature name='monitor'>
187+ <cpuid eax_in='0x01' ecx='0x00000008'/>
188+ </feature>
189+- <feature name='ds_cpl'> <!-- ds-cpl -->
190++ <feature name='ds_cpl'>
191++ <alias name='ds-cpl' source='qemu'/>
192+ <cpuid eax_in='0x01' ecx='0x00000010'/>
193+ </feature>
194+ <feature name='vmx'>
195+@@ -149,10 +152,14 @@
196+ <feature name='dca'>
197+ <cpuid eax_in='0x01' ecx='0x00040000'/>
198+ </feature>
199+- <feature name='sse4.1'> <!-- sse4-1, sse4_1 -->
200++ <feature name='sse4.1'>
201++ <alias name='sse4-1' source='qemu'/>
202++ <alias name='sse4_1' source='qemu'/>
203+ <cpuid eax_in='0x01' ecx='0x00080000'/>
204+ </feature>
205+- <feature name='sse4.2'> <!-- sse4-2, sse4_2 -->
206++ <feature name='sse4.2'>
207++ <alias name='sse4-2' source='qemu'/>
208++ <alias name='sse4_2' source='qemu'/>
209+ <cpuid eax_in='0x01' ecx='0x00100000'/>
210+ </feature>
211+ <feature name='x2apic'>
212+@@ -198,7 +205,8 @@
213+ <feature name='fsgsbase'>
214+ <cpuid eax_in='0x07' ecx_in='0x00' ebx='0x00000001'/>
215+ </feature>
216+- <feature name='tsc_adjust'> <!-- tsc-adjust -->
217++ <feature name='tsc_adjust'>
218++ <alias name='tsc-adjust' source='qemu'/>
219+ <cpuid eax_in='0x07' ecx_in='0x00' ebx='0x00000002'/>
220+ </feature>
221+ <feature name='bmi1'>
222+@@ -225,7 +233,8 @@
223+ <feature name='rtm'>
224+ <cpuid eax_in='0x07' ecx_in='0x00' ebx='0x00000800'/>
225+ </feature>
226+- <feature name='cmt'> <!-- cqm -->
227++ <feature name='cmt'>
228++ <alias name='cqm' source='linux'/>
229+ <cpuid eax_in='0x07' ecx_in='0x00' ebx='0x00001000'/>
230+ </feature>
231+ <feature name='mpx'>
232+@@ -341,7 +350,8 @@
233+ <feature name='fsrm'>
234+ <cpuid eax_in='0x07' ecx_in='0x00' edx='0x00000010'/>
235+ </feature>
236+- <feature name='md-clear'> <!-- md_clear -->
237++ <feature name='md-clear'>
238++ <alias name='md_clear' source='linux'/>
239+ <cpuid eax_in='0x07' ecx_in='0x00' edx='0x00000400'/>
240+ </feature>
241+ <feature name='pconfig'>
242+@@ -362,7 +372,8 @@
243+ <feature name='stibp'>
244+ <cpuid eax_in='0x07' ecx_in='0x00' edx='0x08000000'/>
245+ </feature>
246+- <feature name='arch-capabilities'> <!-- arch_capabilities, arch-facilities -->
247++ <feature name='arch-capabilities'>
248++ <alias name='arch_capabilities' source='linux'/>
249+ <cpuid eax_in='0x07' ecx_in='0x00' edx='0x20000000'/>
250+ </feature>
251+ <feature name='core-capability'>
252+@@ -405,13 +416,16 @@
253+ <feature name='syscall'>
254+ <cpuid eax_in='0x80000001' edx='0x00000800'/>
255+ </feature>
256+- <feature name='nx'> <!-- xd -->
257++ <feature name='nx'>
258++ <alias name='xd' source='qemu'/>
259+ <cpuid eax_in='0x80000001' edx='0x00100000'/>
260+ </feature>
261+ <feature name='mmxext'>
262+ <cpuid eax_in='0x80000001' edx='0x00400000'/>
263+ </feature>
264+- <feature name='fxsr_opt'> <!-- ffxsr, fxsr-opt -->
265++ <feature name='fxsr_opt'>
266++ <alias name='ffxsr' source='qemu'/>
267++ <alias name='fxsr-opt' source='qemu'/>
268+ <cpuid eax_in='0x80000001' edx='0x02000000'/>
269+ </feature>
270+ <feature name='pdpe1gb'>
271+@@ -420,7 +434,8 @@
272+ <feature name='rdtscp'>
273+ <cpuid eax_in='0x80000001' edx='0x08000000'/>
274+ </feature>
275+- <feature name='lm'> <!-- i64 -->
276++ <feature name='lm'>
277++ <alias name='i64' source='qemu'/>
278+ <cpuid eax_in='0x80000001' edx='0x20000000'/>
279+ </feature>
280+ <feature name='3dnowext'>
281+@@ -431,10 +446,12 @@
282+ </feature>
283+
284+ <!-- extended features, ECX -->
285+- <feature name='lahf_lm'> <!-- lahf-lm -->
286++ <feature name='lahf_lm'>
287++ <alias name='lahf-lm' source='qemu'/>
288+ <cpuid eax_in='0x80000001' ecx='0x00000001'/>
289+ </feature>
290+- <feature name='cmp_legacy'> <!-- cmp-legacy -->
291++ <feature name='cmp_legacy'>
292++ <alias name='cmp-legacy' source='qemu'/>
293+ <cpuid eax_in='0x80000001' ecx='0x00000002'/>
294+ </feature>
295+ <feature name='svm'>
296+@@ -485,7 +502,8 @@
297+ <feature name='cvt16'>
298+ <cpuid eax_in='0x80000001' ecx='0x00040000'/>
299+ </feature>
300+- <feature name='nodeid_msr'> <!-- nodeid-msr -->
301++ <feature name='nodeid_msr'>
302++ <alias name='nodeid-msr' source='qemu'/>
303+ <cpuid eax_in='0x80000001' ecx='0x00080000'/>
304+ </feature>
305+ <feature name='tbm'>
306+@@ -494,10 +512,12 @@
307+ <feature name='topoext'>
308+ <cpuid eax_in='0x80000001' ecx='0x00400000'/>
309+ </feature>
310+- <feature name='perfctr_core'> <!-- perfctr-core -->
311++ <feature name='perfctr_core'>
312++ <alias name='perfctr-core' source='qemu'/>
313+ <cpuid eax_in='0x80000001' ecx='0x00800000'/>
314+ </feature>
315+- <feature name='perfctr_nb'> <!-- perfctr-nb -->
316++ <feature name='perfctr_nb'>
317++ <alias name='perfctr-nb' source='qemu'/>
318+ <cpuid eax_in='0x80000001' ecx='0x01000000'/>
319+ </feature>
320+
321diff --git a/debian/patches/ubuntu/lp-2028057-04-qemu-i386-sync-cpu-features.patch b/debian/patches/ubuntu/lp-2028057-04-qemu-i386-sync-cpu-features.patch
322new file mode 100644
323index 0000000..97b9f2a
324--- /dev/null
325+++ b/debian/patches/ubuntu/lp-2028057-04-qemu-i386-sync-cpu-features.patch
326@@ -0,0 +1,292 @@
327+Description: Add script to sync from QEMU i386 cpu features.
328+ This script is intended to help in synchronizing i386 QEMU cpu feature
329+ definitions with libvirt. QEMU's attribute list for the "max-x86_64-cpu"
330+ contains non-cpu-feature items and needs to be filtered before being useful.
331+Author: Tim Wiederhake <twiederh@redhat.com>
332+Origin: upstream, https://gitlab.com/libvirt/libvirt/-/commit/fe69966cbbdd51e409506bd485e75b317fde8fbb
333+Bug-Ubuntu: https://launchpad.net/bugs/2028057
334+Forwarded: not-needed
335+Last-Update: 2023-11-29
336+---
337+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
338+--- /dev/null
339++++ b/src/cpu_map/sync_qemu_features_i386.py
340+@@ -0,0 +1,278 @@
341++#!/usr/bin/env python3
342++
343++import argparse
344++import json
345++import subprocess
346++import xml.etree.ElementTree
347++
348++
349++def ignore_feature(feature):
350++ ignored_features = [
351++ # VIA/Cyrix/Centaur-defined CPU features
352++ # CPUID level 0xC0000001, word 5
353++ "ace2",
354++ "ace2-en",
355++ "phe",
356++ "phe-en",
357++ "pmm",
358++ "pmm-en",
359++ "xcrypt",
360++ "xcrypt-en",
361++ "xstore",
362++ "xstore-en",
363++
364++ # non-features
365++ "check",
366++ "cpuid-0xb",
367++ "enforce",
368++ "fill-mtrr-mask",
369++ "full-cpuid-auto-level",
370++ "full-width-write",
371++ "host-cache-info",
372++ "host-phys-bits",
373++ "hotpluggable",
374++ "hotplugged",
375++ "hv-apicv",
376++ "hv-avic",
377++ "hv-crash",
378++ "hv-emsr-bitmap",
379++ "hv-enforce-cpuid",
380++ "hv-evmcs",
381++ "hv-frequencies",
382++ "hv-ipi",
383++ "hv-passthrough",
384++ "hv-reenlightenment",
385++ "hv-relaxed",
386++ "hv-reset",
387++ "hv-runtime",
388++ "hv-stimer",
389++ "hv-stimer-direct",
390++ "hv-syndbg",
391++ "hv-synic",
392++ "hv-time",
393++ "hv-tlbflush",
394++ "hv-tlbflush-direct",
395++ "hv-tlbflush-ext",
396++ "hv-vapic",
397++ "hv-vpindex",
398++ "hv-xmm-input",
399++ "kvm",
400++ "kvm-asyncpf",
401++ "kvm-asyncpf-int",
402++ "kvm-hint-dedicated",
403++ "kvm-mmu",
404++ "kvm-msi-ext-dest-id",
405++ "kvm-no-smi-migration",
406++ "kvm-nopiodelay",
407++ "kvm-poll-control",
408++ "kvm-pv-enforce-cpuid",
409++ "kvm-pv-eoi",
410++ "kvm-pv-ipi",
411++ "kvm-pv-sched-yield",
412++ "kvm-pv-tlb-flush",
413++ "kvm-pv-unhalt",
414++ "kvm-steal-time",
415++ "kvm_asyncpf",
416++ "kvm_asyncpf_int",
417++ "kvm_mmu",
418++ "kvm_nopiodelay",
419++ "kvm_poll_control",
420++ "kvm_pv_eoi",
421++ "kvm_pv_unhalt",
422++ "kvm_steal_time",
423++ "kvmclock",
424++ "kvmclock-stable-bit",
425++ "l3-cache",
426++ "legacy-cache",
427++ "lmce",
428++ "migratable",
429++ "pmu",
430++ "realized",
431++ "start-powered-off",
432++ "tcg-cpuid",
433++ "vmware-cpuid-freq",
434++ "vmx-activity-hlt",
435++ "vmx-activity-shutdown",
436++ "vmx-activity-wait-sipi",
437++ "vmx-apicv-register",
438++ "vmx-apicv-vid",
439++ "vmx-apicv-x2apic",
440++ "vmx-apicv-xapic",
441++ "vmx-cr3-load-noexit",
442++ "vmx-cr3-store-noexit",
443++ "vmx-cr8-load-exit",
444++ "vmx-cr8-store-exit",
445++ "vmx-desc-exit",
446++ "vmx-encls-exit",
447++ "vmx-entry-ia32e-mode",
448++ "vmx-entry-load-bndcfgs",
449++ "vmx-entry-load-efer",
450++ "vmx-entry-load-pat",
451++ "vmx-entry-load-perf-global-ctrl",
452++ "vmx-entry-load-pkrs",
453++ "vmx-entry-load-rtit-ctl",
454++ "vmx-entry-noload-debugctl",
455++ "vmx-ept",
456++ "vmx-ept-1gb",
457++ "vmx-ept-2mb",
458++ "vmx-ept-advanced-exitinfo",
459++ "vmx-ept-execonly",
460++ "vmx-eptad",
461++ "vmx-eptp-switching",
462++ "vmx-exit-ack-intr",
463++ "vmx-exit-clear-bndcfgs",
464++ "vmx-exit-clear-rtit-ctl",
465++ "vmx-exit-load-efer",
466++ "vmx-exit-load-pat",
467++ "vmx-exit-load-perf-global-ctrl",
468++ "vmx-exit-load-pkrs",
469++ "vmx-exit-nosave-debugctl",
470++ "vmx-exit-save-efer",
471++ "vmx-exit-save-pat",
472++ "vmx-exit-save-preemption-timer",
473++ "vmx-flexpriority",
474++ "vmx-hlt-exit",
475++ "vmx-ins-outs",
476++ "vmx-intr-exit",
477++ "vmx-invept",
478++ "vmx-invept-all-context",
479++ "vmx-invept-single-context",
480++ "vmx-invept-single-context-noglobals",
481++ "vmx-invlpg-exit",
482++ "vmx-invpcid-exit",
483++ "vmx-invvpid",
484++ "vmx-invvpid-all-context",
485++ "vmx-invvpid-single-addr",
486++ "vmx-io-bitmap",
487++ "vmx-io-exit",
488++ "vmx-monitor-exit",
489++ "vmx-movdr-exit",
490++ "vmx-msr-bitmap",
491++ "vmx-mtf",
492++ "vmx-mwait-exit",
493++ "vmx-nmi-exit",
494++ "vmx-page-walk-4",
495++ "vmx-page-walk-5",
496++ "vmx-pause-exit",
497++ "vmx-ple",
498++ "vmx-pml",
499++ "vmx-posted-intr",
500++ "vmx-preemption-timer",
501++ "vmx-rdpmc-exit",
502++ "vmx-rdrand-exit",
503++ "vmx-rdseed-exit",
504++ "vmx-rdtsc-exit",
505++ "vmx-rdtscp-exit",
506++ "vmx-secondary-ctls",
507++ "vmx-shadow-vmcs",
508++ "vmx-store-lma",
509++ "vmx-true-ctls",
510++ "vmx-tsc-offset",
511++ "vmx-tsc-scaling",
512++ "vmx-unrestricted-guest",
513++ "vmx-vintr-pending",
514++ "vmx-vmfunc",
515++ "vmx-vmwrite-vmexit-fields",
516++ "vmx-vnmi",
517++ "vmx-vnmi-pending",
518++ "vmx-vpid",
519++ "vmx-wbinvd-exit",
520++ "vmx-xsaves",
521++ "vmx-zero-len-inject",
522++ ]
523++
524++ if feature["type"] != "bool":
525++ return True
526++
527++ name = feature["name"]
528++
529++ if name.startswith("x-"):
530++ return True
531++
532++ if name in ignored_features:
533++ return True
534++
535++ return False
536++
537++
538++def get_qemu_feature_list(path_to_qemu):
539++ cmd = [
540++ path_to_qemu,
541++ "-machine", "accel=kvm",
542++ "-cpu", "host",
543++ "-nodefaults",
544++ "-nographic",
545++ "-qmp",
546++ "stdio"
547++ ]
548++
549++ request = """
550++ {
551++ "execute": "qmp_capabilities"
552++ }
553++ {
554++ "execute": "qom-list-properties",
555++ "arguments": {
556++ "typename": "max-x86_64-cpu"
557++ },
558++ "id": "qom-list-properties"
559++ }
560++ {
561++ "execute": "quit"
562++ }
563++ """
564++
565++ decoder = json.JSONDecoder()
566++ output = subprocess.check_output(cmd, input=request, text=True)
567++ while output:
568++ obj, idx = decoder.raw_decode(output)
569++ output = output[idx:].strip()
570++ if obj.get("id") != "qom-list-properties":
571++ continue
572++ for feature in obj["return"]:
573++ if ignore_feature(feature):
574++ continue
575++ yield feature["name"]
576++
577++
578++def get_libvirt_feature_list(path_to_featuresfile):
579++ dom = xml.etree.ElementTree.parse(path_to_featuresfile)
580++ for feature in dom.getroot().iter("feature"):
581++ yield feature.get("name")
582++ for alias in feature:
583++ if alias.tag == "alias" and alias.get("source") == "qemu":
584++ yield alias.get("name")
585++
586++
587++def main():
588++ parser = argparse.ArgumentParser(
589++ description="Synchronize x86 cpu features from QEMU i386 target.")
590++ parser.add_argument(
591++ "--qemu",
592++ help="Path to qemu executable",
593++ default="qemu-system-x86_64",
594++ type=str)
595++ parser.add_argument(
596++ "--features",
597++ help="Path to 'src/cpu_map/x86_features.xml' file in "
598++ "the libvirt repository",
599++ default="x86_features.xml",
600++ type=str)
601++
602++ args = parser.parse_args()
603++
604++ qfeatures = get_qemu_feature_list(args.qemu)
605++ lfeatures = list(get_libvirt_feature_list(args.features))
606++ missing = [f for f in sorted(qfeatures) if f not in lfeatures]
607++
608++ if missing:
609++ print("The following features were reported by qemu but are "
610++ "unknown to libvirt:")
611++ for feature in missing:
612++ print(" *", feature)
613++
614++ return len(missing) != 0
615++
616++
617++if __name__ == "__main__":
618++ exit(main())
619diff --git a/debian/patches/ubuntu/lp-2028057-05-add-missing-feature-amx.patch b/debian/patches/ubuntu/lp-2028057-05-add-missing-feature-amx.patch
620new file mode 100644
621index 0000000..a44564b
622--- /dev/null
623+++ b/debian/patches/ubuntu/lp-2028057-05-add-missing-feature-amx.patch
624@@ -0,0 +1,41 @@
625+Description: Add cpu feature amx.
626+ AMX is one of the features used in Sapphire Rapids CPUs. This patch adds
627+ feature definitions for amx-bf16, amx-tile, and amx-int8, and syncs them
628+ with QEMU using the script added in the previous patch.
629+Author: Lin Yang <lin.a.yang@intel.com>
630+Origin: upstream, https://gitlab.com/libvirt/libvirt/-/commit/e528717d9039e1f571c6546f2ea9c6ba55e2507a
631+Bug-Ubuntu: https://launchpad.net/bugs/2028057
632+Forwarded: not-needed
633+Last-Update: 2023-11-29
634+---
635+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
636+--- a/src/cpu_map/sync_qemu_i386.py
637++++ b/src/cpu_map/sync_qemu_i386.py
638+@@ -72,6 +72,9 @@
639+ "CPUID_7_0_EDX_SPEC_CTRL": "spec-ctrl",
640+ "CPUID_7_0_EDX_SPEC_CTRL_SSBD": "ssbd",
641+ "CPUID_7_0_EDX_STIBP": "stibp",
642++ "CPUID_7_0_EDX_AMX_BF16": "amx-bf16",
643++ "CPUID_7_0_EDX_AMX_TILE": "amx-tile",
644++ "CPUID_7_0_EDX_AMX_INT8": "amx-int8",
645+ "CPUID_7_1_EAX_AVX512_BF16": "avx512-bf16",
646+ "CPUID_7_1_EAX_AVX_VNNI": "avx-vnni",
647+ "CPUID_8000_0008_EBX_AMD_SSBD": "amd-ssbd",
648+--- a/src/cpu_map/x86_features.xml
649++++ b/src/cpu_map/x86_features.xml
650+@@ -347,6 +347,15 @@
651+ <feature name='pconfig'>
652+ <cpuid eax_in='0x07' ecx_in='0x00' edx='0x00040000'/>
653+ </feature>
654++ <feature name='amx-bf16'>
655++ <cpuid eax_in='0x07' ecx_in='0x00' edx='0x00400000'/>
656++ </feature>
657++ <feature name='amx-tile'>
658++ <cpuid eax_in='0x07' ecx_in='0x00' edx='0x01000000'/>
659++ </feature>
660++ <feature name='amx-int8'>
661++ <cpuid eax_in='0x07' ecx_in='0x00' edx='0x02000000'/>
662++ </feature>
663+ <feature name='spec-ctrl'>
664+ <cpuid eax_in='0x07' ecx_in='0x00' edx='0x04000000'/>
665+ </feature>
666diff --git a/debian/patches/ubuntu/lp-2028057-06-qemu-i386-rename-file.patch b/debian/patches/ubuntu/lp-2028057-06-qemu-i386-rename-file.patch
667new file mode 100644
668index 0000000..9607a9b
669--- /dev/null
670+++ b/debian/patches/ubuntu/lp-2028057-06-qemu-i386-rename-file.patch
671@@ -0,0 +1,15 @@
672+Description: Rename sync_qemu_i386.py to sync_qemu_models_i386.py.
673+ The QEMU sync script was renamed upstream to make naming more consistent. This
674+ patch is included to make the script work alongside the other patches for
675+ Sapphire Rapids.
676+Author: Tim Wiederhake <twiederh@redhat.com>
677+Origin: upstream, https://gitlab.com/libvirt/libvirt/-/commit/84080aabc0f9959b16e60cffeb634f420f86df0f
678+Bug-Ubuntu: https://launchpad.net/bugs/2028057
679+Forwarded: not-needed
680+Last-Update: 2023-11-29
681+---
682+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
683+diff --git a/src/cpu_map/sync_qemu_i386.py b/src/cpu_map/sync_qemu_models_i386.py
684+similarity index 100%
685+rename from src/cpu_map/sync_qemu_i386.py
686+rename to src/cpu_map/sync_qemu_models_i386.py
687diff --git a/debian/patches/ubuntu/lp-2028057-07-alias-names-add-to-features.patch b/debian/patches/ubuntu/lp-2028057-07-alias-names-add-to-features.patch
688new file mode 100644
689index 0000000..8a82467
690--- /dev/null
691+++ b/debian/patches/ubuntu/lp-2028057-07-alias-names-add-to-features.patch
692@@ -0,0 +1,39 @@
693+Description: Add alias names for some features.
694+ Add alias names for features with names that have '_' instead of '-' in QEMU.
695+Author: Tim Wiederhake <twiederh@redhat.com>
696+Origin: upstream, https://gitlab.com/libvirt/libvirt/-/commit/eb9912b4877b526f254af05f20c15a63fc633320
697+Bug-Ubuntu: https://launchpad.net/bugs/2028057
698+Forwarded: not-needed
699+Last-Update: 2023-11-29
700+---
701+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
702+--- a/src/cpu_map/x86_features.xml
703++++ b/src/cpu_map/x86_features.xml
704+@@ -563,15 +563,19 @@
705+ <cpuid eax_in='0x8000000a' edx='0x00000002'/>
706+ </feature>
707+ <feature name='svm-lock'>
708++ <alias name='svm_lock' source='qemu'/>
709+ <cpuid eax_in='0x8000000a' edx='0x00000004'/>
710+ </feature>
711+ <feature name='nrip-save'>
712++ <alias name='nrip_save' source='qemu'/>
713+ <cpuid eax_in='0x8000000a' edx='0x00000008'/>
714+ </feature>
715+ <feature name='tsc-scale'>
716++ <alias name='tsc_scale' source='qemu'/>
717+ <cpuid eax_in='0x8000000a' edx='0x00000010'/>
718+ </feature>
719+ <feature name='vmcb-clean'>
720++ <alias name='vmcb_clean' source='qemu'/>
721+ <cpuid eax_in='0x8000000a' edx='0x00000020'/>
722+ </feature>
723+ <feature name='flushbyasid'>
724+@@ -581,6 +585,7 @@
725+ <cpuid eax_in='0x8000000a' edx='0x00000080'/>
726+ </feature>
727+ <feature name='pause-filter'>
728++ <alias name='pause_filter' source='qemu'/>
729+ <cpuid eax_in='0x8000000a' edx='0x00000400'/>
730+ </feature>
731+ <feature name='pfthreshold'>
732diff --git a/debian/patches/ubuntu/lp-2028057-08-add-missing-feature-sgx.patch b/debian/patches/ubuntu/lp-2028057-08-add-missing-feature-sgx.patch
733new file mode 100644
734index 0000000..b2a21bb
735--- /dev/null
736+++ b/debian/patches/ubuntu/lp-2028057-08-add-missing-feature-sgx.patch
737@@ -0,0 +1,236 @@
738+Description: Add cpu feature sgx.
739+ This patch adds the feature definition for SGX, and adds the feature to the
740+ relevant existing processors - i7-7700, i7-8550U, i7-8700, IceLake Server,
741+ Xeon E3-1225-v5, and Xeon E3-1245-v5.
742+Author: Tim Wiederhake <twiederh@redhat.com>
743+Origin: upstream, https://gitlab.com/libvirt/libvirt/-/commit/24b95e07d27d73576eca5d2852a10103b4e4d3d1
744+Bug-Ubuntu: https://launchpad.net/bugs/2028057
745+Forwarded: not-needed
746+Last-Update: 2023-11-29
747+---
748+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
749+--- a/src/cpu_map/x86_features.xml
750++++ b/src/cpu_map/x86_features.xml
751+@@ -209,6 +209,9 @@
752+ <alias name='tsc-adjust' source='qemu'/>
753+ <cpuid eax_in='0x07' ecx_in='0x00' ebx='0x00000002'/>
754+ </feature>
755++ <feature name='sgx'>
756++ <cpuid eax_in='0x07' ecx_in='0x00' ebx='0x00000004'/>
757++ </feature>
758+ <feature name='bmi1'>
759+ <cpuid eax_in='0x07' ecx_in='0x00' ebx='0x00000008'/>
760+ </feature>
761+--- a/tests/cputestdata/x86_64-cpuid-Core-i7-7600U-disabled.xml
762++++ b/tests/cputestdata/x86_64-cpuid-Core-i7-7600U-disabled.xml
763+@@ -1,6 +1,6 @@
764+ <!-- Features disabled by QEMU -->
765+ <cpudata arch='x86'>
766+ <cpuid eax_in='0x00000001' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x0800c1dc' edx='0xb0600000'/>
767+- <cpuid eax_in='0x00000007' ecx_in='0x00' eax='0x00000000' ebx='0x02000000' ecx='0x00000000' edx='0x08000000'/>
768++ <cpuid eax_in='0x00000007' ecx_in='0x00' eax='0x00000000' ebx='0x02000004' ecx='0x00000000' edx='0x08000000'/>
769+ <cpuid eax_in='0x80000007' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000100'/>
770+ </cpudata>
771+--- a/tests/cputestdata/x86_64-cpuid-Core-i7-7600U-guest.xml
772++++ b/tests/cputestdata/x86_64-cpuid-Core-i7-7600U-guest.xml
773+@@ -18,6 +18,7 @@
774+ <feature policy='require' name='pdcm'/>
775+ <feature policy='require' name='osxsave'/>
776+ <feature policy='require' name='tsc_adjust'/>
777++ <feature policy='require' name='sgx'/>
778+ <feature policy='require' name='clflushopt'/>
779+ <feature policy='require' name='intel-pt'/>
780+ <feature policy='require' name='stibp'/>
781+--- a/tests/cputestdata/x86_64-cpuid-Core-i7-7600U-host.xml
782++++ b/tests/cputestdata/x86_64-cpuid-Core-i7-7600U-host.xml
783+@@ -20,6 +20,7 @@
784+ <feature name='pdcm'/>
785+ <feature name='osxsave'/>
786+ <feature name='tsc_adjust'/>
787++ <feature name='sgx'/>
788+ <feature name='clflushopt'/>
789+ <feature name='intel-pt'/>
790+ <feature name='stibp'/>
791+--- a/tests/cputestdata/x86_64-cpuid-Core-i7-7700-disabled.xml
792++++ b/tests/cputestdata/x86_64-cpuid-Core-i7-7700-disabled.xml
793+@@ -1,7 +1,7 @@
794+ <!-- Features disabled by QEMU -->
795+ <cpudata arch='x86'>
796+ <cpuid eax_in='0x00000001' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x0800c1fc' edx='0xb0600000'/>
797+- <cpuid eax_in='0x00000007' ecx_in='0x00' eax='0x00000000' ebx='0x02000000' ecx='0x00000000' edx='0x00000000'/>
798++ <cpuid eax_in='0x00000007' ecx_in='0x00' eax='0x00000000' ebx='0x02000004' ecx='0x00000000' edx='0x00000000'/>
799+ <cpuid eax_in='0x0000000d' ecx_in='0x01' eax='0x00000008' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/>
800+ <cpuid eax_in='0x80000007' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000100'/>
801+ </cpudata>
802+--- a/tests/cputestdata/x86_64-cpuid-Core-i7-7700-guest.xml
803++++ b/tests/cputestdata/x86_64-cpuid-Core-i7-7700-guest.xml
804+@@ -18,6 +18,7 @@
805+ <feature policy='require' name='pdcm'/>
806+ <feature policy='require' name='osxsave'/>
807+ <feature policy='require' name='tsc_adjust'/>
808++ <feature policy='require' name='sgx'/>
809+ <feature policy='require' name='clflushopt'/>
810+ <feature policy='require' name='intel-pt'/>
811+ <feature policy='require' name='xsaves'/>
812+--- a/tests/cputestdata/x86_64-cpuid-Core-i7-7700-host.xml
813++++ b/tests/cputestdata/x86_64-cpuid-Core-i7-7700-host.xml
814+@@ -20,6 +20,7 @@
815+ <feature name='pdcm'/>
816+ <feature name='osxsave'/>
817+ <feature name='tsc_adjust'/>
818++ <feature name='sgx'/>
819+ <feature name='clflushopt'/>
820+ <feature name='intel-pt'/>
821+ <feature name='xsaves'/>
822+--- a/tests/cputestdata/x86_64-cpuid-Core-i7-8550U-disabled.xml
823++++ b/tests/cputestdata/x86_64-cpuid-Core-i7-8550U-disabled.xml
824+@@ -1,6 +1,6 @@
825+ <!-- Features disabled by QEMU -->
826+ <cpudata arch='x86'>
827+ <cpuid eax_in='0x00000001' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x0800c19c' edx='0xb0600000'/>
828+- <cpuid eax_in='0x00000007' ecx_in='0x00' eax='0x00000000' ebx='0x02000000' ecx='0x00000000' edx='0x00000000'/>
829++ <cpuid eax_in='0x00000007' ecx_in='0x00' eax='0x00000000' ebx='0x02000004' ecx='0x00000000' edx='0x00000000'/>
830+ <cpuid eax_in='0x80000007' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000100'/>
831+ </cpudata>
832+--- a/tests/cputestdata/x86_64-cpuid-Core-i7-8550U-guest.xml
833++++ b/tests/cputestdata/x86_64-cpuid-Core-i7-8550U-guest.xml
834+@@ -17,6 +17,7 @@
835+ <feature policy='require' name='pdcm'/>
836+ <feature policy='require' name='osxsave'/>
837+ <feature policy='require' name='tsc_adjust'/>
838++ <feature policy='require' name='sgx'/>
839+ <feature policy='require' name='clflushopt'/>
840+ <feature policy='require' name='intel-pt'/>
841+ <feature policy='require' name='md-clear'/>
842+--- a/tests/cputestdata/x86_64-cpuid-Core-i7-8550U-host.xml
843++++ b/tests/cputestdata/x86_64-cpuid-Core-i7-8550U-host.xml
844+@@ -19,6 +19,7 @@
845+ <feature name='pdcm'/>
846+ <feature name='osxsave'/>
847+ <feature name='tsc_adjust'/>
848++ <feature name='sgx'/>
849+ <feature name='clflushopt'/>
850+ <feature name='intel-pt'/>
851+ <feature name='md-clear'/>
852+--- a/tests/cputestdata/x86_64-cpuid-Core-i7-8700-disabled.xml
853++++ b/tests/cputestdata/x86_64-cpuid-Core-i7-8700-disabled.xml
854+@@ -1,6 +1,6 @@
855+ <!-- Features disabled by QEMU -->
856+ <cpudata arch='x86'>
857+ <cpuid eax_in='0x00000001' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x0800c1fc' edx='0xb0600000'/>
858+- <cpuid eax_in='0x00000007' ecx_in='0x00' eax='0x00000000' ebx='0x02000000' ecx='0x00000000' edx='0x08000000'/>
859++ <cpuid eax_in='0x00000007' ecx_in='0x00' eax='0x00000000' ebx='0x02000004' ecx='0x00000000' edx='0x08000000'/>
860+ <cpuid eax_in='0x80000007' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000100'/>
861+ </cpudata>
862+--- a/tests/cputestdata/x86_64-cpuid-Core-i7-8700-guest.xml
863++++ b/tests/cputestdata/x86_64-cpuid-Core-i7-8700-guest.xml
864+@@ -18,6 +18,7 @@
865+ <feature policy='require' name='pdcm'/>
866+ <feature policy='require' name='osxsave'/>
867+ <feature policy='require' name='tsc_adjust'/>
868++ <feature policy='require' name='sgx'/>
869+ <feature policy='require' name='clflushopt'/>
870+ <feature policy='require' name='intel-pt'/>
871+ <feature policy='require' name='stibp'/>
872+--- a/tests/cputestdata/x86_64-cpuid-Core-i7-8700-host.xml
873++++ b/tests/cputestdata/x86_64-cpuid-Core-i7-8700-host.xml
874+@@ -20,6 +20,7 @@
875+ <feature name='pdcm'/>
876+ <feature name='osxsave'/>
877+ <feature name='tsc_adjust'/>
878++ <feature name='sgx'/>
879+ <feature name='clflushopt'/>
880+ <feature name='intel-pt'/>
881+ <feature name='stibp'/>
882+--- a/tests/cputestdata/x86_64-cpuid-Ice-Lake-Server-disabled.xml
883++++ b/tests/cputestdata/x86_64-cpuid-Ice-Lake-Server-disabled.xml
884+@@ -1,7 +1,7 @@
885+ <!-- Features disabled by QEMU -->
886+ <cpudata arch='x86'>
887+ <cpuid eax_in='0x00000001' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x0804c1fc' edx='0xb0600000'/>
888+- <cpuid eax_in='0x00000007' ecx_in='0x00' eax='0x00000000' ebx='0x02001000' ecx='0x00400010' edx='0x00000010'/>
889++ <cpuid eax_in='0x00000007' ecx_in='0x00' eax='0x00000000' ebx='0x02001004' ecx='0x00400010' edx='0x00000010'/>
890+ <cpuid eax_in='0x0000000f' ecx_in='0x01' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000006'/>
891+ <cpuid eax_in='0x80000007' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000100'/>
892+ </cpudata>
893+--- a/tests/cputestdata/x86_64-cpuid-Ice-Lake-Server-guest.xml
894++++ b/tests/cputestdata/x86_64-cpuid-Ice-Lake-Server-guest.xml
895+@@ -19,6 +19,7 @@
896+ <feature policy='require' name='dca'/>
897+ <feature policy='require' name='osxsave'/>
898+ <feature policy='require' name='tsc_adjust'/>
899++ <feature policy='require' name='sgx'/>
900+ <feature policy='require' name='cmt'/>
901+ <feature policy='require' name='avx512ifma'/>
902+ <feature policy='require' name='intel-pt'/>
903+--- a/tests/cputestdata/x86_64-cpuid-Ice-Lake-Server-host.xml
904++++ b/tests/cputestdata/x86_64-cpuid-Ice-Lake-Server-host.xml
905+@@ -21,6 +21,7 @@
906+ <feature name='dca'/>
907+ <feature name='osxsave'/>
908+ <feature name='tsc_adjust'/>
909++ <feature name='sgx'/>
910+ <feature name='cmt'/>
911+ <feature name='avx512ifma'/>
912+ <feature name='intel-pt'/>
913+--- a/tests/cputestdata/x86_64-cpuid-Xeon-E3-1225-v5-disabled.xml
914++++ b/tests/cputestdata/x86_64-cpuid-Xeon-E3-1225-v5-disabled.xml
915+@@ -1,7 +1,7 @@
916+ <!-- Features disabled by QEMU -->
917+ <cpudata arch='x86'>
918+ <cpuid eax_in='0x00000001' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x0800c1fc' edx='0xb0600000'/>
919+- <cpuid eax_in='0x00000007' ecx_in='0x00' eax='0x00000000' ebx='0x02000000' ecx='0x00000000' edx='0x00000000'/>
920++ <cpuid eax_in='0x00000007' ecx_in='0x00' eax='0x00000000' ebx='0x02000004' ecx='0x00000000' edx='0x00000000'/>
921+ <cpuid eax_in='0x0000000d' ecx_in='0x01' eax='0x00000008' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/>
922+ <cpuid eax_in='0x80000007' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000100'/>
923+ </cpudata>
924+--- a/tests/cputestdata/x86_64-cpuid-Xeon-E3-1225-v5-guest.xml
925++++ b/tests/cputestdata/x86_64-cpuid-Xeon-E3-1225-v5-guest.xml
926+@@ -18,6 +18,7 @@
927+ <feature policy='require' name='pdcm'/>
928+ <feature policy='require' name='osxsave'/>
929+ <feature policy='require' name='tsc_adjust'/>
930++ <feature policy='require' name='sgx'/>
931+ <feature policy='require' name='clflushopt'/>
932+ <feature policy='require' name='intel-pt'/>
933+ <feature policy='require' name='md-clear'/>
934+--- a/tests/cputestdata/x86_64-cpuid-Xeon-E3-1225-v5-host.xml
935++++ b/tests/cputestdata/x86_64-cpuid-Xeon-E3-1225-v5-host.xml
936+@@ -20,6 +20,7 @@
937+ <feature name='pdcm'/>
938+ <feature name='osxsave'/>
939+ <feature name='tsc_adjust'/>
940++ <feature name='sgx'/>
941+ <feature name='clflushopt'/>
942+ <feature name='intel-pt'/>
943+ <feature name='md-clear'/>
944+--- a/tests/cputestdata/x86_64-cpuid-Xeon-E3-1245-v5-disabled.xml
945++++ b/tests/cputestdata/x86_64-cpuid-Xeon-E3-1245-v5-disabled.xml
946+@@ -1,6 +1,6 @@
947+ <!-- Features disabled by QEMU -->
948+ <cpudata arch='x86'>
949+ <cpuid eax_in='0x00000001' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x0800c1dc' edx='0xb0600000'/>
950+- <cpuid eax_in='0x00000007' ecx_in='0x00' eax='0x00000000' ebx='0x02000000' ecx='0x00000000' edx='0x00000000'/>
951++ <cpuid eax_in='0x00000007' ecx_in='0x00' eax='0x00000000' ebx='0x02000004' ecx='0x00000000' edx='0x00000000'/>
952+ <cpuid eax_in='0x80000007' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000100'/>
953+ </cpudata>
954+--- a/tests/cputestdata/x86_64-cpuid-Xeon-E3-1245-v5-guest.xml
955++++ b/tests/cputestdata/x86_64-cpuid-Xeon-E3-1245-v5-guest.xml
956+@@ -18,6 +18,7 @@
957+ <feature policy='require' name='pdcm'/>
958+ <feature policy='require' name='osxsave'/>
959+ <feature policy='require' name='tsc_adjust'/>
960++ <feature policy='require' name='sgx'/>
961+ <feature policy='require' name='clflushopt'/>
962+ <feature policy='require' name='intel-pt'/>
963+ <feature policy='require' name='xsaves'/>
964+--- a/tests/cputestdata/x86_64-cpuid-Xeon-E3-1245-v5-host.xml
965++++ b/tests/cputestdata/x86_64-cpuid-Xeon-E3-1245-v5-host.xml
966+@@ -20,6 +20,7 @@
967+ <feature name='pdcm'/>
968+ <feature name='osxsave'/>
969+ <feature name='tsc_adjust'/>
970++ <feature name='sgx'/>
971+ <feature name='clflushopt'/>
972+ <feature name='intel-pt'/>
973+ <feature name='xsaves'/>
974diff --git a/debian/patches/ubuntu/lp-2028057-09-add-missing-feature-sgxlc.patch b/debian/patches/ubuntu/lp-2028057-09-add-missing-feature-sgxlc.patch
975new file mode 100644
976index 0000000..497db74
977--- /dev/null
978+++ b/debian/patches/ubuntu/lp-2028057-09-add-missing-feature-sgxlc.patch
979@@ -0,0 +1,83 @@
980+Description: Add cpu feature sgxlc.
981+ This patch adds the feature definition for SGX LC, and adds the feature to the
982+ relevant existing processors - i7-8700 and IceLake Server.
983+Author: Tim Wiederhake <twiederh@redhat.com>
984+Origin: upstream, https://gitlab.com/libvirt/libvirt/-/commit/6e84509cde99bfa2e9854e0d2c38bfe2b13340c0
985+Bug-Ubuntu: https://launchpad.net/bugs/2028057
986+Forwarded: not-needed
987+Last-Update: 2023-11-29
988+---
989+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
990+--- a/src/cpu_map/x86_features.xml
991++++ b/src/cpu_map/x86_features.xml
992+@@ -343,6 +343,9 @@
993+ <feature name='movdir64b'>
994+ <cpuid eax_in='0x07' ecx_in='0x00' ecx='0x10000000'/>
995+ </feature>
996++ <feature name='sgxlc'>
997++ <cpuid eax_in='0x07' ecx_in='0x00' ecx='0x40000000'/>
998++ </feature>
999+
1000+ <feature name='avx512-4vnniw'>
1001+ <cpuid eax_in='0x07' ecx_in='0x00' edx='0x00000004'/>
1002+--- a/tests/cputestdata/x86_64-cpuid-Core-i7-8700-disabled.xml
1003++++ b/tests/cputestdata/x86_64-cpuid-Core-i7-8700-disabled.xml
1004+@@ -1,6 +1,6 @@
1005+ <!-- Features disabled by QEMU -->
1006+ <cpudata arch='x86'>
1007+ <cpuid eax_in='0x00000001' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x0800c1fc' edx='0xb0600000'/>
1008+- <cpuid eax_in='0x00000007' ecx_in='0x00' eax='0x00000000' ebx='0x02000004' ecx='0x00000000' edx='0x08000000'/>
1009++ <cpuid eax_in='0x00000007' ecx_in='0x00' eax='0x00000000' ebx='0x02000004' ecx='0x40000000' edx='0x08000000'/>
1010+ <cpuid eax_in='0x80000007' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000100'/>
1011+ </cpudata>
1012+--- a/tests/cputestdata/x86_64-cpuid-Core-i7-8700-guest.xml
1013++++ b/tests/cputestdata/x86_64-cpuid-Core-i7-8700-guest.xml
1014+@@ -21,6 +21,7 @@
1015+ <feature policy='require' name='sgx'/>
1016+ <feature policy='require' name='clflushopt'/>
1017+ <feature policy='require' name='intel-pt'/>
1018++ <feature policy='require' name='sgxlc'/>
1019+ <feature policy='require' name='stibp'/>
1020+ <feature policy='require' name='ssbd'/>
1021+ <feature policy='require' name='xsaves'/>
1022+--- a/tests/cputestdata/x86_64-cpuid-Core-i7-8700-host.xml
1023++++ b/tests/cputestdata/x86_64-cpuid-Core-i7-8700-host.xml
1024+@@ -23,6 +23,7 @@
1025+ <feature name='sgx'/>
1026+ <feature name='clflushopt'/>
1027+ <feature name='intel-pt'/>
1028++ <feature name='sgxlc'/>
1029+ <feature name='stibp'/>
1030+ <feature name='ssbd'/>
1031+ <feature name='xsaves'/>
1032+--- a/tests/cputestdata/x86_64-cpuid-Ice-Lake-Server-disabled.xml
1033++++ b/tests/cputestdata/x86_64-cpuid-Ice-Lake-Server-disabled.xml
1034+@@ -1,7 +1,7 @@
1035+ <!-- Features disabled by QEMU -->
1036+ <cpudata arch='x86'>
1037+ <cpuid eax_in='0x00000001' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x0804c1fc' edx='0xb0600000'/>
1038+- <cpuid eax_in='0x00000007' ecx_in='0x00' eax='0x00000000' ebx='0x02001004' ecx='0x00400010' edx='0x00000010'/>
1039++ <cpuid eax_in='0x00000007' ecx_in='0x00' eax='0x00000000' ebx='0x02001004' ecx='0x40400010' edx='0x00000010'/>
1040+ <cpuid eax_in='0x0000000f' ecx_in='0x01' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000006'/>
1041+ <cpuid eax_in='0x80000007' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000100'/>
1042+ </cpudata>
1043+--- a/tests/cputestdata/x86_64-cpuid-Ice-Lake-Server-guest.xml
1044++++ b/tests/cputestdata/x86_64-cpuid-Ice-Lake-Server-guest.xml
1045+@@ -26,6 +26,7 @@
1046+ <feature policy='require' name='sha-ni'/>
1047+ <feature policy='require' name='ospke'/>
1048+ <feature policy='require' name='rdpid'/>
1049++ <feature policy='require' name='sgxlc'/>
1050+ <feature policy='require' name='fsrm'/>
1051+ <feature policy='require' name='stibp'/>
1052+ <feature policy='require' name='arch-capabilities'/>
1053+--- a/tests/cputestdata/x86_64-cpuid-Ice-Lake-Server-host.xml
1054++++ b/tests/cputestdata/x86_64-cpuid-Ice-Lake-Server-host.xml
1055+@@ -28,6 +28,7 @@
1056+ <feature name='sha-ni'/>
1057+ <feature name='ospke'/>
1058+ <feature name='rdpid'/>
1059++ <feature name='sgxlc'/>
1060+ <feature name='fsrm'/>
1061+ <feature name='stibp'/>
1062+ <feature name='arch-capabilities'/>
1063diff --git a/debian/patches/ubuntu/lp-2028057-10-add-missing-feature-sgx-exinfo.patch b/debian/patches/ubuntu/lp-2028057-10-add-missing-feature-sgx-exinfo.patch
1064new file mode 100644
1065index 0000000..c7c1b5a
1066--- /dev/null
1067+++ b/debian/patches/ubuntu/lp-2028057-10-add-missing-feature-sgx-exinfo.patch
1068@@ -0,0 +1,22 @@
1069+Description: Add cpu feature sgx-exinfo.
1070+Author: Tim Wiederhake <twiederh@redhat.com>
1071+Origin: upstream, https://gitlab.com/libvirt/libvirt/-/commit/4b5c9678d17f135e77ddab7c2643949fb2408048
1072+Bug-Ubuntu: https://launchpad.net/bugs/2028057
1073+Forwarded: not-needed
1074+Last-Update: 2023-11-29
1075+---
1076+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
1077+--- a/src/cpu_map/x86_features.xml
1078++++ b/src/cpu_map/x86_features.xml
1079+@@ -418,6 +418,11 @@
1080+ <cpuid eax_in='0x0f' ecx_in='0x01' edx='0x00000004'/>
1081+ </feature>
1082+
1083++ <!-- cpuid level 0x00000012 ecx 0x0 features -->
1084++ <feature name='sgx-exinfo'>
1085++ <cpuid eax_in='0x12' ecx_in='0x00' ebx='0x00000001'/>
1086++ </feature>
1087++
1088+ <!-- extended features, EDX -->
1089+ <feature name='syscall'>
1090+ <cpuid eax_in='0x80000001' edx='0x00000800'/>
1091diff --git a/debian/patches/ubuntu/lp-2028057-11-add-missing-feature-sgx1.patch b/debian/patches/ubuntu/lp-2028057-11-add-missing-feature-sgx1.patch
1092new file mode 100644
1093index 0000000..356703c
1094--- /dev/null
1095+++ b/debian/patches/ubuntu/lp-2028057-11-add-missing-feature-sgx1.patch
1096@@ -0,0 +1,21 @@
1097+Description: Add cpu feature sgx1.
1098+Author: Tim Wiederhake <twiederh@redhat.com>
1099+Origin: upstream, https://gitlab.com/libvirt/libvirt/-/commit/5d9cabd0c7f67f4a7a4d21bb965ce1167ae02945
1100+Bug-Ubuntu: https://launchpad.net/bugs/2028057
1101+Forwarded: not-needed
1102+Last-Update: 2023-11-29
1103+---
1104+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
1105+--- a/src/cpu_map/x86_features.xml
1106++++ b/src/cpu_map/x86_features.xml
1107+@@ -419,6 +419,10 @@
1108+ </feature>
1109+
1110+ <!-- cpuid level 0x00000012 ecx 0x0 features -->
1111++ <feature name='sgx1'>
1112++ <cpuid eax_in='0x12' ecx_in='0x00' eax='0x00000001'/>
1113++ </feature>
1114++
1115+ <feature name='sgx-exinfo'>
1116+ <cpuid eax_in='0x12' ecx_in='0x00' ebx='0x00000001'/>
1117+ </feature>
1118diff --git a/debian/patches/ubuntu/lp-2028057-12-add-missing-feature-sgx2.patch b/debian/patches/ubuntu/lp-2028057-12-add-missing-feature-sgx2.patch
1119new file mode 100644
1120index 0000000..6dba3c6
1121--- /dev/null
1122+++ b/debian/patches/ubuntu/lp-2028057-12-add-missing-feature-sgx2.patch
1123@@ -0,0 +1,20 @@
1124+Description: Add cpu feature sgx2.
1125+Author: Tim Wiederhake <twiederh@redhat.com>
1126+Origin: upstream, https://gitlab.com/libvirt/libvirt/-/commit/4b5c9678d17f135e77ddab7c2643949fb2408048
1127+Bug-Ubuntu: https://launchpad.net/bugs/2028057
1128+Forwarded: not-needed
1129+Last-Update: 2023-11-29
1130+---
1131+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
1132+--- a/src/cpu_map/x86_features.xml
1133++++ b/src/cpu_map/x86_features.xml
1134+@@ -422,6 +422,9 @@
1135+ <feature name='sgx1'>
1136+ <cpuid eax_in='0x12' ecx_in='0x00' eax='0x00000001'/>
1137+ </feature>
1138++ <feature name='sgx2'>
1139++ <cpuid eax_in='0x12' ecx_in='0x00' eax='0x00000002'/>
1140++ </feature>
1141+
1142+ <feature name='sgx-exinfo'>
1143+ <cpuid eax_in='0x12' ecx_in='0x00' ebx='0x00000001'/>
1144diff --git a/debian/patches/ubuntu/lp-2028057-13-add-missing-feature-sgx-additional.patch b/debian/patches/ubuntu/lp-2028057-13-add-missing-feature-sgx-additional.patch
1145new file mode 100644
1146index 0000000..6bcd7df
1147--- /dev/null
1148+++ b/debian/patches/ubuntu/lp-2028057-13-add-missing-feature-sgx-additional.patch
1149@@ -0,0 +1,36 @@
1150+Description: Add additional sgx-related features.
1151+ Add additional sgx features - sgx-debug, sgx-mode64, sgx-provisionkey,
1152+ sgx-tokenkey, and sgx-kss.
1153+Author: Tim Wiederhake <twiederh@redhat.com>
1154+Origin: upstream, https://gitlab.com/libvirt/libvirt/-/commit/e864f3b50a3ca57b0ebb33677b94e1da638147d9
1155+Bug-Ubuntu: https://launchpad.net/bugs/2028057
1156+Forwarded: not-needed
1157+Last-Update: 2023-11-29
1158+---
1159+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
1160+--- a/src/cpu_map/x86_features.xml
1161++++ b/src/cpu_map/x86_features.xml
1162+@@ -430,6 +430,23 @@
1163+ <cpuid eax_in='0x12' ecx_in='0x00' ebx='0x00000001'/>
1164+ </feature>
1165+
1166++ <!-- cpuid level 0x00000012 ecx 0x1 features -->
1167++ <feature name='sgx-debug'>
1168++ <cpuid eax_in='0x12' ecx_in='0x01' eax='0x00000002'/>
1169++ </feature>
1170++ <feature name='sgx-mode64'>
1171++ <cpuid eax_in='0x12' ecx_in='0x01' eax='0x00000004'/>
1172++ </feature>
1173++ <feature name='sgx-provisionkey'>
1174++ <cpuid eax_in='0x12' ecx_in='0x01' eax='0x00000010'/>
1175++ </feature>
1176++ <feature name='sgx-tokenkey'>
1177++ <cpuid eax_in='0x12' ecx_in='0x01' eax='0x00000020'/>
1178++ </feature>
1179++ <feature name='sgx-kss'>
1180++ <cpuid eax_in='0x12' ecx_in='0x01' eax='0x00000080'/>
1181++ </feature>
1182++
1183+ <!-- extended features, EDX -->
1184+ <feature name='syscall'>
1185+ <cpuid eax_in='0x80000001' edx='0x00000800'/>
1186diff --git a/debian/patches/ubuntu/lp-2028057-14-add-missing-feature-bus-lock-detect.patch b/debian/patches/ubuntu/lp-2028057-14-add-missing-feature-bus-lock-detect.patch
1187new file mode 100644
1188index 0000000..ba00ffa
1189--- /dev/null
1190+++ b/debian/patches/ubuntu/lp-2028057-14-add-missing-feature-bus-lock-detect.patch
1191@@ -0,0 +1,20 @@
1192+Description: Add cpu feature bus-lock-detect.
1193+Author: Tim Wiederhake <twiederh@redhat.com>
1194+Origin: upstream, https://gitlab.com/libvirt/libvirt/-/commit/1f3cd74e4a8770ed69af0241c600c62a3f3ddb22
1195+Bug-Ubuntu: https://launchpad.net/bugs/2028057
1196+Forwarded: not-needed
1197+Last-Update: 2023-11-29
1198+---
1199+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
1200+--- a/src/cpu_map/x86_features.xml
1201++++ b/src/cpu_map/x86_features.xml
1202+@@ -334,6 +334,9 @@
1203+ <feature name='rdpid'>
1204+ <cpuid eax_in='0x07' ecx_in='0x00' ecx='0x00400000'/>
1205+ </feature>
1206++ <feature name='bus-lock-detect'>
1207++ <cpuid eax_in='0x07' ecx_in='0x00' ecx='0x01000000'/>
1208++ </feature>
1209+ <feature name='cldemote'>
1210+ <cpuid eax_in='0x07' ecx_in='0x00' ecx='0x02000000'/>
1211+ </feature>
1212diff --git a/debian/patches/ubuntu/lp-2028057-15-add-missing-feature-pks.patch b/debian/patches/ubuntu/lp-2028057-15-add-missing-feature-pks.patch
1213new file mode 100644
1214index 0000000..eafdfcc
1215--- /dev/null
1216+++ b/debian/patches/ubuntu/lp-2028057-15-add-missing-feature-pks.patch
1217@@ -0,0 +1,52 @@
1218+Description: Add cpu feature pks.
1219+ Add the pks feature definition along with its entries in QEMU feature lists,
1220+ ignoring the 7.* entries from this commit upstream.
1221+Author: Tim Wiederhake <twiederh@redhat.com>
1222+Origin: backport, https://gitlab.com/libvirt/libvirt/-/commit/40d6a6d98702452df7c034bfe81e3a334f0f8e45
1223+Bug-Ubuntu: https://launchpad.net/bugs/2028057
1224+Forwarded: not-needed
1225+Last-Update: 2023-11-29
1226+---
1227+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
1228+--- a/src/cpu_map/x86_features.xml
1229++++ b/src/cpu_map/x86_features.xml
1230+@@ -349,6 +349,9 @@
1231+ <feature name='sgxlc'>
1232+ <cpuid eax_in='0x07' ecx_in='0x00' ecx='0x40000000'/>
1233+ </feature>
1234++ <feature name='pks'>
1235++ <cpuid eax_in='0x07' ecx_in='0x00' ecx='0x80000000'/>
1236++ </feature>
1237+
1238+ <feature name='avx512-4vnniw'>
1239+ <cpuid eax_in='0x07' ecx_in='0x00' edx='0x00000004'/>
1240+--- a/tests/domaincapsdata/qemu_6.0.0-tcg.x86_64.xml
1241++++ b/tests/domaincapsdata/qemu_6.0.0-tcg.x86_64.xml
1242+@@ -48,6 +48,7 @@
1243+ <feature policy='require' name='clwb'/>
1244+ <feature policy='require' name='pku'/>
1245+ <feature policy='require' name='la57'/>
1246++ <feature policy='require' name='pks'/>
1247+ <feature policy='require' name='3dnowext'/>
1248+ <feature policy='require' name='3dnow'/>
1249+ <feature policy='require' name='npt'/>
1250+--- a/tests/domaincapsdata/qemu_6.1.0-tcg.x86_64.xml
1251++++ b/tests/domaincapsdata/qemu_6.1.0-tcg.x86_64.xml
1252+@@ -48,6 +48,7 @@
1253+ <feature policy='require' name='clwb'/>
1254+ <feature policy='require' name='pku'/>
1255+ <feature policy='require' name='la57'/>
1256++ <feature policy='require' name='pks'/>
1257+ <feature policy='require' name='3dnowext'/>
1258+ <feature policy='require' name='3dnow'/>
1259+ <feature policy='require' name='npt'/>
1260+--- a/tests/domaincapsdata/qemu_6.2.0-tcg.x86_64.xml
1261++++ b/tests/domaincapsdata/qemu_6.2.0-tcg.x86_64.xml
1262+@@ -48,6 +48,7 @@
1263+ <feature policy='require' name='clwb'/>
1264+ <feature policy='require' name='pku'/>
1265+ <feature policy='require' name='la57'/>
1266++ <feature policy='require' name='pks'/>
1267+ <feature policy='require' name='3dnowext'/>
1268+ <feature policy='require' name='3dnow'/>
1269+ <feature policy='require' name='npt'/>
1270diff --git a/debian/patches/ubuntu/lp-2028057-16-add-missing-feature-avx512-vp2intersect.patch b/debian/patches/ubuntu/lp-2028057-16-add-missing-feature-avx512-vp2intersect.patch
1271new file mode 100644
1272index 0000000..eb264bf
1273--- /dev/null
1274+++ b/debian/patches/ubuntu/lp-2028057-16-add-missing-feature-avx512-vp2intersect.patch
1275@@ -0,0 +1,20 @@
1276+Description: Add cpu feature avx512-vp2intersect.
1277+Author: Tim Wiederhake <twiederh@redhat.com>
1278+Origin: upstream, https://gitlab.com/libvirt/libvirt/-/commit/3306c6ded067c79ea96cbf1b59d8001560448230
1279+Bug-Ubuntu: https://launchpad.net/bugs/2028057
1280+Forwarded: not-needed
1281+Last-Update: 2023-11-29
1282+---
1283+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
1284+--- a/src/cpu_map/x86_features.xml
1285++++ b/src/cpu_map/x86_features.xml
1286+@@ -362,6 +362,9 @@
1287+ <feature name='fsrm'>
1288+ <cpuid eax_in='0x07' ecx_in='0x00' edx='0x00000010'/>
1289+ </feature>
1290++ <feature name='avx512-vp2intersect'>
1291++ <cpuid eax_in='0x07' ecx_in='0x00' edx='0x00000100'/>
1292++ </feature>
1293+ <feature name='md-clear'>
1294+ <alias name='md_clear' source='linux'/>
1295+ <cpuid eax_in='0x07' ecx_in='0x00' edx='0x00000400'/>
1296diff --git a/debian/patches/ubuntu/lp-2028057-17-add-missing-feature-avx512-fp16.patch b/debian/patches/ubuntu/lp-2028057-17-add-missing-feature-avx512-fp16.patch
1297new file mode 100644
1298index 0000000..2b0700f
1299--- /dev/null
1300+++ b/debian/patches/ubuntu/lp-2028057-17-add-missing-feature-avx512-fp16.patch
1301@@ -0,0 +1,20 @@
1302+Description: Add cpu feature avx512-fp16.
1303+Author: Tim Wiederhake <twiederh@redhat.com>
1304+Origin: upstream, https://gitlab.com/libvirt/libvirt/-/commit/18ebce7c5320e200a2b2c4a256d02ab087d2bac5
1305+Bug-Ubuntu: https://launchpad.net/bugs/2028057
1306+Forwarded: not-needed
1307+Last-Update: 2023-11-29
1308+---
1309+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
1310+--- a/src/cpu_map/x86_features.xml
1311++++ b/src/cpu_map/x86_features.xml
1312+@@ -375,6 +375,9 @@
1313+ <feature name='amx-bf16'>
1314+ <cpuid eax_in='0x07' ecx_in='0x00' edx='0x00400000'/>
1315+ </feature>
1316++ <feature name='avx512-fp16'>
1317++ <cpuid eax_in='0x07' ecx_in='0x00' edx='0x00800000'/>
1318++ </feature>
1319+ <feature name='amx-tile'>
1320+ <cpuid eax_in='0x07' ecx_in='0x00' edx='0x01000000'/>
1321+ </feature>
1322diff --git a/debian/patches/ubuntu/lp-2028057-18-add-missing-feature-serialize.patch b/debian/patches/ubuntu/lp-2028057-18-add-missing-feature-serialize.patch
1323new file mode 100644
1324index 0000000..aa8c587
1325--- /dev/null
1326+++ b/debian/patches/ubuntu/lp-2028057-18-add-missing-feature-serialize.patch
1327@@ -0,0 +1,20 @@
1328+Description: Add cpu feature serialize.
1329+Author: Tim Wiederhake <twiederh@redhat.com>
1330+Origin: upstream, https://gitlab.com/libvirt/libvirt/-/commit/3f73c3c4fbcd81f3a7e29f3bffa9e3b55f39f041
1331+Bug-Ubuntu: https://launchpad.net/bugs/2028057
1332+Forwarded: not-needed
1333+Last-Update: 2023-11-29
1334+---
1335+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
1336+--- a/src/cpu_map/x86_features.xml
1337++++ b/src/cpu_map/x86_features.xml
1338+@@ -369,6 +369,9 @@
1339+ <alias name='md_clear' source='linux'/>
1340+ <cpuid eax_in='0x07' ecx_in='0x00' edx='0x00000400'/>
1341+ </feature>
1342++ <feature name='serialize'>
1343++ <cpuid eax_in='0x07' ecx_in='0x00' edx='0x00004000'/>
1344++ </feature>
1345+ <feature name='pconfig'>
1346+ <cpuid eax_in='0x07' ecx_in='0x00' edx='0x00040000'/>
1347+ </feature>
1348diff --git a/debian/patches/ubuntu/lp-2028057-19-add-missing-feature-tsx-ldtrk.patch b/debian/patches/ubuntu/lp-2028057-19-add-missing-feature-tsx-ldtrk.patch
1349new file mode 100644
1350index 0000000..db71f0c
1351--- /dev/null
1352+++ b/debian/patches/ubuntu/lp-2028057-19-add-missing-feature-tsx-ldtrk.patch
1353@@ -0,0 +1,20 @@
1354+Description: Add cpu feature tsx-ldtrk.
1355+Author: Tim Wiederhake <twiederh@redhat.com>
1356+Origin: upstream, https://gitlab.com/libvirt/libvirt/-/commit/1e309109677f192a1dc47ef0a2fc16b31450f129
1357+Bug-Ubuntu: https://launchpad.net/bugs/2028057
1358+Forwarded: not-needed
1359+Last-Update: 2023-11-29
1360+---
1361+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
1362+--- a/src/cpu_map/x86_features.xml
1363++++ b/src/cpu_map/x86_features.xml
1364+@@ -372,6 +372,9 @@
1365+ <feature name='serialize'>
1366+ <cpuid eax_in='0x07' ecx_in='0x00' edx='0x00004000'/>
1367+ </feature>
1368++ <feature name='tsx-ldtrk'>
1369++ <cpuid eax_in='0x07' ecx_in='0x00' edx='0x00010000'/>
1370++ </feature>
1371+ <feature name='pconfig'>
1372+ <cpuid eax_in='0x07' ecx_in='0x00' edx='0x00040000'/>
1373+ </feature>
1374diff --git a/debian/patches/ubuntu/lp-2028057-20-add-missing-feature-arch-lbr.patch b/debian/patches/ubuntu/lp-2028057-20-add-missing-feature-arch-lbr.patch
1375new file mode 100644
1376index 0000000..a82f9c5
1377--- /dev/null
1378+++ b/debian/patches/ubuntu/lp-2028057-20-add-missing-feature-arch-lbr.patch
1379@@ -0,0 +1,20 @@
1380+Description: Add cpu feature arch-lbr.
1381+Author: Tim Wiederhake <twiederh@redhat.com>
1382+Origin: upstream, https://gitlab.com/libvirt/libvirt/-/commit/4ba1e382f7d5aeb650a9bf367cd760ac824e2171
1383+Bug-Ubuntu: https://launchpad.net/bugs/2028057
1384+Forwarded: not-needed
1385+Last-Update: 2023-11-29
1386+---
1387+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
1388+--- a/src/cpu_map/x86_features.xml
1389++++ b/src/cpu_map/x86_features.xml
1390+@@ -378,6 +378,9 @@
1391+ <feature name='pconfig'>
1392+ <cpuid eax_in='0x07' ecx_in='0x00' edx='0x00040000'/>
1393+ </feature>
1394++ <feature name='arch-lbr'>
1395++ <cpuid eax_in='0x07' ecx_in='0x00' edx='0x00080000'/>
1396++ </feature>
1397+ <feature name='amx-bf16'>
1398+ <cpuid eax_in='0x07' ecx_in='0x00' edx='0x00400000'/>
1399+ </feature>
1400diff --git a/debian/patches/ubuntu/lp-2028057-21-add-missing-feature-xfd.patch b/debian/patches/ubuntu/lp-2028057-21-add-missing-feature-xfd.patch
1401new file mode 100644
1402index 0000000..87cecf1
1403--- /dev/null
1404+++ b/debian/patches/ubuntu/lp-2028057-21-add-missing-feature-xfd.patch
1405@@ -0,0 +1,20 @@
1406+Description: Add cpu feature xfd.
1407+Author: Tim Wiederhake <twiederh@redhat.com>
1408+Origin: upstream, https://gitlab.com/libvirt/libvirt/-/commit/29b0b9bb0eb966f9c49b78b97101c6623306a39a
1409+Bug-Ubuntu: https://launchpad.net/bugs/2028057
1410+Forwarded: not-needed
1411+Last-Update: 2023-11-29
1412+---
1413+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
1414+--- a/src/cpu_map/x86_features.xml
1415++++ b/src/cpu_map/x86_features.xml
1416+@@ -430,6 +430,9 @@
1417+ <feature name='xsaves' migratable='no'>
1418+ <cpuid eax_in='0x0d' ecx_in='0x01' eax='0x00000008'/>
1419+ </feature>
1420++ <feature name='xfd'>
1421++ <cpuid eax_in='0x0d' ecx_in='0x01' eax='0x00000010'/>
1422++ </feature>
1423+
1424+ <!-- cpuid level 0x0000000f:1 (edx) -->
1425+ <feature name='mbm_total'>
1426diff --git a/debian/patches/ubuntu/lp-2028057-22-add-missing-feature-intel-pt-lip.patch b/debian/patches/ubuntu/lp-2028057-22-add-missing-feature-intel-pt-lip.patch
1427new file mode 100644
1428index 0000000..5dd6160
1429--- /dev/null
1430+++ b/debian/patches/ubuntu/lp-2028057-22-add-missing-feature-intel-pt-lip.patch
1431@@ -0,0 +1,54 @@
1432+Description: Add cpu feature intel-pt-lip.
1433+ This patch adds the feature definition for Intel pt-lip, and adds the feature
1434+ to the Intel Atom P5362 processor.
1435+Author: Tim Wiederhake <twiederh@redhat.com>
1436+Origin: upstream, https://gitlab.com/libvirt/libvirt/-/commit/501e7c780bbec6eddd8bc7bcb13fdafba94c5358
1437+Bug-Ubuntu: https://launchpad.net/bugs/2028057
1438+Forwarded: not-needed
1439+Last-Update: 2023-11-29
1440+---
1441+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
1442+--- a/src/cpu_map/x86_features.xml
1443++++ b/src/cpu_map/x86_features.xml
1444+@@ -471,6 +471,11 @@
1445+ <cpuid eax_in='0x12' ecx_in='0x01' eax='0x00000080'/>
1446+ </feature>
1447+
1448++ <!-- cpuid level 0x00000014 ecx 0x0 features -->
1449++ <feature name='intel-pt-lip'>
1450++ <cpuid eax_in='0x14' ecx_in='0x00' ecx='0x80000000'/>
1451++ </feature>
1452++
1453+ <!-- extended features, EDX -->
1454+ <feature name='syscall'>
1455+ <cpuid eax_in='0x80000001' edx='0x00000800'/>
1456+--- a/tests/cputestdata/x86_64-cpuid-Atom-P5362-disabled.xml
1457++++ b/tests/cputestdata/x86_64-cpuid-Atom-P5362-disabled.xml
1458+@@ -3,6 +3,7 @@
1459+ <cpuid eax_in='0x00000001' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x080041dc' edx='0xb0600000'/>
1460+ <cpuid eax_in='0x00000007' ecx_in='0x00' eax='0x00000000' ebx='0x02001000' ecx='0x00000020' edx='0x40000000'/>
1461+ <cpuid eax_in='0x0000000f' ecx_in='0x01' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000006'/>
1462++ <cpuid eax_in='0x00000014' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x80000000' edx='0x00000000'/>
1463+ <cpuid eax_in='0x80000007' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000100'/>
1464+ <msr index='0xcf' edx='0x00000000' eax='0x00000020'/>
1465+ <msr index='0x10a' edx='0x00000000' eax='0x00000100'/>
1466+--- a/tests/cputestdata/x86_64-cpuid-Atom-P5362-guest.xml
1467++++ b/tests/cputestdata/x86_64-cpuid-Atom-P5362-guest.xml
1468+@@ -27,6 +27,7 @@
1469+ <feature policy='require' name='xsaves'/>
1470+ <feature policy='require' name='mbm_total'/>
1471+ <feature policy='require' name='mbm_local'/>
1472++ <feature policy='require' name='intel-pt-lip'/>
1473+ <feature policy='require' name='invtsc'/>
1474+ <feature policy='require' name='rdctl-no'/>
1475+ <feature policy='require' name='ibrs-all'/>
1476+--- a/tests/cputestdata/x86_64-cpuid-Atom-P5362-host.xml
1477++++ b/tests/cputestdata/x86_64-cpuid-Atom-P5362-host.xml
1478+@@ -56,6 +56,7 @@
1479+ <feature name='xsaves'/>
1480+ <feature name='mbm_total'/>
1481+ <feature name='mbm_local'/>
1482++ <feature name='intel-pt-lip'/>
1483+ <feature name='rdtscp'/>
1484+ <feature name='3dnowprefetch'/>
1485+ <feature name='invtsc'/>
1486diff --git a/debian/patches/ubuntu/lp-2028057-23-add-new-CPU-model-Intel-SapphireRapids.patch b/debian/patches/ubuntu/lp-2028057-23-add-new-CPU-model-Intel-SapphireRapids.patch
1487new file mode 100644
1488index 0000000..30085cd
1489--- /dev/null
1490+++ b/debian/patches/ubuntu/lp-2028057-23-add-new-CPU-model-Intel-SapphireRapids.patch
1491@@ -0,0 +1,310 @@
1492+Description: Add new CPU model SapphireRapids
1493+ The new CPU model mostly inherits features from Icelake-Server, while
1494+ adding new features:
1495+ - AMX (Advance Matrix eXtensions)
1496+ - Bus Lock Debug Exception
1497+ and new instructions:
1498+ - AVX VNNI (Vector Neural Network Instruction):
1499+ - VPDPBUS: Multiply and Add Unsigned and Signed Bytes
1500+ - VPDPBUSDS: Multiply and Add Unsigned and Signed Bytes with Saturation
1501+ - VPDPWSSD: Multiply and Add Signed Word Integers
1502+ - VPDPWSSDS: Multiply and Add Signed Integers with Saturation
1503+ - FP16: Replicates existing AVX512 computational SP (FP32) instructions
1504+ using FP16 instead of FP32 for ~2X performance gain
1505+ - SERIALIZE: Provide software with a simple way to force the processor to
1506+ complete all modifications, faster, allowed in all privilege levels and
1507+ not causing an unconditional VM exit
1508+ - TSX Suspend Load Address Tracking: Allows programmers to choose which
1509+ memory accesses do not need to be tracked in the TSX read set
1510+ - AVX512_BF16: Vector Neural Network Instructions supporting BFLOAT16
1511+ inputs and conversion instructions from IEEE single precision
1512+Author: Wang, Lei <lei4.wang@intel.com>
1513+Origin: other, https://lore.kernel.org/all/20220812055751.14553-1-lei4.wang@intel.com/
1514+Bug-Ubuntu: https://launchpad.net/bugs/2028057
1515+Forwarded: not-needed
1516+Last-Update: 2023-11-29
1517+---
1518+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
1519+--- a/src/cpu_map/index.xml
1520++++ b/src/cpu_map/index.xml
1521+@@ -56,6 +56,8 @@
1522+ <include filename='x86_Icelake-Server-noTSX.xml'/>
1523+ <include filename='x86_Cooperlake.xml'/>
1524+ <include filename='x86_Snowridge.xml'/>
1525++ <include filename='x86_SapphireRapids.xml'/>
1526++ <include filename='x86_SapphireRapids-noTSX.xml'/>
1527+
1528+ <!-- AMD CPUs -->
1529+ <include filename='x86_athlon.xml'/>
1530+--- a/src/cpu_map/meson.build
1531++++ b/src/cpu_map/meson.build
1532+@@ -67,6 +67,8 @@
1533+ 'x86_qemu64.xml',
1534+ 'x86_SandyBridge-IBRS.xml',
1535+ 'x86_SandyBridge.xml',
1536++ 'x86_SapphireRapids.xml',
1537++ 'x86_SapphireRapids-noTSX.xml',
1538+ 'x86_Skylake-Client-IBRS.xml',
1539+ 'x86_Skylake-Client-noTSX-IBRS.xml',
1540+ 'x86_Skylake-Client.xml',
1541+--- a/src/cpu_map/sync_qemu_models_i386.py
1542++++ b/src/cpu_map/sync_qemu_models_i386.py
1543+@@ -54,6 +54,7 @@
1544+ "CPUID_7_0_ECX_AVX512_VBMI": "avx512vbmi",
1545+ "CPUID_7_0_ECX_AVX512VNNI": "avx512vnni",
1546+ "CPUID_7_0_ECX_AVX512_VPOPCNTDQ": "avx512-vpopcntdq",
1547++ "CPUID_7_0_ECX_BUS_LOCK_DETECT": "bus-lock-detect",
1548+ "CPUID_7_0_ECX_CLDEMOTE": "cldemote",
1549+ "CPUID_7_0_ECX_GFNI": "gfni",
1550+ "CPUID_7_0_ECX_LA57": "la57",
1551+@@ -67,16 +68,20 @@
1552+ "CPUID_7_0_EDX_ARCH_CAPABILITIES": "arch-capabilities",
1553+ "CPUID_7_0_EDX_AVX512_4FMAPS": "avx512-4fmaps",
1554+ "CPUID_7_0_EDX_AVX512_4VNNIW": "avx512-4vnniw",
1555++ "CPUID_7_0_EDX_AVX512_FP16": "avx512-fp16",
1556+ "CPUID_7_0_EDX_CORE_CAPABILITY": "core-capability",
1557+ "CPUID_7_0_EDX_FSRM": "fsrm",
1558++ "CPUID_7_0_EDX_SERIALIZE": "serialize",
1559+ "CPUID_7_0_EDX_SPEC_CTRL": "spec-ctrl",
1560+ "CPUID_7_0_EDX_SPEC_CTRL_SSBD": "ssbd",
1561+ "CPUID_7_0_EDX_STIBP": "stibp",
1562++ "CPUID_7_0_EDX_TSX_LDTRK": "tsx-ldtrk",
1563+ "CPUID_7_0_EDX_AMX_BF16": "amx-bf16",
1564+ "CPUID_7_0_EDX_AMX_TILE": "amx-tile",
1565+ "CPUID_7_0_EDX_AMX_INT8": "amx-int8",
1566+ "CPUID_7_1_EAX_AVX512_BF16": "avx512-bf16",
1567+ "CPUID_7_1_EAX_AVX_VNNI": "avx-vnni",
1568++ "CPUID_D_1_EAX_XFD": "xfd",
1569+ "CPUID_8000_0008_EBX_AMD_SSBD": "amd-ssbd",
1570+ "CPUID_8000_0008_EBX_CLZERO": "clzero",
1571+ "CPUID_8000_0008_EBX_IBPB": "ibpb",
1572+--- /dev/null
1573++++ b/src/cpu_map/x86_SapphireRapids-noTSX.xml
1574+@@ -0,0 +1,111 @@
1575++<cpus>
1576++ <model name='SapphireRapids-noTSX'>
1577++ <decode host='on' guest='off'/>
1578++ <signature family='6' model='143'/>
1579++ <vendor name='Intel'/>
1580++ <feature name='3dnowprefetch'/>
1581++ <feature name='abm'/>
1582++ <feature name='adx'/>
1583++ <feature name='aes'/>
1584++ <feature name='amx-bf16'/>
1585++ <feature name='amx-int8'/>
1586++ <feature name='amx-tile'/>
1587++ <feature name='apic'/>
1588++ <feature name='arat'/>
1589++ <feature name='arch-capabilities'/>
1590++ <feature name='avx'/>
1591++ <feature name='avx-vnni'/>
1592++ <feature name='avx2'/>
1593++ <feature name='avx512-bf16'/>
1594++ <feature name='avx512-fp16'/>
1595++ <feature name='avx512-vpopcntdq'/>
1596++ <feature name='avx512bitalg'/>
1597++ <feature name='avx512bw'/>
1598++ <feature name='avx512cd'/>
1599++ <feature name='avx512dq'/>
1600++ <feature name='avx512f'/>
1601++ <feature name='avx512ifma'/>
1602++ <feature name='avx512vbmi'/>
1603++ <feature name='avx512vbmi2'/>
1604++ <feature name='avx512vl'/>
1605++ <feature name='avx512vnni'/>
1606++ <feature name='bmi1'/>
1607++ <feature name='bmi2'/>
1608++ <feature name='bus-lock-detect'/>
1609++ <feature name='clflush'/>
1610++ <feature name='clflushopt'/>
1611++ <feature name='clwb'/>
1612++ <feature name='cmov'/>
1613++ <feature name='cx16'/>
1614++ <feature name='cx8'/>
1615++ <feature name='de'/>
1616++ <feature name='erms'/>
1617++ <feature name='f16c'/>
1618++ <feature name='fma'/>
1619++ <feature name='fpu'/>
1620++ <feature name='fsgsbase'/>
1621++ <feature name='fsrm'/>
1622++ <feature name='fxsr'/>
1623++ <feature name='gfni'/>
1624++ <feature name='ibrs-all'/>
1625++ <feature name='invpcid'/>
1626++ <feature name='la57'/>
1627++ <feature name='lahf_lm'/>
1628++ <feature name='lm'/>
1629++ <feature name='mca'/>
1630++ <feature name='mce'/>
1631++ <feature name='mds-no'/>
1632++ <feature name='mmx'/>
1633++ <feature name='movbe'/>
1634++ <feature name='msr'/>
1635++ <feature name='mtrr'/>
1636++ <feature name='nx'/>
1637++ <feature name='pae'/>
1638++ <feature name='pat'/>
1639++ <feature name='pcid'/>
1640++ <feature name='pclmuldq'/>
1641++ <feature name='pdpe1gb'/>
1642++ <feature name='pge'/>
1643++ <feature name='pku'/>
1644++ <feature name='pni'/>
1645++ <feature name='popcnt'/>
1646++ <feature name='pschange-mc-no'/>
1647++ <feature name='pse'/>
1648++ <feature name='pse36'/>
1649++ <feature name='rdctl-no'/>
1650++ <feature name='rdpid'/>
1651++ <feature name='rdrand'/>
1652++ <feature name='rdseed'/>
1653++ <feature name='rdtscp'/>
1654++ <feature name='sep'/>
1655++ <feature name='serialize'/>
1656++ <feature name='sha-ni'/>
1657++ <feature name='skip-l1dfl-vmentry'/>
1658++ <feature name='smap'/>
1659++ <feature name='smep'/>
1660++ <feature name='spec-ctrl'/>
1661++ <feature name='ssbd'/>
1662++ <feature name='sse'/>
1663++ <feature name='sse2'/>
1664++ <feature name='sse4.1'/>
1665++ <feature name='sse4.2'/>
1666++ <feature name='ssse3'/>
1667++ <feature name='syscall'/>
1668++ <feature name='taa-no'/>
1669++ <feature name='tsc'/>
1670++ <feature name='tsc-deadline'/>
1671++ <feature name='tsx-ldtrk'/>
1672++ <feature name='umip'/>
1673++ <feature name='vaes'/>
1674++ <feature name='vme'/>
1675++ <feature name='vpclmulqdq'/>
1676++ <feature name='wbnoinvd'/>
1677++ <feature name='x2apic'/>
1678++ <feature name='xfd'/>
1679++ <feature name='xgetbv1'/>
1680++ <feature name='xsave'/>
1681++ <feature name='xsavec'/>
1682++ <feature name='xsaveopt'/>
1683++ <feature name='xsaves'/>
1684++ </model>
1685++</cpus>
1686+--- /dev/null
1687++++ b/src/cpu_map/x86_SapphireRapids.xml
1688+@@ -0,0 +1,113 @@
1689++<cpus>
1690++ <model name='SapphireRapids'>
1691++ <decode host='on' guest='on'/>
1692++ <signature family='6' model='143'/>
1693++ <vendor name='Intel'/>
1694++ <feature name='3dnowprefetch'/>
1695++ <feature name='abm'/>
1696++ <feature name='adx'/>
1697++ <feature name='aes'/>
1698++ <feature name='amx-bf16'/>
1699++ <feature name='amx-int8'/>
1700++ <feature name='amx-tile'/>
1701++ <feature name='apic'/>
1702++ <feature name='arat'/>
1703++ <feature name='arch-capabilities'/>
1704++ <feature name='avx'/>
1705++ <feature name='avx-vnni'/>
1706++ <feature name='avx2'/>
1707++ <feature name='avx512-bf16'/>
1708++ <feature name='avx512-fp16'/>
1709++ <feature name='avx512-vpopcntdq'/>
1710++ <feature name='avx512bitalg'/>
1711++ <feature name='avx512bw'/>
1712++ <feature name='avx512cd'/>
1713++ <feature name='avx512dq'/>
1714++ <feature name='avx512f'/>
1715++ <feature name='avx512ifma'/>
1716++ <feature name='avx512vbmi'/>
1717++ <feature name='avx512vbmi2'/>
1718++ <feature name='avx512vl'/>
1719++ <feature name='avx512vnni'/>
1720++ <feature name='bmi1'/>
1721++ <feature name='bmi2'/>
1722++ <feature name='bus-lock-detect'/>
1723++ <feature name='clflush'/>
1724++ <feature name='clflushopt'/>
1725++ <feature name='clwb'/>
1726++ <feature name='cmov'/>
1727++ <feature name='cx16'/>
1728++ <feature name='cx8'/>
1729++ <feature name='de'/>
1730++ <feature name='erms'/>
1731++ <feature name='f16c'/>
1732++ <feature name='fma'/>
1733++ <feature name='fpu'/>
1734++ <feature name='fsgsbase'/>
1735++ <feature name='fsrm'/>
1736++ <feature name='fxsr'/>
1737++ <feature name='gfni'/>
1738++ <feature name='hle'/>
1739++ <feature name='ibrs-all'/>
1740++ <feature name='invpcid'/>
1741++ <feature name='la57'/>
1742++ <feature name='lahf_lm'/>
1743++ <feature name='lm'/>
1744++ <feature name='mca'/>
1745++ <feature name='mce'/>
1746++ <feature name='mds-no'/>
1747++ <feature name='mmx'/>
1748++ <feature name='movbe'/>
1749++ <feature name='msr'/>
1750++ <feature name='mtrr'/>
1751++ <feature name='nx'/>
1752++ <feature name='pae'/>
1753++ <feature name='pat'/>
1754++ <feature name='pcid'/>
1755++ <feature name='pclmuldq'/>
1756++ <feature name='pdpe1gb'/>
1757++ <feature name='pge'/>
1758++ <feature name='pku'/>
1759++ <feature name='pni'/>
1760++ <feature name='popcnt'/>
1761++ <feature name='pschange-mc-no'/>
1762++ <feature name='pse'/>
1763++ <feature name='pse36'/>
1764++ <feature name='rdctl-no'/>
1765++ <feature name='rdpid'/>
1766++ <feature name='rdrand'/>
1767++ <feature name='rdseed'/>
1768++ <feature name='rdtscp'/>
1769++ <feature name='rtm'/>
1770++ <feature name='sep'/>
1771++ <feature name='serialize'/>
1772++ <feature name='sha-ni'/>
1773++ <feature name='skip-l1dfl-vmentry'/>
1774++ <feature name='smap'/>
1775++ <feature name='smep'/>
1776++ <feature name='spec-ctrl'/>
1777++ <feature name='ssbd'/>
1778++ <feature name='sse'/>
1779++ <feature name='sse2'/>
1780++ <feature name='sse4.1'/>
1781++ <feature name='sse4.2'/>
1782++ <feature name='ssse3'/>
1783++ <feature name='syscall'/>
1784++ <feature name='taa-no'/>
1785++ <feature name='tsc'/>
1786++ <feature name='tsc-deadline'/>
1787++ <feature name='tsx-ldtrk'/>
1788++ <feature name='umip'/>
1789++ <feature name='vaes'/>
1790++ <feature name='vme'/>
1791++ <feature name='vpclmulqdq'/>
1792++ <feature name='wbnoinvd'/>
1793++ <feature name='x2apic'/>
1794++ <feature name='xfd'/>
1795++ <feature name='xgetbv1'/>
1796++ <feature name='xsave'/>
1797++ <feature name='xsavec'/>
1798++ <feature name='xsaveopt'/>
1799++ <feature name='xsaves'/>
1800++ </model>
1801++</cpus>

Subscribers

People subscribed via source and target branches