abb18f import libvirt-8.0.0-5.2.module+el8.6.0+15256+3a0914fe

Authored and Committed by centosrcm 2 years ago
    import libvirt-8.0.0-5.2.module+el8.6.0+15256+3a0914fe
    
        
SOURCES/libvirt-conf-Introduce-memory-allocation-threads.patch ADDED
@@ -0,0 +1,155 @@
1
+ From e60a964e51cb0aecb060f1a1cc2884586e00ddeb Mon Sep 17 00:00:00 2001
2
+ Message-Id: <e60a964e51cb0aecb060f1a1cc2884586e00ddeb@dist-git>
3
+ From: Michal Privoznik <mprivozn@redhat.com>
4
+ Date: Mon, 21 Mar 2022 16:49:25 +0100
5
+ Subject: [PATCH] conf: Introduce memory allocation threads
6
+
7
+ Since its v5.0.0 release QEMU is capable of specifying number of
8
+ threads used to allocate memory. It defaults to 1, which may be
9
+ too low for humongous guests with gigantic pages.
10
+
11
+ In general, on QEMU cmd line level it is possible to use
12
+ different number of threads per each memory-backend-* object, in
13
+ practical terms it's not useful. Therefore, use <memoryBacking/>
14
+ to set guest wide value and let all memory devices 'inherit' it,
15
+ silently. IOW, don't introduce per device knob because that would
16
+ only complicate things for a little or no benefit.
17
+
18
+ Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
19
+ Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
20
+ (cherry picked from commit ba7f98126fa84d354ce72929b77cc111a9a557a9)
21
+ Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2075569
22
+ Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
23
+ ---
24
+ docs/formatdomain.rst | 8 +++++---
25
+ docs/schemas/domaincommon.rng | 19 +++++++++++++------
26
+ src/conf/domain_conf.c | 15 ++++++++++++++-
27
+ src/conf/domain_conf.h | 1 +
28
+ tests/qemuxml2argvdata/memfd-memory-numa.xml | 2 +-
29
+ 5 files changed, 34 insertions(+), 11 deletions(-)
30
+
31
+ diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst
32
+ index 8128e43da4..17e89a0c0d 100644
33
+ --- a/docs/formatdomain.rst
34
+ +++ b/docs/formatdomain.rst
35
+ @@ -977,7 +977,7 @@ Memory Backing
36
+ <locked/>
37
+ <source type="file|anonymous|memfd"/>
38
+ <access mode="shared|private"/>
39
+ - <allocation mode="immediate|ondemand"/>
40
+ + <allocation mode="immediate|ondemand" threads='8'/>
41
+ <discard/>
42
+ </memoryBacking>
43
+ ...
44
+ @@ -1026,8 +1026,10 @@ influence how virtual memory pages are backed by host pages.
45
+ Using the ``mode`` attribute, specify if the memory is to be "shared" or
46
+ "private". This can be overridden per numa node by ``memAccess``.
47
+ ``allocation``
48
+ - Using the ``mode`` attribute, specify when to allocate the memory by
49
+ - supplying either "immediate" or "ondemand".
50
+ + Using the optional ``mode`` attribute, specify when to allocate the memory by
51
+ + supplying either "immediate" or "ondemand". :since:`Since 8.2.0` it is
52
+ + possible to set the number of threads that hypervisor uses to allocate
53
+ + memory via ``threads`` attribute.
54
+ ``discard``
55
+ When set and supported by hypervisor the memory content is discarded just
56
+ before guest shuts down (or when DIMM module is unplugged). Please note that
57
+ diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
58
+ index 7fa5c2b8b5..c9c1529979 100644
59
+ --- a/docs/schemas/domaincommon.rng
60
+ +++ b/docs/schemas/domaincommon.rng
61
+ @@ -745,12 +745,19 @@
62
+ </optional>
63
+ <optional>
64
+ <element name="allocation">
65
+ - <attribute name="mode">
66
+ - <choice>
67
+ - <value>immediate</value>
68
+ - <value>ondemand</value>
69
+ - </choice>
70
+ - </attribute>
71
+ + <optional>
72
+ + <attribute name="mode">
73
+ + <choice>
74
+ + <value>immediate</value>
75
+ + <value>ondemand</value>
76
+ + </choice>
77
+ + </attribute>
78
+ + </optional>
79
+ + <optional>
80
+ + <attribute name="threads">
81
+ + <ref name="unsignedInt"/>
82
+ + </attribute>
83
+ + </optional>
84
+ </element>
85
+ </optional>
86
+ <optional>
87
+ diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
88
+ index 5691b8d2d5..805a15848e 100644
89
+ --- a/src/conf/domain_conf.c
90
+ +++ b/src/conf/domain_conf.c
91
+ @@ -19095,6 +19095,13 @@ virDomainDefParseMemory(virDomainDef *def,
92
+ VIR_FREE(tmp);
93
+ }
94
+
95
+ + if (virXPathUInt("string(./memoryBacking/allocation/@threads)",
96
+ + ctxt, &def->mem.allocation_threads) == -2) {
97
+ + virReportError(VIR_ERR_XML_ERROR, "%s",
98
+ + _("Failed to parse memory allocation threads"));
99
+ + return -1;
100
+ + }
101
+ +
102
+ if (virXPathNode("./memoryBacking/hugepages", ctxt)) {
103
+ /* hugepages will be used */
104
+ if ((n = virXPathNodeSet("./memoryBacking/hugepages/page", ctxt, &nodes)) < 0) {
105
+ @@ -27639,6 +27646,7 @@ virDomainMemorybackingFormat(virBuffer *buf,
106
+ const virDomainMemtune *mem)
107
+ {
108
+ g_auto(virBuffer) childBuf = VIR_BUFFER_INIT_CHILD(buf);
109
+ + g_auto(virBuffer) allocAttrBuf = VIR_BUFFER_INITIALIZER;
110
+
111
+ if (mem->nhugepages)
112
+ virDomainHugepagesFormat(&childBuf, mem->hugepages, mem->nhugepages);
113
+ @@ -27653,8 +27661,13 @@ virDomainMemorybackingFormat(virBuffer *buf,
114
+ virBufferAsprintf(&childBuf, "<access mode='%s'/>\n",
115
+ virDomainMemoryAccessTypeToString(mem->access));
116
+ if (mem->allocation)
117
+ - virBufferAsprintf(&childBuf, "<allocation mode='%s'/>\n",
118
+ + virBufferAsprintf(&allocAttrBuf, " mode='%s'",
119
+ virDomainMemoryAllocationTypeToString(mem->allocation));
120
+ + if (mem->allocation_threads > 0)
121
+ + virBufferAsprintf(&allocAttrBuf, " threads='%u'", mem->allocation_threads);
122
+ +
123
+ + virXMLFormatElement(&childBuf, "allocation", &allocAttrBuf, NULL);
124
+ +
125
+ if (mem->discard)
126
+ virBufferAddLit(&childBuf, "<discard/>\n");
127
+
128
+ diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
129
+ index 144ba4dd12..10af94e2e4 100644
130
+ --- a/src/conf/domain_conf.h
131
+ +++ b/src/conf/domain_conf.h
132
+ @@ -2677,6 +2677,7 @@ struct _virDomainMemtune {
133
+ int source; /* enum virDomainMemorySource */
134
+ int access; /* enum virDomainMemoryAccess */
135
+ int allocation; /* enum virDomainMemoryAllocation */
136
+ + unsigned int allocation_threads;
137
+
138
+ virTristateBool discard;
139
+ };
140
+ diff --git a/tests/qemuxml2argvdata/memfd-memory-numa.xml b/tests/qemuxml2argvdata/memfd-memory-numa.xml
141
+ index 1ebcee8939..1ac87e3aef 100644
142
+ --- a/tests/qemuxml2argvdata/memfd-memory-numa.xml
143
+ +++ b/tests/qemuxml2argvdata/memfd-memory-numa.xml
144
+ @@ -10,7 +10,7 @@
145
+ </hugepages>
146
+ <source type='memfd'/>
147
+ <access mode='shared'/>
148
+ - <allocation mode='immediate'/>
149
+ + <allocation mode='immediate' threads='8'/>
150
+ </memoryBacking>
151
+ <vcpu placement='static'>8</vcpu>
152
+ <numatune>
153
+ --
154
+ 2.35.1
155
+
SOURCES/libvirt-cpu_map-Disable-cpu64-rhel-for-host-model-and-baseline.patch ADDED
@@ -0,0 +1,60 @@
1
+ From d03c369dd75c747f25ecc34af3b9d79adf92ea0c Mon Sep 17 00:00:00 2001
2
+ Message-Id: <d03c369dd75c747f25ecc34af3b9d79adf92ea0c@dist-git>
3
+ From: Jiri Denemark <jdenemar@redhat.com>
4
+ Date: Tue, 26 Apr 2022 12:50:41 +0200
5
+ Subject: [PATCH] cpu_map: Disable cpu64-rhel* for host-model and baseline
6
+
7
+ These ancient RHEL-only CPU models should not really be used by any CPU
8
+ definition created by libvirt. We keep them just for backwards
9
+ compatibility with domains which might still be using them.
10
+
11
+ Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
12
+ Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
13
+ (cherry picked from commit d2e4d66be35cd04da72e5f5129a8a4da6a931505)
14
+
15
+ https://bugzilla.redhat.com/show_bug.cgi?id=2084030
16
+
17
+ Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
18
+ ---
19
+ src/cpu_map/x86_cpu64-rhel5.xml | 2 +-
20
+ src/cpu_map/x86_cpu64-rhel6.xml | 2 +-
21
+ tests/cputestdata/x86_64-baseline-no-vendor-result.xml | 3 ++-
22
+ 3 files changed, 4 insertions(+), 3 deletions(-)
23
+
24
+ diff --git a/src/cpu_map/x86_cpu64-rhel5.xml b/src/cpu_map/x86_cpu64-rhel5.xml
25
+ index be6bcdb7a6..7402b7603c 100644
26
+ --- a/src/cpu_map/x86_cpu64-rhel5.xml
27
+ +++ b/src/cpu_map/x86_cpu64-rhel5.xml
28
+ @@ -1,6 +1,6 @@
29
+ <cpus>
30
+ <model name='cpu64-rhel5'>
31
+ - <decode host='on' guest='on'/>
32
+ + <decode host='off' guest='off'/>
33
+ <feature name='apic'/>
34
+ <feature name='clflush'/>
35
+ <feature name='cmov'/>
36
+ diff --git a/src/cpu_map/x86_cpu64-rhel6.xml b/src/cpu_map/x86_cpu64-rhel6.xml
37
+ index c62b1b5575..061939c733 100644
38
+ --- a/src/cpu_map/x86_cpu64-rhel6.xml
39
+ +++ b/src/cpu_map/x86_cpu64-rhel6.xml
40
+ @@ -1,6 +1,6 @@
41
+ <cpus>
42
+ <model name='cpu64-rhel6'>
43
+ - <decode host='on' guest='on'/>
44
+ + <decode host='off' guest='off'/>
45
+ <feature name='apic'/>
46
+ <feature name='clflush'/>
47
+ <feature name='cmov'/>
48
+ diff --git a/tests/cputestdata/x86_64-baseline-no-vendor-result.xml b/tests/cputestdata/x86_64-baseline-no-vendor-result.xml
49
+ index 00e03b2152..4b4921cf93 100644
50
+ --- a/tests/cputestdata/x86_64-baseline-no-vendor-result.xml
51
+ +++ b/tests/cputestdata/x86_64-baseline-no-vendor-result.xml
52
+ @@ -1,3 +1,4 @@
53
+ <cpu mode='custom' match='exact'>
54
+ - <model fallback='allow'>cpu64-rhel6</model>
55
+ + <model fallback='allow'>kvm64</model>
56
+ + <feature policy='require' name='lahf_lm'/>
57
+ </cpu>
58
+ --
59
+ 2.35.1
60
+
SOURCES/libvirt-cpu_x86-Consolidate-signature-match-in-x86DecodeUseCandidate.patch ADDED
@@ -0,0 +1,75 @@
1
+ From e075af4319c7c30531421e6667845abd30cd28e9 Mon Sep 17 00:00:00 2001
2
+ Message-Id: <e075af4319c7c30531421e6667845abd30cd28e9@dist-git>
3
+ From: Jiri Denemark <jdenemar@redhat.com>
4
+ Date: Tue, 26 Apr 2022 11:58:07 +0200
5
+ Subject: [PATCH] cpu_x86: Consolidate signature match in x86DecodeUseCandidate
6
+
7
+ Checking the signature in two different places makes no sense since the
8
+ code in between can only mark the candidate as the best option so far,
9
+ which is what the second signature match does as well.
10
+
11
+ Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
12
+ Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
13
+ (cherry picked from commit 35ce086667e68e8f546cf36473591dd7c19c72eb)
14
+
15
+ https://bugzilla.redhat.com/show_bug.cgi?id=2084030
16
+
17
+ Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
18
+ ---
19
+ src/cpu/cpu_x86.c | 31 ++++++++++++++-----------------
20
+ 1 file changed, 14 insertions(+), 17 deletions(-)
21
+
22
+ diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c
23
+ index 5cb9caef8a..f007487824 100644
24
+ --- a/src/cpu/cpu_x86.c
25
+ +++ b/src/cpu/cpu_x86.c
26
+ @@ -2020,15 +2020,22 @@ x86DecodeUseCandidate(virCPUx86Model *current,
27
+ }
28
+
29
+ /* Ideally we want to select a model with family/model equal to
30
+ - * family/model of the real CPU. Once we found such model, we only
31
+ + * family/model of the real CPU and once we found such model, we only
32
+ * consider candidates with matching family/model.
33
+ */
34
+ - if (signature &&
35
+ - virCPUx86SignaturesMatch(current->signatures, signature) &&
36
+ - !virCPUx86SignaturesMatch(candidate->signatures, signature)) {
37
+ - VIR_DEBUG("%s differs in signature from matching %s",
38
+ - cpuCandidate->model, cpuCurrent->model);
39
+ - return 0;
40
+ + if (signature) {
41
+ + if (virCPUx86SignaturesMatch(current->signatures, signature) &&
42
+ + !virCPUx86SignaturesMatch(candidate->signatures, signature)) {
43
+ + VIR_DEBUG("%s differs in signature from matching %s",
44
+ + cpuCandidate->model, cpuCurrent->model);
45
+ + return 0;
46
+ + }
47
+ +
48
+ + if (!virCPUx86SignaturesMatch(current->signatures, signature) &&
49
+ + virCPUx86SignaturesMatch(candidate->signatures, signature)) {
50
+ + VIR_DEBUG("%s provides matching signature", cpuCandidate->model);
51
+ + return 1;
52
+ + }
53
+ }
54
+
55
+ if (cpuCurrent->nfeatures > cpuCandidate->nfeatures) {
56
+ @@ -2037,16 +2044,6 @@ x86DecodeUseCandidate(virCPUx86Model *current,
57
+ return 1;
58
+ }
59
+
60
+ - /* Prefer a candidate with matching signature even though it would
61
+ - * result in longer list of features.
62
+ - */
63
+ - if (signature &&
64
+ - virCPUx86SignaturesMatch(candidate->signatures, signature) &&
65
+ - !virCPUx86SignaturesMatch(current->signatures, signature)) {
66
+ - VIR_DEBUG("%s provides matching signature", cpuCandidate->model);
67
+ - return 1;
68
+ - }
69
+ -
70
+ VIR_DEBUG("%s does not result in shorter feature list than %s",
71
+ cpuCandidate->model, cpuCurrent->model);
72
+ return 0;
73
+ --
74
+ 2.35.1
75
+
SOURCES/libvirt-cpu_x86-Ignore-enabled-features-for-input-models-in-x86DecodeUseCandidate.patch ADDED
@@ -0,0 +1,272 @@
1
+ From 5b5f684bfceeed923e1733931b6c4c75d5ed4149 Mon Sep 17 00:00:00 2001
2
+ Message-Id: <5b5f684bfceeed923e1733931b6c4c75d5ed4149@dist-git>
3
+ From: Jiri Denemark <jdenemar@redhat.com>
4
+ Date: Fri, 29 Apr 2022 10:35:02 +0200
5
+ Subject: [PATCH] cpu_x86: Ignore enabled features for input models in
6
+ x86DecodeUseCandidate
7
+
8
+ While we don't want to aim for the shortest list of disabled features in
9
+ the baseline result (it would select a very old model), we want to do so
10
+ while looking at any of the input models for which we're trying to
11
+ compute a baseline CPU model. Given a set of input models, we always
12
+ want to take the least capable one of them (i.e., the one with shortest
13
+ list of disabled features) or a better model which is not one of the
14
+ input models.
15
+
16
+ So when considering an input model, we just check whether its list of
17
+ disabled features is shorter than the currently best one. When looking
18
+ at other models we check both enabled and disabled features while
19
+ penalizing disabled features as implemented by the previous patch.
20
+
21
+ Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
22
+ Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
23
+ (cherry picked from commit bb6cedd2082599323257ee0df18c93a6e0551b0b)
24
+
25
+ https://bugzilla.redhat.com/show_bug.cgi?id=2084030
26
+
27
+ Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
28
+ ---
29
+ src/cpu/cpu_x86.c | 66 ++++++++++++-------
30
+ ...4-baseline-Westmere+Nehalem-migratable.xml | 8 ++-
31
+ ...86_64-baseline-Westmere+Nehalem-result.xml | 8 ++-
32
+ ...-cpuid-baseline-Cooperlake+Cascadelake.xml | 13 ++--
33
+ 4 files changed, 64 insertions(+), 31 deletions(-)
34
+
35
+ diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c
36
+ index ebcd96edb1..7b59dad8bf 100644
37
+ --- a/src/cpu/cpu_x86.c
38
+ +++ b/src/cpu/cpu_x86.c
39
+ @@ -1975,7 +1975,8 @@ virCPUx86Compare(virCPUDef *host,
40
+
41
+ static int
42
+ virCPUx86CompareCandidateFeatureList(virCPUDef *cpuCurrent,
43
+ - virCPUDef *cpuCandidate)
44
+ + virCPUDef *cpuCandidate,
45
+ + bool isPreferred)
46
+ {
47
+ size_t current = cpuCurrent->nfeatures;
48
+ size_t enabledCurrent = current;
49
+ @@ -2017,6 +2018,14 @@ virCPUx86CompareCandidateFeatureList(virCPUDef *cpuCurrent,
50
+ return 1;
51
+ }
52
+
53
+ + if (isPreferred && disabled < disabledCurrent) {
54
+ + VIR_DEBUG("%s is in the list of preferred models and provides fewer "
55
+ + "disabled features than %s: %zu < %zu",
56
+ + cpuCandidate->model, cpuCurrent->model,
57
+ + disabled, disabledCurrent);
58
+ + return 1;
59
+ + }
60
+ +
61
+ VIR_DEBUG("%s is not better than %s: %zu (%zu, %zu) >= %zu (%zu, %zu)",
62
+ cpuCandidate->model, cpuCurrent->model,
63
+ candidate, enabled, disabled,
64
+ @@ -2039,8 +2048,10 @@ x86DecodeUseCandidate(virCPUx86Model *current,
65
+ virCPUx86Model *candidate,
66
+ virCPUDef *cpuCandidate,
67
+ uint32_t signature,
68
+ - const char *preferred)
69
+ + const char **preferred)
70
+ {
71
+ + bool isPreferred = false;
72
+ +
73
+ if (cpuCandidate->type == VIR_CPU_TYPE_HOST &&
74
+ !candidate->decodeHost) {
75
+ VIR_DEBUG("%s is not supposed to be used for host CPU definition",
76
+ @@ -2064,9 +2075,13 @@ x86DecodeUseCandidate(virCPUx86Model *current,
77
+ }
78
+ }
79
+
80
+ - if (preferred && STREQ(cpuCandidate->model, preferred)) {
81
+ - VIR_DEBUG("%s is the preferred model", cpuCandidate->model);
82
+ - return 2;
83
+ + if (preferred) {
84
+ + isPreferred = g_strv_contains(preferred, cpuCandidate->model);
85
+ +
86
+ + if (isPreferred && !preferred[1]) {
87
+ + VIR_DEBUG("%s is the preferred model", cpuCandidate->model);
88
+ + return 2;
89
+ + }
90
+ }
91
+
92
+ if (!cpuCurrent) {
93
+ @@ -2093,7 +2108,8 @@ x86DecodeUseCandidate(virCPUx86Model *current,
94
+ }
95
+ }
96
+
97
+ - return virCPUx86CompareCandidateFeatureList(cpuCurrent, cpuCandidate);
98
+ + return virCPUx86CompareCandidateFeatureList(cpuCurrent, cpuCandidate,
99
+ + isPreferred);
100
+ }
101
+
102
+
103
+ @@ -2136,7 +2152,7 @@ static int
104
+ x86Decode(virCPUDef *cpu,
105
+ const virCPUx86Data *cpuData,
106
+ virDomainCapsCPUModels *models,
107
+ - const char *preferred,
108
+ + const char **preferred,
109
+ bool migratable)
110
+ {
111
+ virCPUx86Map *map;
112
+ @@ -2169,6 +2185,9 @@ x86Decode(virCPUDef *cpu,
113
+
114
+ x86DataFilterTSX(&data, vendor, map);
115
+
116
+ + if (preferred && !preferred[0])
117
+ + preferred = NULL;
118
+ +
119
+ /* Walk through the CPU models in reverse order to check newest
120
+ * models first.
121
+ */
122
+ @@ -2176,16 +2195,18 @@ x86Decode(virCPUDef *cpu,
123
+ candidate = map->models[i];
124
+ if (models &&
125
+ !(hvModel = virDomainCapsCPUModelsGet(models, candidate->name))) {
126
+ - if (preferred && STREQ(candidate->name, preferred)) {
127
+ + if (preferred &&
128
+ + !preferred[1] &&
129
+ + STREQ(candidate->name, preferred[0])) {
130
+ if (cpu->fallback != VIR_CPU_FALLBACK_ALLOW) {
131
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
132
+ _("CPU model %s is not supported by hypervisor"),
133
+ - preferred);
134
+ + preferred[0]);
135
+ return -1;
136
+ } else {
137
+ VIR_WARN("Preferred CPU model %s not allowed by"
138
+ " hypervisor; closest supported model will be"
139
+ - " used", preferred);
140
+ + " used", preferred[0]);
141
+ }
142
+ } else {
143
+ VIR_DEBUG("CPU model %s not allowed by hypervisor; ignoring",
144
+ @@ -2793,8 +2814,8 @@ virCPUx86Baseline(virCPUDef **cpus,
145
+ size_t i;
146
+ virCPUx86Vendor *vendor = NULL;
147
+ bool outputVendor = true;
148
+ - const char *modelName;
149
+ - bool matchingNames = true;
150
+ + g_autofree char **modelNames = NULL;
151
+ + size_t namesLen = 0;
152
+ g_autoptr(virCPUData) featData = NULL;
153
+
154
+ if (!(map = virCPUx86GetMap()))
155
+ @@ -2816,19 +2837,17 @@ virCPUx86Baseline(virCPUDef **cpus,
156
+ return NULL;
157
+ }
158
+
159
+ - modelName = cpus[0]->model;
160
+ + modelNames = g_new0(char *, ncpus + 1);
161
+ + if (cpus[0]->model)
162
+ + modelNames[namesLen++] = cpus[0]->model;
163
+ +
164
+ for (i = 1; i < ncpus; i++) {
165
+ g_autoptr(virCPUx86Model) model = NULL;
166
+ const char *vn = NULL;
167
+
168
+ - if (matchingNames && cpus[i]->model) {
169
+ - if (!modelName) {
170
+ - modelName = cpus[i]->model;
171
+ - } else if (STRNEQ(modelName, cpus[i]->model)) {
172
+ - modelName = NULL;
173
+ - matchingNames = false;
174
+ - }
175
+ - }
176
+ + if (cpus[i]->model &&
177
+ + !g_strv_contains((const char **) modelNames, cpus[i]->model))
178
+ + modelNames[namesLen++] = cpus[i]->model;
179
+
180
+ if (!(model = x86ModelFromCPU(cpus[i], map, -1)))
181
+ return NULL;
182
+ @@ -2891,10 +2910,11 @@ virCPUx86Baseline(virCPUDef **cpus,
183
+ virCPUx86DataAddItem(&base_model->data, &vendor->data) < 0)
184
+ return NULL;
185
+
186
+ - if (x86Decode(cpu, &base_model->data, models, modelName, migratable) < 0)
187
+ + if (x86Decode(cpu, &base_model->data, models,
188
+ + (const char **) modelNames, migratable) < 0)
189
+ return NULL;
190
+
191
+ - if (STREQ_NULLABLE(cpu->model, modelName))
192
+ + if (namesLen == 1 && STREQ(cpu->model, modelNames[0]))
193
+ cpu->fallback = VIR_CPU_FALLBACK_FORBID;
194
+
195
+ if (!outputVendor)
196
+ diff --git a/tests/cputestdata/x86_64-baseline-Westmere+Nehalem-migratable.xml b/tests/cputestdata/x86_64-baseline-Westmere+Nehalem-migratable.xml
197
+ index 775a27de2e..f5846b1619 100644
198
+ --- a/tests/cputestdata/x86_64-baseline-Westmere+Nehalem-migratable.xml
199
+ +++ b/tests/cputestdata/x86_64-baseline-Westmere+Nehalem-migratable.xml
200
+ @@ -1,10 +1,14 @@
201
+ <cpu mode='custom' match='exact'>
202
+ - <model fallback='allow'>SandyBridge</model>
203
+ + <model fallback='allow'>Westmere</model>
204
+ <vendor>Intel</vendor>
205
+ <feature policy='require' name='vme'/>
206
+ <feature policy='require' name='ss'/>
207
+ + <feature policy='require' name='pclmuldq'/>
208
+ <feature policy='require' name='pcid'/>
209
+ + <feature policy='require' name='x2apic'/>
210
+ + <feature policy='require' name='tsc-deadline'/>
211
+ + <feature policy='require' name='xsave'/>
212
+ <feature policy='require' name='osxsave'/>
213
+ + <feature policy='require' name='avx'/>
214
+ <feature policy='require' name='hypervisor'/>
215
+ - <feature policy='disable' name='rdtscp'/>
216
+ </cpu>
217
+ diff --git a/tests/cputestdata/x86_64-baseline-Westmere+Nehalem-result.xml b/tests/cputestdata/x86_64-baseline-Westmere+Nehalem-result.xml
218
+ index cafca97d62..166833276c 100644
219
+ --- a/tests/cputestdata/x86_64-baseline-Westmere+Nehalem-result.xml
220
+ +++ b/tests/cputestdata/x86_64-baseline-Westmere+Nehalem-result.xml
221
+ @@ -1,11 +1,15 @@
222
+ <cpu mode='custom' match='exact'>
223
+ - <model fallback='allow'>SandyBridge</model>
224
+ + <model fallback='allow'>Westmere</model>
225
+ <vendor>Intel</vendor>
226
+ <feature policy='require' name='vme'/>
227
+ <feature policy='require' name='ss'/>
228
+ + <feature policy='require' name='pclmuldq'/>
229
+ <feature policy='require' name='pcid'/>
230
+ + <feature policy='require' name='x2apic'/>
231
+ + <feature policy='require' name='tsc-deadline'/>
232
+ + <feature policy='require' name='xsave'/>
233
+ <feature policy='require' name='osxsave'/>
234
+ + <feature policy='require' name='avx'/>
235
+ <feature policy='require' name='hypervisor'/>
236
+ <feature policy='require' name='invtsc'/>
237
+ - <feature policy='disable' name='rdtscp'/>
238
+ </cpu>
239
+ diff --git a/tests/cputestdata/x86_64-cpuid-baseline-Cooperlake+Cascadelake.xml b/tests/cputestdata/x86_64-cpuid-baseline-Cooperlake+Cascadelake.xml
240
+ index 46c32c996f..ecac749b97 100644
241
+ --- a/tests/cputestdata/x86_64-cpuid-baseline-Cooperlake+Cascadelake.xml
242
+ +++ b/tests/cputestdata/x86_64-cpuid-baseline-Cooperlake+Cascadelake.xml
243
+ @@ -1,17 +1,22 @@
244
+ <cpu mode='custom' match='exact'>
245
+ - <model fallback='allow'>Cooperlake</model>
246
+ + <model fallback='allow'>Cascadelake-Server</model>
247
+ <vendor>Intel</vendor>
248
+ <feature policy='require' name='ss'/>
249
+ <feature policy='require' name='vmx'/>
250
+ <feature policy='require' name='hypervisor'/>
251
+ <feature policy='require' name='tsc_adjust'/>
252
+ - <feature policy='require' name='mpx'/>
253
+ <feature policy='require' name='umip'/>
254
+ + <feature policy='require' name='pku'/>
255
+ <feature policy='require' name='md-clear'/>
256
+ + <feature policy='require' name='stibp'/>
257
+ + <feature policy='require' name='arch-capabilities'/>
258
+ <feature policy='require' name='xsaves'/>
259
+ <feature policy='require' name='ibpb'/>
260
+ <feature policy='require' name='amd-ssbd'/>
261
+ + <feature policy='require' name='rdctl-no'/>
262
+ + <feature policy='require' name='ibrs-all'/>
263
+ + <feature policy='require' name='skip-l1dfl-vmentry'/>
264
+ + <feature policy='require' name='mds-no'/>
265
+ + <feature policy='require' name='pschange-mc-no'/>
266
+ <feature policy='require' name='tsx-ctrl'/>
267
+ - <feature policy='disable' name='avx512-bf16'/>
268
+ - <feature policy='disable' name='taa-no'/>
269
+ </cpu>
270
+ --
271
+ 2.35.1
272
+
SOURCES/libvirt-cpu_x86-Penalize-disabled-features-when-computing-CPU-model.patch ADDED
@@ -0,0 +1,1231 @@
1
+ From 652e1798991dcb503abc9a2588b0f95c47b8e3df Mon Sep 17 00:00:00 2001
2
+ Message-Id: <652e1798991dcb503abc9a2588b0f95c47b8e3df@dist-git>
3
+ From: Jiri Denemark <jdenemar@redhat.com>
4
+ Date: Tue, 26 Apr 2022 15:06:30 +0200
5
+ Subject: [PATCH] cpu_x86: Penalize disabled features when computing CPU model
6
+
7
+ For finding the best matching CPU model for a given set of features
8
+ while we don't know the CPU signature (i.e., when computing a baseline
9
+ CPU model) we've been using a "shortest list of features" heuristics.
10
+ This works well if new CPU models are supersets of older models, but
11
+ that's not always the case. As a result it may actually select a new CPU
12
+ model as a baseline while removing some features from it to make it
13
+ compatible with older models. This is in general worse than using an old
14
+ CPU model with a bunch of added features as a guest OS or apps may crash
15
+ when using features that were disabled.
16
+
17
+ On the other hand we don't want to end up with a very old model which
18
+ would guarantee no disabled features as it could stop a guest OS or apps
19
+ from using some features provided by the CPU because they would not
20
+ expect them on such an old CPU.
21
+
22
+ This patch changes the heuristics to something in between. Enabled and
23
+ disabled features are counted separately so that a CPU model requiring
24
+ some features to be disabled looks worse than a model with fewer
25
+ disabled features even if its complete list of features is longer. The
26
+ penalty given for each additional disabled feature gets bigger to make
27
+ longer list of disabled features look even worse.
28
+
29
+ https://bugzilla.redhat.com/show_bug.cgi?id=1851227
30
+
31
+ Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
32
+ Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
33
+ (cherry picked from commit 48341b025acdd04a66696a709c7b09b3bfd42acf)
34
+
35
+ Conflicts:
36
+ tests/domaincapsdata/qemu_2.9.0-tcg.x86_64.xml
37
+ tests/domaincapsdata/qemu_2.11.0-tcg.x86_64.xml
38
+ tests/domaincapsdata/qemu_2.12.0-tcg.x86_64.xml
39
+ tests/domaincapsdata/qemu_3.0.0-tcg.x86_64.xml
40
+ - not supported upstream anymore
41
+
42
+ https://bugzilla.redhat.com/show_bug.cgi?id=2084030
43
+
44
+ Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
45
+ ---
46
+ src/cpu/cpu_x86.c | 44 ++++++++++++++++---
47
+ .../x86_64-cpuid-Atom-D510-guest.xml | 5 ++-
48
+ .../x86_64-cpuid-Atom-N450-guest.xml | 5 ++-
49
+ .../x86_64-cpuid-Phenom-B95-json.xml | 21 +++++----
50
+ ...id-baseline-Broadwell-IBRS+Cascadelake.xml | 11 +++--
51
+ ..._64-cpuid-baseline-Cascadelake+Icelake.xml | 13 +++---
52
+ ...puid-baseline-Cascadelake+Skylake-IBRS.xml | 5 ++-
53
+ ...6_64-cpuid-baseline-Cooperlake+Icelake.xml | 13 +++---
54
+ .../x86_64-host+guest,models-result.xml | 10 +++--
55
+ .../domaincapsdata/qemu_2.11.0-tcg.x86_64.xml | 34 ++++++++------
56
+ .../domaincapsdata/qemu_2.12.0-tcg.x86_64.xml | 34 ++++++++------
57
+ .../domaincapsdata/qemu_2.9.0-tcg.x86_64.xml | 16 ++++---
58
+ .../domaincapsdata/qemu_3.0.0-tcg.x86_64.xml | 35 +++++++++------
59
+ .../domaincapsdata/qemu_3.1.0-tcg.x86_64.xml | 35 +++++++++------
60
+ .../domaincapsdata/qemu_4.0.0-tcg.x86_64.xml | 36 ++++++++-------
61
+ .../domaincapsdata/qemu_4.1.0-tcg.x86_64.xml | 37 +++++++++-------
62
+ .../domaincapsdata/qemu_4.2.0-tcg.x86_64.xml | 37 +++++++++-------
63
+ .../domaincapsdata/qemu_5.0.0-tcg.x86_64.xml | 36 +++++++++------
64
+ .../domaincapsdata/qemu_5.1.0-tcg.x86_64.xml | 36 +++++++++------
65
+ .../domaincapsdata/qemu_5.2.0-tcg.x86_64.xml | 36 +++++++++------
66
+ .../domaincapsdata/qemu_6.0.0-tcg.x86_64.xml | 36 +++++++++------
67
+ .../domaincapsdata/qemu_6.1.0-tcg.x86_64.xml | 36 +++++++++------
68
+ .../domaincapsdata/qemu_6.2.0-tcg.x86_64.xml | 36 +++++++++------
69
+ tests/qemuxml2argvdata/cpu-fallback.args | 2 +-
70
+ .../cpu-host-model-cmt.x86_64-4.0.0.args | 2 +-
71
+ .../cpu-host-model-fallback.args | 2 +-
72
+ 26 files changed, 382 insertions(+), 231 deletions(-)
73
+
74
+ diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c
75
+ index 81c2441b8b..ebcd96edb1 100644
76
+ --- a/src/cpu/cpu_x86.c
77
+ +++ b/src/cpu/cpu_x86.c
78
+ @@ -1970,23 +1970,57 @@ virCPUx86Compare(virCPUDef *host,
79
+ }
80
+
81
+
82
+ +/* Base penalty for disabled features. */
83
+ +#define BASE_PENALTY 2
84
+ +
85
+ static int
86
+ virCPUx86CompareCandidateFeatureList(virCPUDef *cpuCurrent,
87
+ virCPUDef *cpuCandidate)
88
+ {
89
+ size_t current = cpuCurrent->nfeatures;
90
+ + size_t enabledCurrent = current;
91
+ + size_t disabledCurrent = 0;
92
+ size_t candidate = cpuCandidate->nfeatures;
93
+ + size_t enabled = candidate;
94
+ + size_t disabled = 0;
95
+ +
96
+ + if (cpuCandidate->type != VIR_CPU_TYPE_HOST) {
97
+ + size_t i;
98
+ + int penalty = BASE_PENALTY;
99
+ +
100
+ + for (i = 0; i < enabledCurrent; i++) {
101
+ + if (cpuCurrent->features[i].policy == VIR_CPU_FEATURE_DISABLE) {
102
+ + enabledCurrent--;
103
+ + disabledCurrent += penalty;
104
+ + penalty++;
105
+ + }
106
+ + }
107
+ + current = enabledCurrent + disabledCurrent;
108
+ +
109
+ + penalty = BASE_PENALTY;
110
+ + for (i = 0; i < enabled; i++) {
111
+ + if (cpuCandidate->features[i].policy == VIR_CPU_FEATURE_DISABLE) {
112
+ + enabled--;
113
+ + disabled += penalty;
114
+ + penalty++;
115
+ + }
116
+ + }
117
+ + candidate = enabled + disabled;
118
+ + }
119
+
120
+ - if (candidate < current) {
121
+ - VIR_DEBUG("%s is better than %s: %zu < %zu",
122
+ + if (candidate < current ||
123
+ + (candidate == current && disabled < disabledCurrent)) {
124
+ + VIR_DEBUG("%s is better than %s: %zu (%zu, %zu) < %zu (%zu, %zu)",
125
+ cpuCandidate->model, cpuCurrent->model,
126
+ - candidate, current);
127
+ + candidate, enabled, disabled,
128
+ + current, enabledCurrent, disabledCurrent);
129
+ return 1;
130
+ }
131
+
132
+ - VIR_DEBUG("%s is not better than %s: %zu >= %zu",
133
+ + VIR_DEBUG("%s is not better than %s: %zu (%zu, %zu) >= %zu (%zu, %zu)",
134
+ cpuCandidate->model, cpuCurrent->model,
135
+ - candidate, current);
136
+ + candidate, enabled, disabled,
137
+ + current, enabledCurrent, disabledCurrent);
138
+ return 0;
139
+ }
140
+
141
+ diff --git a/tests/cputestdata/x86_64-cpuid-Atom-D510-guest.xml b/tests/cputestdata/x86_64-cpuid-Atom-D510-guest.xml
142
+ index caa0bfd53b..d2f7a79074 100644
143
+ --- a/tests/cputestdata/x86_64-cpuid-Atom-D510-guest.xml
144
+ +++ b/tests/cputestdata/x86_64-cpuid-Atom-D510-guest.xml
145
+ @@ -1,6 +1,7 @@
146
+ <cpu mode='custom' match='exact'>
147
+ - <model fallback='forbid'>core2duo</model>
148
+ + <model fallback='forbid'>n270</model>
149
+ <vendor>Intel</vendor>
150
+ + <feature policy='require' name='pse36'/>
151
+ <feature policy='require' name='ds'/>
152
+ <feature policy='require' name='acpi'/>
153
+ <feature policy='require' name='ss'/>
154
+ @@ -14,6 +15,6 @@
155
+ <feature policy='require' name='xtpr'/>
156
+ <feature policy='require' name='pdcm'/>
157
+ <feature policy='require' name='movbe'/>
158
+ + <feature policy='require' name='lm'/>
159
+ <feature policy='require' name='lahf_lm'/>
160
+ - <feature policy='disable' name='syscall'/>
161
+ </cpu>
162
+ diff --git a/tests/cputestdata/x86_64-cpuid-Atom-N450-guest.xml b/tests/cputestdata/x86_64-cpuid-Atom-N450-guest.xml
163
+ index e8f5c93881..779faf6cef 100644
164
+ --- a/tests/cputestdata/x86_64-cpuid-Atom-N450-guest.xml
165
+ +++ b/tests/cputestdata/x86_64-cpuid-Atom-N450-guest.xml
166
+ @@ -1,5 +1,5 @@
167
+ <cpu mode='custom' match='exact'>
168
+ - <model fallback='forbid'>core2duo</model>
169
+ + <model fallback='forbid'>n270</model>
170
+ <vendor>Intel</vendor>
171
+ <feature policy='require' name='ds'/>
172
+ <feature policy='require' name='acpi'/>
173
+ @@ -15,6 +15,7 @@
174
+ <feature policy='require' name='xtpr'/>
175
+ <feature policy='require' name='pdcm'/>
176
+ <feature policy='require' name='movbe'/>
177
+ + <feature policy='require' name='syscall'/>
178
+ + <feature policy='require' name='lm'/>
179
+ <feature policy='require' name='lahf_lm'/>
180
+ - <feature policy='disable' name='pse36'/>
181
+ </cpu>
182
+ diff --git a/tests/cputestdata/x86_64-cpuid-Phenom-B95-json.xml b/tests/cputestdata/x86_64-cpuid-Phenom-B95-json.xml
183
+ index b4198f66a5..7f6289c6d7 100644
184
+ --- a/tests/cputestdata/x86_64-cpuid-Phenom-B95-json.xml
185
+ +++ b/tests/cputestdata/x86_64-cpuid-Phenom-B95-json.xml
186
+ @@ -1,22 +1,25 @@
187
+ <cpu mode='custom' match='exact'>
188
+ - <model fallback='forbid'>Opteron_G3</model>
189
+ + <model fallback='forbid'>athlon</model>
190
+ <vendor>AMD</vendor>
191
+ - <feature policy='require' name='vme'/>
192
+ + <feature policy='require' name='mca'/>
193
+ + <feature policy='require' name='clflush'/>
194
+ + <feature policy='require' name='pni'/>
195
+ + <feature policy='require' name='cx16'/>
196
+ <feature policy='require' name='x2apic'/>
197
+ + <feature policy='require' name='popcnt'/>
198
+ <feature policy='require' name='hypervisor'/>
199
+ - <feature policy='require' name='mmxext'/>
200
+ + <feature policy='require' name='syscall'/>
201
+ <feature policy='require' name='fxsr_opt'/>
202
+ <feature policy='require' name='pdpe1gb'/>
203
+ - <feature policy='require' name='3dnowext'/>
204
+ - <feature policy='require' name='3dnow'/>
205
+ + <feature policy='require' name='lm'/>
206
+ + <feature policy='require' name='lahf_lm'/>
207
+ <feature policy='require' name='cmp_legacy'/>
208
+ <feature policy='require' name='cr8legacy'/>
209
+ + <feature policy='require' name='abm'/>
210
+ + <feature policy='require' name='sse4a'/>
211
+ + <feature policy='require' name='misalignsse'/>
212
+ <feature policy='require' name='3dnowprefetch'/>
213
+ <feature policy='require' name='osvw'/>
214
+ <feature policy='require' name='npt'/>
215
+ <feature policy='require' name='nrip-save'/>
216
+ - <feature policy='disable' name='nx'/>
217
+ - <feature policy='disable' name='rdtscp'/>
218
+ - <feature policy='disable' name='svm'/>
219
+ - <feature policy='disable' name='monitor'/>
220
+ </cpu>
221
+ diff --git a/tests/cputestdata/x86_64-cpuid-baseline-Broadwell-IBRS+Cascadelake.xml b/tests/cputestdata/x86_64-cpuid-baseline-Broadwell-IBRS+Cascadelake.xml
222
+ index 4e3f253e9b..99bce8db87 100644
223
+ --- a/tests/cputestdata/x86_64-cpuid-baseline-Broadwell-IBRS+Cascadelake.xml
224
+ +++ b/tests/cputestdata/x86_64-cpuid-baseline-Broadwell-IBRS+Cascadelake.xml
225
+ @@ -1,11 +1,14 @@
226
+ <cpu mode='custom' match='exact'>
227
+ - <model fallback='allow'>Skylake-Client-IBRS</model>
228
+ + <model fallback='allow'>Broadwell-IBRS</model>
229
+ <vendor>Intel</vendor>
230
+ + <feature policy='require' name='vme'/>
231
+ <feature policy='require' name='ss'/>
232
+ + <feature policy='require' name='f16c'/>
233
+ + <feature policy='require' name='rdrand'/>
234
+ <feature policy='require' name='hypervisor'/>
235
+ + <feature policy='require' name='arat'/>
236
+ <feature policy='require' name='tsc_adjust'/>
237
+ + <feature policy='require' name='xsaveopt'/>
238
+ <feature policy='require' name='pdpe1gb'/>
239
+ - <feature policy='disable' name='mpx'/>
240
+ - <feature policy='disable' name='xsavec'/>
241
+ - <feature policy='disable' name='xgetbv1'/>
242
+ + <feature policy='require' name='abm'/>
243
+ </cpu>
244
+ diff --git a/tests/cputestdata/x86_64-cpuid-baseline-Cascadelake+Icelake.xml b/tests/cputestdata/x86_64-cpuid-baseline-Cascadelake+Icelake.xml
245
+ index e372a3e446..071c799ba2 100644
246
+ --- a/tests/cputestdata/x86_64-cpuid-baseline-Cascadelake+Icelake.xml
247
+ +++ b/tests/cputestdata/x86_64-cpuid-baseline-Cascadelake+Icelake.xml
248
+ @@ -1,14 +1,15 @@
249
+ <cpu mode='custom' match='exact'>
250
+ - <model fallback='allow'>Cooperlake</model>
251
+ + <model fallback='allow'>Cascadelake-Server</model>
252
+ <vendor>Intel</vendor>
253
+ <feature policy='require' name='ss'/>
254
+ <feature policy='require' name='hypervisor'/>
255
+ <feature policy='require' name='tsc_adjust'/>
256
+ - <feature policy='require' name='mpx'/>
257
+ <feature policy='require' name='umip'/>
258
+ + <feature policy='require' name='pku'/>
259
+ + <feature policy='require' name='stibp'/>
260
+ + <feature policy='require' name='arch-capabilities'/>
261
+ <feature policy='require' name='xsaves'/>
262
+ - <feature policy='disable' name='avx512-bf16'/>
263
+ - <feature policy='disable' name='mds-no'/>
264
+ - <feature policy='disable' name='pschange-mc-no'/>
265
+ - <feature policy='disable' name='taa-no'/>
266
+ + <feature policy='require' name='rdctl-no'/>
267
+ + <feature policy='require' name='ibrs-all'/>
268
+ + <feature policy='require' name='skip-l1dfl-vmentry'/>
269
+ </cpu>
270
+ diff --git a/tests/cputestdata/x86_64-cpuid-baseline-Cascadelake+Skylake-IBRS.xml b/tests/cputestdata/x86_64-cpuid-baseline-Cascadelake+Skylake-IBRS.xml
271
+ index e559e01583..5e42876b39 100644
272
+ --- a/tests/cputestdata/x86_64-cpuid-baseline-Cascadelake+Skylake-IBRS.xml
273
+ +++ b/tests/cputestdata/x86_64-cpuid-baseline-Cascadelake+Skylake-IBRS.xml
274
+ @@ -1,12 +1,13 @@
275
+ <cpu mode='custom' match='exact'>
276
+ - <model fallback='allow'>Cascadelake-Server</model>
277
+ + <model fallback='allow'>Skylake-Server-IBRS</model>
278
+ <vendor>Intel</vendor>
279
+ <feature policy='require' name='ss'/>
280
+ <feature policy='require' name='hypervisor'/>
281
+ <feature policy='require' name='tsc_adjust'/>
282
+ + <feature policy='require' name='clflushopt'/>
283
+ <feature policy='require' name='umip'/>
284
+ <feature policy='require' name='pku'/>
285
+ + <feature policy='require' name='ssbd'/>
286
+ <feature policy='require' name='xsaves'/>
287
+ <feature policy='require' name='skip-l1dfl-vmentry'/>
288
+ - <feature policy='disable' name='avx512vnni'/>
289
+ </cpu>
290
+ diff --git a/tests/cputestdata/x86_64-cpuid-baseline-Cooperlake+Icelake.xml b/tests/cputestdata/x86_64-cpuid-baseline-Cooperlake+Icelake.xml
291
+ index e372a3e446..071c799ba2 100644
292
+ --- a/tests/cputestdata/x86_64-cpuid-baseline-Cooperlake+Icelake.xml
293
+ +++ b/tests/cputestdata/x86_64-cpuid-baseline-Cooperlake+Icelake.xml
294
+ @@ -1,14 +1,15 @@
295
+ <cpu mode='custom' match='exact'>
296
+ - <model fallback='allow'>Cooperlake</model>
297
+ + <model fallback='allow'>Cascadelake-Server</model>
298
+ <vendor>Intel</vendor>
299
+ <feature policy='require' name='ss'/>
300
+ <feature policy='require' name='hypervisor'/>
301
+ <feature policy='require' name='tsc_adjust'/>
302
+ - <feature policy='require' name='mpx'/>
303
+ <feature policy='require' name='umip'/>
304
+ + <feature policy='require' name='pku'/>
305
+ + <feature policy='require' name='stibp'/>
306
+ + <feature policy='require' name='arch-capabilities'/>
307
+ <feature policy='require' name='xsaves'/>
308
+ - <feature policy='disable' name='avx512-bf16'/>
309
+ - <feature policy='disable' name='mds-no'/>
310
+ - <feature policy='disable' name='pschange-mc-no'/>
311
+ - <feature policy='disable' name='taa-no'/>
312
+ + <feature policy='require' name='rdctl-no'/>
313
+ + <feature policy='require' name='ibrs-all'/>
314
+ + <feature policy='require' name='skip-l1dfl-vmentry'/>
315
+ </cpu>
316
+ diff --git a/tests/cputestdata/x86_64-host+guest,models-result.xml b/tests/cputestdata/x86_64-host+guest,models-result.xml
317
+ index 0dd6955898..42664a48b4 100644
318
+ --- a/tests/cputestdata/x86_64-host+guest,models-result.xml
319
+ +++ b/tests/cputestdata/x86_64-host+guest,models-result.xml
320
+ @@ -1,17 +1,19 @@
321
+ <cpu mode='custom' match='exact'>
322
+ - <model fallback='allow'>Nehalem</model>
323
+ + <model fallback='allow'>qemu64</model>
324
+ <topology sockets='2' dies='1' cores='4' threads='1'/>
325
+ <feature policy='force' name='pbe'/>
326
+ <feature policy='force' name='monitor'/>
327
+ + <feature policy='require' name='ssse3'/>
328
+ <feature policy='require' name='xtpr'/>
329
+ <feature policy='require' name='dca'/>
330
+ + <feature policy='require' name='sse4.1'/>
331
+ <feature policy='force' name='3dnowext'/>
332
+ - <feature policy='force' name='svm'/>
333
+ + <feature policy='require' name='lahf_lm'/>
334
+ <feature policy='disable' name='sse'/>
335
+ <feature policy='disable' name='sse4.2'/>
336
+ - <feature policy='forbid' name='popcnt'/>
337
+ <feature policy='disable' name='3dnow'/>
338
+ - <feature policy='require' name='ssse3'/>
339
+ <feature policy='disable' name='vmx'/>
340
+ <feature policy='disable' name='ds_cpl'/>
341
+ + <feature policy='force' name='svm'/>
342
+ + <feature policy='forbid' name='popcnt'/>
343
+ </cpu>
344
+ diff --git a/tests/domaincapsdata/qemu_2.11.0-tcg.x86_64.xml b/tests/domaincapsdata/qemu_2.11.0-tcg.x86_64.xml
345
+ index cccc6830f9..4a92b5bead 100644
346
+ --- a/tests/domaincapsdata/qemu_2.11.0-tcg.x86_64.xml
347
+ +++ b/tests/domaincapsdata/qemu_2.11.0-tcg.x86_64.xml
348
+ @@ -36,34 +36,42 @@
349
+ </enum>
350
+ </mode>
351
+ <mode name='host-model' supported='yes'>
352
+ - <model fallback='forbid'>EPYC</model>
353
+ + <model fallback='forbid'>Opteron_G3</model>
354
+ <vendor>AMD</vendor>
355
+ <feature policy='require' name='acpi'/>
356
+ <feature policy='require' name='ss'/>
357
+ + <feature policy='require' name='pclmuldq'/>
358
+ <feature policy='require' name='monitor'/>
359
+ + <feature policy='require' name='ssse3'/>
360
+ + <feature policy='require' name='sse4.1'/>
361
+ + <feature policy='require' name='sse4.2'/>
362
+ + <feature policy='require' name='movbe'/>
363
+ + <feature policy='require' name='aes'/>
364
+ + <feature policy='require' name='xsave'/>
365
+ <feature policy='require' name='hypervisor'/>
366
+ + <feature policy='require' name='arat'/>
367
+ + <feature policy='require' name='fsgsbase'/>
368
+ + <feature policy='require' name='bmi1'/>
369
+ + <feature policy='require' name='smep'/>
370
+ + <feature policy='require' name='bmi2'/>
371
+ <feature policy='require' name='erms'/>
372
+ <feature policy='require' name='mpx'/>
373
+ + <feature policy='require' name='adx'/>
374
+ + <feature policy='require' name='smap'/>
375
+ <feature policy='require' name='pcommit'/>
376
+ + <feature policy='require' name='clflushopt'/>
377
+ <feature policy='require' name='clwb'/>
378
+ <feature policy='require' name='pku'/>
379
+ <feature policy='require' name='ospke'/>
380
+ <feature policy='require' name='la57'/>
381
+ + <feature policy='require' name='xsaveopt'/>
382
+ + <feature policy='require' name='xgetbv1'/>
383
+ + <feature policy='require' name='mmxext'/>
384
+ + <feature policy='require' name='pdpe1gb'/>
385
+ <feature policy='require' name='3dnowext'/>
386
+ <feature policy='require' name='3dnow'/>
387
+ - <feature policy='disable' name='vme'/>
388
+ - <feature policy='disable' name='fma'/>
389
+ - <feature policy='disable' name='avx'/>
390
+ - <feature policy='disable' name='f16c'/>
391
+ - <feature policy='disable' name='rdrand'/>
392
+ - <feature policy='disable' name='avx2'/>
393
+ - <feature policy='disable' name='rdseed'/>
394
+ - <feature policy='disable' name='sha-ni'/>
395
+ - <feature policy='disable' name='xsavec'/>
396
+ - <feature policy='disable' name='fxsr_opt'/>
397
+ + <feature policy='require' name='cr8legacy'/>
398
+ <feature policy='disable' name='misalignsse'/>
399
+ - <feature policy='disable' name='3dnowprefetch'/>
400
+ - <feature policy='disable' name='osvw'/>
401
+ </mode>
402
+ <mode name='custom' supported='yes'>
403
+ <model usable='yes'>qemu64</model>
404
+ diff --git a/tests/domaincapsdata/qemu_2.12.0-tcg.x86_64.xml b/tests/domaincapsdata/qemu_2.12.0-tcg.x86_64.xml
405
+ index 575506d852..7799a6a7a6 100644
406
+ --- a/tests/domaincapsdata/qemu_2.12.0-tcg.x86_64.xml
407
+ +++ b/tests/domaincapsdata/qemu_2.12.0-tcg.x86_64.xml
408
+ @@ -36,34 +36,42 @@
409
+ </enum>
410
+ </mode>
411
+ <mode name='host-model' supported='yes'>
412
+ - <model fallback='forbid'>EPYC</model>
413
+ + <model fallback='forbid'>Opteron_G3</model>
414
+ <vendor>AMD</vendor>
415
+ <feature policy='require' name='acpi'/>
416
+ <feature policy='require' name='ss'/>
417
+ + <feature policy='require' name='pclmuldq'/>
418
+ <feature policy='require' name='monitor'/>
419
+ + <feature policy='require' name='ssse3'/>
420
+ + <feature policy='require' name='sse4.1'/>
421
+ + <feature policy='require' name='sse4.2'/>
422
+ + <feature policy='require' name='movbe'/>
423
+ + <feature policy='require' name='aes'/>
424
+ + <feature policy='require' name='xsave'/>
425
+ <feature policy='require' name='hypervisor'/>
426
+ + <feature policy='require' name='arat'/>
427
+ + <feature policy='require' name='fsgsbase'/>
428
+ + <feature policy='require' name='bmi1'/>
429
+ + <feature policy='require' name='smep'/>
430
+ + <feature policy='require' name='bmi2'/>
431
+ <feature policy='require' name='erms'/>
432
+ <feature policy='require' name='mpx'/>
433
+ + <feature policy='require' name='adx'/>
434
+ + <feature policy='require' name='smap'/>
435
+ <feature policy='require' name='pcommit'/>
436
+ + <feature policy='require' name='clflushopt'/>
437
+ <feature policy='require' name='clwb'/>
438
+ <feature policy='require' name='pku'/>
439
+ <feature policy='require' name='ospke'/>
440
+ <feature policy='require' name='la57'/>
441
+ + <feature policy='require' name='xsaveopt'/>
442
+ + <feature policy='require' name='xgetbv1'/>
443
+ + <feature policy='require' name='mmxext'/>
444
+ + <feature policy='require' name='pdpe1gb'/>
445
+ <feature policy='require' name='3dnowext'/>
446
+ <feature policy='require' name='3dnow'/>
447
+ - <feature policy='disable' name='vme'/>
448
+ - <feature policy='disable' name='fma'/>
449
+ - <feature policy='disable' name='avx'/>
450
+ - <feature policy='disable' name='f16c'/>
451
+ - <feature policy='disable' name='rdrand'/>
452
+ - <feature policy='disable' name='avx2'/>
453
+ - <feature policy='disable' name='rdseed'/>
454
+ - <feature policy='disable' name='sha-ni'/>
455
+ - <feature policy='disable' name='xsavec'/>
456
+ - <feature policy='disable' name='fxsr_opt'/>
457
+ + <feature policy='require' name='cr8legacy'/>
458
+ <feature policy='disable' name='misalignsse'/>
459
+ - <feature policy='disable' name='3dnowprefetch'/>
460
+ - <feature policy='disable' name='osvw'/>
461
+ </mode>
462
+ <mode name='custom' supported='yes'>
463
+ <model usable='yes'>qemu64</model>
464
+ diff --git a/tests/domaincapsdata/qemu_2.9.0-tcg.x86_64.xml b/tests/domaincapsdata/qemu_2.9.0-tcg.x86_64.xml
465
+ index b47c426f1b..fe12641fbe 100644
466
+ --- a/tests/domaincapsdata/qemu_2.9.0-tcg.x86_64.xml
467
+ +++ b/tests/domaincapsdata/qemu_2.9.0-tcg.x86_64.xml
468
+ @@ -36,12 +36,19 @@
469
+ </enum>
470
+ </mode>
471
+ <mode name='host-model' supported='yes'>
472
+ - <model fallback='forbid'>Opteron_G4</model>
473
+ + <model fallback='forbid'>Opteron_G3</model>
474
+ <vendor>AMD</vendor>
475
+ <feature policy='require' name='acpi'/>
476
+ <feature policy='require' name='ss'/>
477
+ + <feature policy='require' name='pclmuldq'/>
478
+ <feature policy='require' name='monitor'/>
479
+ + <feature policy='require' name='ssse3'/>
480
+ + <feature policy='require' name='sse4.1'/>
481
+ + <feature policy='require' name='sse4.2'/>
482
+ <feature policy='require' name='movbe'/>
483
+ + <feature policy='require' name='aes'/>
484
+ + <feature policy='require' name='xsave'/>
485
+ + <feature policy='require' name='rdrand'/>
486
+ <feature policy='require' name='hypervisor'/>
487
+ <feature policy='require' name='arat'/>
488
+ <feature policy='require' name='fsgsbase'/>
489
+ @@ -61,14 +68,13 @@
490
+ <feature policy='require' name='xsaveopt'/>
491
+ <feature policy='require' name='xgetbv1'/>
492
+ <feature policy='require' name='mmxext'/>
493
+ + <feature policy='require' name='pdpe1gb'/>
494
+ <feature policy='require' name='3dnowext'/>
495
+ <feature policy='require' name='3dnow'/>
496
+ <feature policy='require' name='cr8legacy'/>
497
+ - <feature policy='disable' name='avx'/>
498
+ + <feature policy='require' name='npt'/>
499
+ + <feature policy='require' name='svme-addr-chk'/>
500
+ <feature policy='disable' name='misalignsse'/>
501
+ - <feature policy='disable' name='3dnowprefetch'/>
502
+ - <feature policy='disable' name='xop'/>
503
+ - <feature policy='disable' name='fma4'/>
504
+ </mode>
505
+ <mode name='custom' supported='yes'>
506
+ <model usable='yes'>qemu64</model>
507
+ diff --git a/tests/domaincapsdata/qemu_3.0.0-tcg.x86_64.xml b/tests/domaincapsdata/qemu_3.0.0-tcg.x86_64.xml
508
+ index 301101095c..daccacba0e 100644
509
+ --- a/tests/domaincapsdata/qemu_3.0.0-tcg.x86_64.xml
510
+ +++ b/tests/domaincapsdata/qemu_3.0.0-tcg.x86_64.xml
511
+ @@ -36,35 +36,42 @@
512
+ </enum>
513
+ </mode>
514
+ <mode name='host-model' supported='yes'>
515
+ - <model fallback='forbid'>EPYC</model>
516
+ + <model fallback='forbid'>Opteron_G3</model>
517
+ <vendor>AMD</vendor>
518
+ <feature policy='require' name='acpi'/>
519
+ <feature policy='require' name='ss'/>
520
+ + <feature policy='require' name='pclmuldq'/>
521
+ <feature policy='require' name='monitor'/>
522
+ + <feature policy='require' name='ssse3'/>
523
+ + <feature policy='require' name='sse4.1'/>
524
+ + <feature policy='require' name='sse4.2'/>
525
+ + <feature policy='require' name='movbe'/>
526
+ + <feature policy='require' name='aes'/>
527
+ + <feature policy='require' name='xsave'/>
528
+ <feature policy='require' name='hypervisor'/>
529
+ + <feature policy='require' name='arat'/>
530
+ + <feature policy='require' name='fsgsbase'/>
531
+ + <feature policy='require' name='bmi1'/>
532
+ + <feature policy='require' name='smep'/>
533
+ + <feature policy='require' name='bmi2'/>
534
+ <feature policy='require' name='erms'/>
535
+ <feature policy='require' name='mpx'/>
536
+ + <feature policy='require' name='adx'/>
537
+ + <feature policy='require' name='smap'/>
538
+ <feature policy='require' name='pcommit'/>
539
+ + <feature policy='require' name='clflushopt'/>
540
+ <feature policy='require' name='clwb'/>
541
+ <feature policy='require' name='pku'/>
542
+ <feature policy='require' name='la57'/>
543
+ + <feature policy='require' name='xsaveopt'/>
544
+ + <feature policy='require' name='xgetbv1'/>
545
+ + <feature policy='require' name='mmxext'/>
546
+ + <feature policy='require' name='pdpe1gb'/>
547
+ <feature policy='require' name='3dnowext'/>
548
+ <feature policy='require' name='3dnow'/>
549
+ + <feature policy='require' name='cr8legacy'/>
550
+ <feature policy='require' name='npt'/>
551
+ - <feature policy='disable' name='vme'/>
552
+ - <feature policy='disable' name='fma'/>
553
+ - <feature policy='disable' name='avx'/>
554
+ - <feature policy='disable' name='f16c'/>
555
+ - <feature policy='disable' name='rdrand'/>
556
+ - <feature policy='disable' name='avx2'/>
557
+ - <feature policy='disable' name='rdseed'/>
558
+ - <feature policy='disable' name='sha-ni'/>
559
+ - <feature policy='disable' name='xsavec'/>
560
+ - <feature policy='disable' name='fxsr_opt'/>
561
+ <feature policy='disable' name='misalignsse'/>
562
+ - <feature policy='disable' name='3dnowprefetch'/>
563
+ - <feature policy='disable' name='osvw'/>
564
+ - <feature policy='disable' name='topoext'/>
565
+ </mode>
566
+ <mode name='custom' supported='yes'>
567
+ <model usable='yes'>qemu64</model>
568
+ diff --git a/tests/domaincapsdata/qemu_3.1.0-tcg.x86_64.xml b/tests/domaincapsdata/qemu_3.1.0-tcg.x86_64.xml
569
+ index 1a5bc25b99..2a65cb0ad9 100644
570
+ --- a/tests/domaincapsdata/qemu_3.1.0-tcg.x86_64.xml
571
+ +++ b/tests/domaincapsdata/qemu_3.1.0-tcg.x86_64.xml
572
+ @@ -36,35 +36,42 @@
573
+ </enum>
574
+ </mode>
575
+ <mode name='host-model' supported='yes'>
576
+ - <model fallback='forbid'>EPYC</model>
577
+ + <model fallback='forbid'>Opteron_G3</model>
578
+ <vendor>AMD</vendor>
579
+ <feature policy='require' name='acpi'/>
580
+ <feature policy='require' name='ss'/>
581
+ + <feature policy='require' name='pclmuldq'/>
582
+ <feature policy='require' name='monitor'/>
583
+ + <feature policy='require' name='ssse3'/>
584
+ + <feature policy='require' name='sse4.1'/>
585
+ + <feature policy='require' name='sse4.2'/>
586
+ + <feature policy='require' name='movbe'/>
587
+ + <feature policy='require' name='aes'/>
588
+ + <feature policy='require' name='xsave'/>
589
+ <feature policy='require' name='hypervisor'/>
590
+ + <feature policy='require' name='arat'/>
591
+ + <feature policy='require' name='fsgsbase'/>
592
+ + <feature policy='require' name='bmi1'/>
593
+ + <feature policy='require' name='smep'/>
594
+ + <feature policy='require' name='bmi2'/>
595
+ <feature policy='require' name='erms'/>
596
+ <feature policy='require' name='mpx'/>
597
+ + <feature policy='require' name='adx'/>
598
+ + <feature policy='require' name='smap'/>
599
+ <feature policy='require' name='pcommit'/>
600
+ + <feature policy='require' name='clflushopt'/>
601
+ <feature policy='require' name='clwb'/>
602
+ <feature policy='require' name='pku'/>
603
+ <feature policy='require' name='la57'/>
604
+ + <feature policy='require' name='xsaveopt'/>
605
+ + <feature policy='require' name='xgetbv1'/>
606
+ + <feature policy='require' name='mmxext'/>
607
+ + <feature policy='require' name='pdpe1gb'/>
608
+ <feature policy='require' name='3dnowext'/>
609
+ <feature policy='require' name='3dnow'/>
610
+ + <feature policy='require' name='cr8legacy'/>
611
+ <feature policy='require' name='npt'/>
612
+ - <feature policy='disable' name='vme'/>
613
+ - <feature policy='disable' name='fma'/>
614
+ - <feature policy='disable' name='avx'/>
615
+ - <feature policy='disable' name='f16c'/>
616
+ - <feature policy='disable' name='rdrand'/>
617
+ - <feature policy='disable' name='avx2'/>
618
+ - <feature policy='disable' name='rdseed'/>
619
+ - <feature policy='disable' name='sha-ni'/>
620
+ - <feature policy='disable' name='xsavec'/>
621
+ - <feature policy='disable' name='fxsr_opt'/>
622
+ <feature policy='disable' name='misalignsse'/>
623
+ - <feature policy='disable' name='3dnowprefetch'/>
624
+ - <feature policy='disable' name='osvw'/>
625
+ - <feature policy='disable' name='topoext'/>
626
+ </mode>
627
+ <mode name='custom' supported='yes'>
628
+ <model usable='yes'>qemu64</model>
629
+ diff --git a/tests/domaincapsdata/qemu_4.0.0-tcg.x86_64.xml b/tests/domaincapsdata/qemu_4.0.0-tcg.x86_64.xml
630
+ index e744ac27ac..a4dc7bafc9 100644
631
+ --- a/tests/domaincapsdata/qemu_4.0.0-tcg.x86_64.xml
632
+ +++ b/tests/domaincapsdata/qemu_4.0.0-tcg.x86_64.xml
633
+ @@ -36,36 +36,42 @@
634
+ </enum>
635
+ </mode>
636
+ <mode name='host-model' supported='yes'>
637
+ - <model fallback='forbid'>EPYC</model>
638
+ + <model fallback='forbid'>Opteron_G3</model>
639
+ <vendor>AMD</vendor>
640
+ <feature policy='require' name='acpi'/>
641
+ <feature policy='require' name='ss'/>
642
+ + <feature policy='require' name='pclmuldq'/>
643
+ <feature policy='require' name='monitor'/>
644
+ + <feature policy='require' name='ssse3'/>
645
+ + <feature policy='require' name='sse4.1'/>
646
+ + <feature policy='require' name='sse4.2'/>
647
+ + <feature policy='require' name='movbe'/>
648
+ + <feature policy='require' name='aes'/>
649
+ + <feature policy='require' name='xsave'/>
650
+ <feature policy='require' name='hypervisor'/>
651
+ + <feature policy='require' name='arat'/>
652
+ + <feature policy='require' name='fsgsbase'/>
653
+ + <feature policy='require' name='bmi1'/>
654
+ + <feature policy='require' name='smep'/>
655
+ + <feature policy='require' name='bmi2'/>
656
+ <feature policy='require' name='erms'/>
657
+ <feature policy='require' name='mpx'/>
658
+ + <feature policy='require' name='adx'/>
659
+ + <feature policy='require' name='smap'/>
660
+ <feature policy='require' name='pcommit'/>
661
+ + <feature policy='require' name='clflushopt'/>
662
+ <feature policy='require' name='clwb'/>
663
+ <feature policy='require' name='pku'/>
664
+ <feature policy='require' name='la57'/>
665
+ + <feature policy='require' name='xsaveopt'/>
666
+ + <feature policy='require' name='xgetbv1'/>
667
+ + <feature policy='require' name='mmxext'/>
668
+ + <feature policy='require' name='pdpe1gb'/>
669
+ <feature policy='require' name='3dnowext'/>
670
+ <feature policy='require' name='3dnow'/>
671
+ + <feature policy='require' name='cr8legacy'/>
672
+ <feature policy='require' name='npt'/>
673
+ - <feature policy='disable' name='vme'/>
674
+ - <feature policy='disable' name='fma'/>
675
+ - <feature policy='disable' name='avx'/>
676
+ - <feature policy='disable' name='f16c'/>
677
+ - <feature policy='disable' name='rdrand'/>
678
+ - <feature policy='disable' name='avx2'/>
679
+ - <feature policy='disable' name='rdseed'/>
680
+ - <feature policy='disable' name='sha-ni'/>
681
+ - <feature policy='disable' name='xsavec'/>
682
+ - <feature policy='disable' name='fxsr_opt'/>
683
+ <feature policy='disable' name='misalignsse'/>
684
+ - <feature policy='disable' name='3dnowprefetch'/>
685
+ - <feature policy='disable' name='osvw'/>
686
+ - <feature policy='disable' name='topoext'/>
687
+ - <feature policy='disable' name='nrip-save'/>
688
+ </mode>
689
+ <mode name='custom' supported='yes'>
690
+ <model usable='yes'>qemu64</model>
691
+ diff --git a/tests/domaincapsdata/qemu_4.1.0-tcg.x86_64.xml b/tests/domaincapsdata/qemu_4.1.0-tcg.x86_64.xml
692
+ index 80b1ce8ef9..b20c02cb68 100644
693
+ --- a/tests/domaincapsdata/qemu_4.1.0-tcg.x86_64.xml
694
+ +++ b/tests/domaincapsdata/qemu_4.1.0-tcg.x86_64.xml
695
+ @@ -36,36 +36,43 @@
696
+ </enum>
697
+ </mode>
698
+ <mode name='host-model' supported='yes'>
699
+ - <model fallback='forbid'>EPYC-IBPB</model>
700
+ + <model fallback='forbid'>Opteron_G3</model>
701
+ <vendor>AMD</vendor>
702
+ <feature policy='require' name='acpi'/>
703
+ <feature policy='require' name='ss'/>
704
+ + <feature policy='require' name='pclmuldq'/>
705
+ <feature policy='require' name='monitor'/>
706
+ + <feature policy='require' name='ssse3'/>
707
+ + <feature policy='require' name='sse4.1'/>
708
+ + <feature policy='require' name='sse4.2'/>
709
+ + <feature policy='require' name='movbe'/>
710
+ + <feature policy='require' name='aes'/>
711
+ + <feature policy='require' name='xsave'/>
712
+ + <feature policy='require' name='rdrand'/>
713
+ <feature policy='require' name='hypervisor'/>
714
+ + <feature policy='require' name='arat'/>
715
+ + <feature policy='require' name='fsgsbase'/>
716
+ + <feature policy='require' name='bmi1'/>
717
+ + <feature policy='require' name='smep'/>
718
+ + <feature policy='require' name='bmi2'/>
719
+ <feature policy='require' name='erms'/>
720
+ <feature policy='require' name='mpx'/>
721
+ + <feature policy='require' name='adx'/>
722
+ + <feature policy='require' name='smap'/>
723
+ <feature policy='require' name='pcommit'/>
724
+ + <feature policy='require' name='clflushopt'/>
725
+ <feature policy='require' name='clwb'/>
726
+ <feature policy='require' name='pku'/>
727
+ <feature policy='require' name='la57'/>
728
+ + <feature policy='require' name='xsaveopt'/>
729
+ + <feature policy='require' name='xgetbv1'/>
730
+ + <feature policy='require' name='mmxext'/>
731
+ + <feature policy='require' name='pdpe1gb'/>
732
+ <feature policy='require' name='3dnowext'/>
733
+ <feature policy='require' name='3dnow'/>
734
+ + <feature policy='require' name='cr8legacy'/>
735
+ <feature policy='require' name='npt'/>
736
+ - <feature policy='disable' name='vme'/>
737
+ - <feature policy='disable' name='fma'/>
738
+ - <feature policy='disable' name='avx'/>
739
+ - <feature policy='disable' name='f16c'/>
740
+ - <feature policy='disable' name='avx2'/>
741
+ - <feature policy='disable' name='rdseed'/>
742
+ - <feature policy='disable' name='sha-ni'/>
743
+ - <feature policy='disable' name='xsavec'/>
744
+ - <feature policy='disable' name='fxsr_opt'/>
745
+ <feature policy='disable' name='misalignsse'/>
746
+ - <feature policy='disable' name='3dnowprefetch'/>
747
+ - <feature policy='disable' name='osvw'/>
748
+ - <feature policy='disable' name='topoext'/>
749
+ - <feature policy='disable' name='ibpb'/>
750
+ - <feature policy='disable' name='nrip-save'/>
751
+ </mode>
752
+ <mode name='custom' supported='yes'>
753
+ <model usable='yes'>qemu64</model>
754
+ diff --git a/tests/domaincapsdata/qemu_4.2.0-tcg.x86_64.xml b/tests/domaincapsdata/qemu_4.2.0-tcg.x86_64.xml
755
+ index 91b3ed6f80..d0ee3f7b7a 100644
756
+ --- a/tests/domaincapsdata/qemu_4.2.0-tcg.x86_64.xml
757
+ +++ b/tests/domaincapsdata/qemu_4.2.0-tcg.x86_64.xml
758
+ @@ -36,36 +36,43 @@
759
+ </enum>
760
+ </mode>
761
+ <mode name='host-model' supported='yes'>
762
+ - <model fallback='forbid'>EPYC-IBPB</model>
763
+ + <model fallback='forbid'>Opteron_G3</model>
764
+ <vendor>AMD</vendor>
765
+ <feature policy='require' name='acpi'/>
766
+ <feature policy='require' name='ss'/>
767
+ + <feature policy='require' name='pclmuldq'/>
768
+ <feature policy='require' name='monitor'/>
769
+ + <feature policy='require' name='ssse3'/>
770
+ + <feature policy='require' name='sse4.1'/>
771
+ + <feature policy='require' name='sse4.2'/>
772
+ + <feature policy='require' name='movbe'/>
773
+ + <feature policy='require' name='aes'/>
774
+ + <feature policy='require' name='xsave'/>
775
+ + <feature policy='require' name='rdrand'/>
776
+ <feature policy='require' name='hypervisor'/>
777
+ + <feature policy='require' name='arat'/>
778
+ + <feature policy='require' name='fsgsbase'/>
779
+ + <feature policy='require' name='bmi1'/>
780
+ + <feature policy='require' name='smep'/>
781
+ + <feature policy='require' name='bmi2'/>
782
+ <feature policy='require' name='erms'/>
783
+ <feature policy='require' name='mpx'/>
784
+ + <feature policy='require' name='adx'/>
785
+ + <feature policy='require' name='smap'/>
786
+ <feature policy='require' name='pcommit'/>
787
+ + <feature policy='require' name='clflushopt'/>
788
+ <feature policy='require' name='clwb'/>
789
+ <feature policy='require' name='pku'/>
790
+ <feature policy='require' name='la57'/>
791
+ + <feature policy='require' name='xsaveopt'/>
792
+ + <feature policy='require' name='xgetbv1'/>
793
+ + <feature policy='require' name='mmxext'/>
794
+ + <feature policy='require' name='pdpe1gb'/>
795
+ <feature policy='require' name='3dnowext'/>
796
+ <feature policy='require' name='3dnow'/>
797
+ + <feature policy='require' name='cr8legacy'/>
798
+ <feature policy='require' name='npt'/>
799
+ - <feature policy='disable' name='vme'/>
800
+ - <feature policy='disable' name='fma'/>
801
+ - <feature policy='disable' name='avx'/>
802
+ - <feature policy='disable' name='f16c'/>
803
+ - <feature policy='disable' name='avx2'/>
804
+ - <feature policy='disable' name='rdseed'/>
805
+ - <feature policy='disable' name='sha-ni'/>
806
+ - <feature policy='disable' name='xsavec'/>
807
+ - <feature policy='disable' name='fxsr_opt'/>
808
+ <feature policy='disable' name='misalignsse'/>
809
+ - <feature policy='disable' name='3dnowprefetch'/>
810
+ - <feature policy='disable' name='osvw'/>
811
+ - <feature policy='disable' name='topoext'/>
812
+ - <feature policy='disable' name='ibpb'/>
813
+ - <feature policy='disable' name='nrip-save'/>
814
+ </mode>
815
+ <mode name='custom' supported='yes'>
816
+ <model usable='yes'>qemu64</model>
817
+ diff --git a/tests/domaincapsdata/qemu_5.0.0-tcg.x86_64.xml b/tests/domaincapsdata/qemu_5.0.0-tcg.x86_64.xml
818
+ index b8737613e9..d277c96426 100644
819
+ --- a/tests/domaincapsdata/qemu_5.0.0-tcg.x86_64.xml
820
+ +++ b/tests/domaincapsdata/qemu_5.0.0-tcg.x86_64.xml
821
+ @@ -36,35 +36,43 @@
822
+ </enum>
823
+ </mode>
824
+ <mode name='host-model' supported='yes'>
825
+ - <model fallback='forbid'>EPYC</model>
826
+ + <model fallback='forbid'>Opteron_G3</model>
827
+ <vendor>AMD</vendor>
828
+ <feature policy='require' name='acpi'/>
829
+ <feature policy='require' name='ss'/>
830
+ + <feature policy='require' name='pclmuldq'/>
831
+ <feature policy='require' name='monitor'/>
832
+ + <feature policy='require' name='ssse3'/>
833
+ + <feature policy='require' name='sse4.1'/>
834
+ + <feature policy='require' name='sse4.2'/>
835
+ + <feature policy='require' name='movbe'/>
836
+ + <feature policy='require' name='aes'/>
837
+ + <feature policy='require' name='xsave'/>
838
+ + <feature policy='require' name='rdrand'/>
839
+ <feature policy='require' name='hypervisor'/>
840
+ + <feature policy='require' name='arat'/>
841
+ + <feature policy='require' name='fsgsbase'/>
842
+ + <feature policy='require' name='bmi1'/>
843
+ + <feature policy='require' name='smep'/>
844
+ + <feature policy='require' name='bmi2'/>
845
+ <feature policy='require' name='erms'/>
846
+ <feature policy='require' name='mpx'/>
847
+ + <feature policy='require' name='adx'/>
848
+ + <feature policy='require' name='smap'/>
849
+ <feature policy='require' name='pcommit'/>
850
+ + <feature policy='require' name='clflushopt'/>
851
+ <feature policy='require' name='clwb'/>
852
+ <feature policy='require' name='pku'/>
853
+ <feature policy='require' name='la57'/>
854
+ + <feature policy='require' name='xsaveopt'/>
855
+ + <feature policy='require' name='xgetbv1'/>
856
+ + <feature policy='require' name='mmxext'/>
857
+ + <feature policy='require' name='pdpe1gb'/>
858
+ <feature policy='require' name='3dnowext'/>
859
+ <feature policy='require' name='3dnow'/>
860
+ + <feature policy='require' name='cr8legacy'/>
861
+ <feature policy='require' name='npt'/>
862
+ - <feature policy='disable' name='vme'/>
863
+ - <feature policy='disable' name='fma'/>
864
+ - <feature policy='disable' name='avx'/>
865
+ - <feature policy='disable' name='f16c'/>
866
+ - <feature policy='disable' name='avx2'/>
867
+ - <feature policy='disable' name='rdseed'/>
868
+ - <feature policy='disable' name='sha-ni'/>
869
+ - <feature policy='disable' name='xsavec'/>
870
+ - <feature policy='disable' name='fxsr_opt'/>
871
+ <feature policy='disable' name='misalignsse'/>
872
+ - <feature policy='disable' name='3dnowprefetch'/>
873
+ - <feature policy='disable' name='osvw'/>
874
+ - <feature policy='disable' name='topoext'/>
875
+ - <feature policy='disable' name='nrip-save'/>
876
+ </mode>
877
+ <mode name='custom' supported='yes'>
878
+ <model usable='yes'>qemu64</model>
879
+ diff --git a/tests/domaincapsdata/qemu_5.1.0-tcg.x86_64.xml b/tests/domaincapsdata/qemu_5.1.0-tcg.x86_64.xml
880
+ index 034036ca96..4f1ffbb2ba 100644
881
+ --- a/tests/domaincapsdata/qemu_5.1.0-tcg.x86_64.xml
882
+ +++ b/tests/domaincapsdata/qemu_5.1.0-tcg.x86_64.xml
883
+ @@ -36,35 +36,43 @@
884
+ </enum>
885
+ </mode>
886
+ <mode name='host-model' supported='yes'>
887
+ - <model fallback='forbid'>EPYC</model>
888
+ + <model fallback='forbid'>Opteron_G3</model>
889
+ <vendor>AMD</vendor>
890
+ <feature policy='require' name='acpi'/>
891
+ <feature policy='require' name='ss'/>
892
+ + <feature policy='require' name='pclmuldq'/>
893
+ <feature policy='require' name='monitor'/>
894
+ + <feature policy='require' name='ssse3'/>
895
+ + <feature policy='require' name='sse4.1'/>
896
+ + <feature policy='require' name='sse4.2'/>
897
+ + <feature policy='require' name='movbe'/>
898
+ + <feature policy='require' name='aes'/>
899
+ + <feature policy='require' name='xsave'/>
900
+ + <feature policy='require' name='rdrand'/>
901
+ <feature policy='require' name='hypervisor'/>
902
+ + <feature policy='require' name='arat'/>
903
+ + <feature policy='require' name='fsgsbase'/>
904
+ + <feature policy='require' name='bmi1'/>
905
+ + <feature policy='require' name='smep'/>
906
+ + <feature policy='require' name='bmi2'/>
907
+ <feature policy='require' name='erms'/>
908
+ <feature policy='require' name='mpx'/>
909
+ + <feature policy='require' name='adx'/>
910
+ + <feature policy='require' name='smap'/>
911
+ <feature policy='require' name='pcommit'/>
912
+ + <feature policy='require' name='clflushopt'/>
913
+ <feature policy='require' name='clwb'/>
914
+ <feature policy='require' name='pku'/>
915
+ <feature policy='require' name='la57'/>
916
+ + <feature policy='require' name='xsaveopt'/>
917
+ + <feature policy='require' name='xgetbv1'/>
918
+ + <feature policy='require' name='mmxext'/>
919
+ + <feature policy='require' name='pdpe1gb'/>
920
+ <feature policy='require' name='3dnowext'/>
921
+ <feature policy='require' name='3dnow'/>
922
+ + <feature policy='require' name='cr8legacy'/>
923
+ <feature policy='require' name='npt'/>
924
+ - <feature policy='disable' name='vme'/>
925
+ - <feature policy='disable' name='fma'/>
926
+ - <feature policy='disable' name='avx'/>
927
+ - <feature policy='disable' name='f16c'/>
928
+ - <feature policy='disable' name='avx2'/>
929
+ - <feature policy='disable' name='rdseed'/>
930
+ - <feature policy='disable' name='sha-ni'/>
931
+ - <feature policy='disable' name='xsavec'/>
932
+ - <feature policy='disable' name='fxsr_opt'/>
933
+ <feature policy='disable' name='misalignsse'/>
934
+ - <feature policy='disable' name='3dnowprefetch'/>
935
+ - <feature policy='disable' name='osvw'/>
936
+ - <feature policy='disable' name='topoext'/>
937
+ - <feature policy='disable' name='nrip-save'/>
938
+ </mode>
939
+ <mode name='custom' supported='yes'>
940
+ <model usable='yes'>qemu64</model>
941
+ diff --git a/tests/domaincapsdata/qemu_5.2.0-tcg.x86_64.xml b/tests/domaincapsdata/qemu_5.2.0-tcg.x86_64.xml
942
+ index d3a4b01234..6cff0f815e 100644
943
+ --- a/tests/domaincapsdata/qemu_5.2.0-tcg.x86_64.xml
944
+ +++ b/tests/domaincapsdata/qemu_5.2.0-tcg.x86_64.xml
945
+ @@ -36,35 +36,43 @@
946
+ </enum>
947
+ </mode>
948
+ <mode name='host-model' supported='yes'>
949
+ - <model fallback='forbid'>EPYC</model>
950
+ + <model fallback='forbid'>Opteron_G3</model>
951
+ <vendor>AMD</vendor>
952
+ <feature policy='require' name='acpi'/>
953
+ <feature policy='require' name='ss'/>
954
+ + <feature policy='require' name='pclmuldq'/>
955
+ <feature policy='require' name='monitor'/>
956
+ + <feature policy='require' name='ssse3'/>
957
+ + <feature policy='require' name='sse4.1'/>
958
+ + <feature policy='require' name='sse4.2'/>
959
+ + <feature policy='require' name='movbe'/>
960
+ + <feature policy='require' name='aes'/>
961
+ + <feature policy='require' name='xsave'/>
962
+ + <feature policy='require' name='rdrand'/>
963
+ <feature policy='require' name='hypervisor'/>
964
+ + <feature policy='require' name='arat'/>
965
+ + <feature policy='require' name='fsgsbase'/>
966
+ + <feature policy='require' name='bmi1'/>
967
+ + <feature policy='require' name='smep'/>
968
+ + <feature policy='require' name='bmi2'/>
969
+ <feature policy='require' name='erms'/>
970
+ <feature policy='require' name='mpx'/>
971
+ + <feature policy='require' name='adx'/>
972
+ + <feature policy='require' name='smap'/>
973
+ <feature policy='require' name='pcommit'/>
974
+ + <feature policy='require' name='clflushopt'/>
975
+ <feature policy='require' name='clwb'/>
976
+ <feature policy='require' name='pku'/>
977
+ <feature policy='require' name='la57'/>
978
+ + <feature policy='require' name='xsaveopt'/>
979
+ + <feature policy='require' name='xgetbv1'/>
980
+ + <feature policy='require' name='mmxext'/>
981
+ + <feature policy='require' name='pdpe1gb'/>
982
+ <feature policy='require' name='3dnowext'/>
983
+ <feature policy='require' name='3dnow'/>
984
+ + <feature policy='require' name='cr8legacy'/>
985
+ <feature policy='require' name='npt'/>
986
+ - <feature policy='disable' name='vme'/>
987
+ - <feature policy='disable' name='fma'/>
988
+ - <feature policy='disable' name='avx'/>
989
+ - <feature policy='disable' name='f16c'/>
990
+ - <feature policy='disable' name='avx2'/>
991
+ - <feature policy='disable' name='rdseed'/>
992
+ - <feature policy='disable' name='sha-ni'/>
993
+ - <feature policy='disable' name='xsavec'/>
994
+ - <feature policy='disable' name='fxsr_opt'/>
995
+ <feature policy='disable' name='misalignsse'/>
996
+ - <feature policy='disable' name='3dnowprefetch'/>
997
+ - <feature policy='disable' name='osvw'/>
998
+ - <feature policy='disable' name='topoext'/>
999
+ - <feature policy='disable' name='nrip-save'/>
1000
+ </mode>
1001
+ <mode name='custom' supported='yes'>
1002
+ <model usable='yes'>qemu64</model>
1003
+ diff --git a/tests/domaincapsdata/qemu_6.0.0-tcg.x86_64.xml b/tests/domaincapsdata/qemu_6.0.0-tcg.x86_64.xml
1004
+ index 6b85c9c45a..65f4459bcb 100644
1005
+ --- a/tests/domaincapsdata/qemu_6.0.0-tcg.x86_64.xml
1006
+ +++ b/tests/domaincapsdata/qemu_6.0.0-tcg.x86_64.xml
1007
+ @@ -36,35 +36,43 @@
1008
+ </enum>
1009
+ </mode>
1010
+ <mode name='host-model' supported='yes'>
1011
+ - <model fallback='forbid'>EPYC</model>
1012
+ + <model fallback='forbid'>Opteron_G3</model>
1013
+ <vendor>AMD</vendor>
1014
+ <feature policy='require' name='acpi'/>
1015
+ <feature policy='require' name='ss'/>
1016
+ + <feature policy='require' name='pclmuldq'/>
1017
+ <feature policy='require' name='monitor'/>
1018
+ + <feature policy='require' name='ssse3'/>
1019
+ + <feature policy='require' name='sse4.1'/>
1020
+ + <feature policy='require' name='sse4.2'/>
1021
+ + <feature policy='require' name='movbe'/>
1022
+ + <feature policy='require' name='aes'/>
1023
+ + <feature policy='require' name='xsave'/>
1024
+ + <feature policy='require' name='rdrand'/>
1025
+ <feature policy='require' name='hypervisor'/>
1026
+ + <feature policy='require' name='arat'/>
1027
+ + <feature policy='require' name='fsgsbase'/>
1028
+ + <feature policy='require' name='bmi1'/>
1029
+ + <feature policy='require' name='smep'/>
1030
+ + <feature policy='require' name='bmi2'/>
1031
+ <feature policy='require' name='erms'/>
1032
+ <feature policy='require' name='mpx'/>
1033
+ + <feature policy='require' name='adx'/>
1034
+ + <feature policy='require' name='smap'/>
1035
+ <feature policy='require' name='pcommit'/>
1036
+ + <feature policy='require' name='clflushopt'/>
1037
+ <feature policy='require' name='clwb'/>
1038
+ <feature policy='require' name='pku'/>
1039
+ <feature policy='require' name='la57'/>
1040
+ + <feature policy='require' name='xsaveopt'/>
1041
+ + <feature policy='require' name='xgetbv1'/>
1042
+ + <feature policy='require' name='mmxext'/>
1043
+ + <feature policy='require' name='pdpe1gb'/>
1044
+ <feature policy='require' name='3dnowext'/>
1045
+ <feature policy='require' name='3dnow'/>
1046
+ + <feature policy='require' name='cr8legacy'/>
1047
+ <feature policy='require' name='npt'/>
1048
+ - <feature policy='disable' name='vme'/>
1049
+ - <feature policy='disable' name='fma'/>
1050
+ - <feature policy='disable' name='avx'/>
1051
+ - <feature policy='disable' name='f16c'/>
1052
+ - <feature policy='disable' name='avx2'/>
1053
+ - <feature policy='disable' name='rdseed'/>
1054
+ - <feature policy='disable' name='sha-ni'/>
1055
+ - <feature policy='disable' name='xsavec'/>
1056
+ - <feature policy='disable' name='fxsr_opt'/>
1057
+ <feature policy='disable' name='misalignsse'/>
1058
+ - <feature policy='disable' name='3dnowprefetch'/>
1059
+ - <feature policy='disable' name='osvw'/>
1060
+ - <feature policy='disable' name='topoext'/>
1061
+ - <feature policy='disable' name='nrip-save'/>
1062
+ </mode>
1063
+ <mode name='custom' supported='yes'>
1064
+ <model usable='yes'>qemu64</model>
1065
+ diff --git a/tests/domaincapsdata/qemu_6.1.0-tcg.x86_64.xml b/tests/domaincapsdata/qemu_6.1.0-tcg.x86_64.xml
1066
+ index 2c761fc1af..40bc875e3c 100644
1067
+ --- a/tests/domaincapsdata/qemu_6.1.0-tcg.x86_64.xml
1068
+ +++ b/tests/domaincapsdata/qemu_6.1.0-tcg.x86_64.xml
1069
+ @@ -36,35 +36,43 @@
1070
+ </enum>
1071
+ </mode>
1072
+ <mode name='host-model' supported='yes'>
1073
+ - <model fallback='forbid'>EPYC</model>
1074
+ + <model fallback='forbid'>Opteron_G3</model>
1075
+ <vendor>AMD</vendor>
1076
+ <feature policy='require' name='acpi'/>
1077
+ <feature policy='require' name='ss'/>
1078
+ + <feature policy='require' name='pclmuldq'/>
1079
+ <feature policy='require' name='monitor'/>
1080
+ + <feature policy='require' name='ssse3'/>
1081
+ + <feature policy='require' name='sse4.1'/>
1082
+ + <feature policy='require' name='sse4.2'/>
1083
+ + <feature policy='require' name='movbe'/>
1084
+ + <feature policy='require' name='aes'/>
1085
+ + <feature policy='require' name='xsave'/>
1086
+ + <feature policy='require' name='rdrand'/>
1087
+ <feature policy='require' name='hypervisor'/>
1088
+ + <feature policy='require' name='arat'/>
1089
+ + <feature policy='require' name='fsgsbase'/>
1090
+ + <feature policy='require' name='bmi1'/>
1091
+ + <feature policy='require' name='smep'/>
1092
+ + <feature policy='require' name='bmi2'/>
1093
+ <feature policy='require' name='erms'/>
1094
+ <feature policy='require' name='mpx'/>
1095
+ + <feature policy='require' name='adx'/>
1096
+ + <feature policy='require' name='smap'/>
1097
+ <feature policy='require' name='pcommit'/>
1098
+ + <feature policy='require' name='clflushopt'/>
1099
+ <feature policy='require' name='clwb'/>
1100
+ <feature policy='require' name='pku'/>
1101
+ <feature policy='require' name='la57'/>
1102
+ + <feature policy='require' name='xsaveopt'/>
1103
+ + <feature policy='require' name='xgetbv1'/>
1104
+ + <feature policy='require' name='mmxext'/>
1105
+ + <feature policy='require' name='pdpe1gb'/>
1106
+ <feature policy='require' name='3dnowext'/>
1107
+ <feature policy='require' name='3dnow'/>
1108
+ + <feature policy='require' name='cr8legacy'/>
1109
+ <feature policy='require' name='npt'/>
1110
+ - <feature policy='disable' name='vme'/>
1111
+ - <feature policy='disable' name='fma'/>
1112
+ - <feature policy='disable' name='avx'/>
1113
+ - <feature policy='disable' name='f16c'/>
1114
+ - <feature policy='disable' name='avx2'/>
1115
+ - <feature policy='disable' name='rdseed'/>
1116
+ - <feature policy='disable' name='sha-ni'/>
1117
+ - <feature policy='disable' name='xsavec'/>
1118
+ - <feature policy='disable' name='fxsr_opt'/>
1119
+ <feature policy='disable' name='misalignsse'/>
1120
+ - <feature policy='disable' name='3dnowprefetch'/>
1121
+ - <feature policy='disable' name='osvw'/>
1122
+ - <feature policy='disable' name='topoext'/>
1123
+ - <feature policy='disable' name='nrip-save'/>
1124
+ </mode>
1125
+ <mode name='custom' supported='yes'>
1126
+ <model usable='yes'>qemu64</model>
1127
+ diff --git a/tests/domaincapsdata/qemu_6.2.0-tcg.x86_64.xml b/tests/domaincapsdata/qemu_6.2.0-tcg.x86_64.xml
1128
+ index 8db840faac..a439dda190 100644
1129
+ --- a/tests/domaincapsdata/qemu_6.2.0-tcg.x86_64.xml
1130
+ +++ b/tests/domaincapsdata/qemu_6.2.0-tcg.x86_64.xml
1131
+ @@ -36,36 +36,44 @@
1132
+ </enum>
1133
+ </mode>
1134
+ <mode name='host-model' supported='yes'>
1135
+ - <model fallback='forbid'>EPYC</model>
1136
+ + <model fallback='forbid'>Opteron_G3</model>
1137
+ <vendor>AMD</vendor>
1138
+ <feature policy='require' name='acpi'/>
1139
+ <feature policy='require' name='ss'/>
1140
+ + <feature policy='require' name='pclmuldq'/>
1141
+ <feature policy='require' name='monitor'/>
1142
+ + <feature policy='require' name='ssse3'/>
1143
+ + <feature policy='require' name='sse4.1'/>
1144
+ + <feature policy='require' name='sse4.2'/>
1145
+ + <feature policy='require' name='movbe'/>
1146
+ + <feature policy='require' name='aes'/>
1147
+ + <feature policy='require' name='xsave'/>
1148
+ + <feature policy='require' name='rdrand'/>
1149
+ <feature policy='require' name='hypervisor'/>
1150
+ + <feature policy='require' name='arat'/>
1151
+ + <feature policy='require' name='fsgsbase'/>
1152
+ + <feature policy='require' name='bmi1'/>
1153
+ + <feature policy='require' name='smep'/>
1154
+ + <feature policy='require' name='bmi2'/>
1155
+ <feature policy='require' name='erms'/>
1156
+ <feature policy='require' name='mpx'/>
1157
+ + <feature policy='require' name='adx'/>
1158
+ + <feature policy='require' name='smap'/>
1159
+ <feature policy='require' name='pcommit'/>
1160
+ + <feature policy='require' name='clflushopt'/>
1161
+ <feature policy='require' name='clwb'/>
1162
+ <feature policy='require' name='pku'/>
1163
+ <feature policy='require' name='la57'/>
1164
+ + <feature policy='require' name='xsaveopt'/>
1165
+ + <feature policy='require' name='xgetbv1'/>
1166
+ + <feature policy='require' name='mmxext'/>
1167
+ + <feature policy='require' name='pdpe1gb'/>
1168
+ <feature policy='require' name='3dnowext'/>
1169
+ <feature policy='require' name='3dnow'/>
1170
+ + <feature policy='require' name='cr8legacy'/>
1171
+ <feature policy='require' name='npt'/>
1172
+ <feature policy='require' name='svme-addr-chk'/>
1173
+ - <feature policy='disable' name='vme'/>
1174
+ - <feature policy='disable' name='fma'/>
1175
+ - <feature policy='disable' name='avx'/>
1176
+ - <feature policy='disable' name='f16c'/>
1177
+ - <feature policy='disable' name='avx2'/>
1178
+ - <feature policy='disable' name='rdseed'/>
1179
+ - <feature policy='disable' name='sha-ni'/>
1180
+ - <feature policy='disable' name='xsavec'/>
1181
+ - <feature policy='disable' name='fxsr_opt'/>
1182
+ <feature policy='disable' name='misalignsse'/>
1183
+ - <feature policy='disable' name='3dnowprefetch'/>
1184
+ - <feature policy='disable' name='osvw'/>
1185
+ - <feature policy='disable' name='topoext'/>
1186
+ - <feature policy='disable' name='nrip-save'/>
1187
+ </mode>
1188
+ <mode name='custom' supported='yes'>
1189
+ <model usable='yes'>qemu64</model>
1190
+ diff --git a/tests/qemuxml2argvdata/cpu-fallback.args b/tests/qemuxml2argvdata/cpu-fallback.args
1191
+ index 1b1769d420..53667dfa3a 100644
1192
+ --- a/tests/qemuxml2argvdata/cpu-fallback.args
1193
+ +++ b/tests/qemuxml2argvdata/cpu-fallback.args
1194
+ @@ -13,7 +13,7 @@ QEMU_AUDIO_DRV=none \
1195
+ -object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
1196
+ -machine pc,usb=off,dump-guest-core=off \
1197
+ -accel kvm \
1198
+ --cpu Penryn,sse4.1=off,sse4.2=off,popcnt=off,aes=off \
1199
+ +-cpu Conroe,cx16=on,sse4.1=off,sse4.2=off,popcnt=off,aes=off \
1200
+ -m 214 \
1201
+ -realtime mlock=off \
1202
+ -smp 6,sockets=6,cores=1,threads=1 \
1203
+ diff --git a/tests/qemuxml2argvdata/cpu-host-model-cmt.x86_64-4.0.0.args b/tests/qemuxml2argvdata/cpu-host-model-cmt.x86_64-4.0.0.args
1204
+ index 3ff226a289..0de09e1d88 100644
1205
+ --- a/tests/qemuxml2argvdata/cpu-host-model-cmt.x86_64-4.0.0.args
1206
+ +++ b/tests/qemuxml2argvdata/cpu-host-model-cmt.x86_64-4.0.0.args
1207
+ @@ -13,7 +13,7 @@ QEMU_AUDIO_DRV=none \
1208
+ -object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
1209
+ -machine pc-i440fx-4.0,usb=off,dump-guest-core=off \
1210
+ -accel tcg \
1211
+ --cpu EPYC,acpi=on,ss=on,monitor=on,hypervisor=on,erms=on,mpx=on,pcommit=on,clwb=on,pku=on,la57=on,3dnowext=on,3dnow=on,npt=on,vme=off,fma=off,avx=off,f16c=off,rdrand=off,avx2=off,rdseed=off,sha-ni=off,xsavec=off,fxsr-opt=off,misalignsse=off,3dnowprefetch=off,osvw=off,topoext=off,nrip-save=off \
1212
+ +-cpu Opteron_G3,acpi=on,ss=on,pclmulqdq=on,monitor=on,ssse3=on,sse4.1=on,sse4.2=on,movbe=on,aes=on,xsave=on,hypervisor=on,arat=on,fsgsbase=on,bmi1=on,smep=on,bmi2=on,erms=on,mpx=on,adx=on,smap=on,pcommit=on,clflushopt=on,clwb=on,pku=on,la57=on,xsaveopt=on,xgetbv1=on,mmxext=on,pdpe1gb=on,3dnowext=on,3dnow=on,cr8legacy=on,npt=on,misalignsse=off \
1213
+ -m 214 \
1214
+ -overcommit mem-lock=off \
1215
+ -smp 6,sockets=6,cores=1,threads=1 \
1216
+ diff --git a/tests/qemuxml2argvdata/cpu-host-model-fallback.args b/tests/qemuxml2argvdata/cpu-host-model-fallback.args
1217
+ index e90b781da4..763e630120 100644
1218
+ --- a/tests/qemuxml2argvdata/cpu-host-model-fallback.args
1219
+ +++ b/tests/qemuxml2argvdata/cpu-host-model-fallback.args
1220
+ @@ -13,7 +13,7 @@ QEMU_AUDIO_DRV=none \
1221
+ -object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
1222
+ -machine pc,usb=off,dump-guest-core=off \
1223
+ -accel tcg \
1224
+ --cpu Penryn,vme=on,ds=on,acpi=on,ss=on,ht=on,tm=on,pbe=on,monitor=on,ds-cpl=on,vmx=on,est=on,tm2=on,xtpr=on,sse4.1=off,cx16=on,lahf-lm=on \
1225
+ +-cpu Conroe,vme=on,ds=on,acpi=on,ss=on,ht=on,tm=on,pbe=on,monitor=on,ds-cpl=on,vmx=on,est=on,tm2=on,cx16=on,xtpr=on,lahf-lm=on \
1226
+ -m 214 \
1227
+ -realtime mlock=off \
1228
+ -smp 6,sockets=6,cores=1,threads=1 \
1229
+ --
1230
+ 2.35.1
1231
+
SOURCES/libvirt-cpu_x86-Refactor-feature-list-comparison-in-x86DecodeUseCandidate.patch ADDED
@@ -0,0 +1,73 @@
1
+ From d9736516378d1fbac451dd80a93bf25c85e74b50 Mon Sep 17 00:00:00 2001
2
+ Message-Id: <d9736516378d1fbac451dd80a93bf25c85e74b50@dist-git>
3
+ From: Jiri Denemark <jdenemar@redhat.com>
4
+ Date: Tue, 26 Apr 2022 15:02:51 +0200
5
+ Subject: [PATCH] cpu_x86: Refactor feature list comparison in
6
+ x86DecodeUseCandidate
7
+
8
+ It will become more complicated and so it deserves to be separated into
9
+ a new function.
10
+
11
+ Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
12
+ Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
13
+ (cherry picked from commit 1d6ca40ac23c039abc4392b668f256d0eda33280)
14
+
15
+ https://bugzilla.redhat.com/show_bug.cgi?id=2084030
16
+
17
+ Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
18
+ ---
19
+ src/cpu/cpu_x86.c | 31 ++++++++++++++++++++++---------
20
+ 1 file changed, 22 insertions(+), 9 deletions(-)
21
+
22
+ diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c
23
+ index f007487824..81c2441b8b 100644
24
+ --- a/src/cpu/cpu_x86.c
25
+ +++ b/src/cpu/cpu_x86.c
26
+ @@ -1970,6 +1970,27 @@ virCPUx86Compare(virCPUDef *host,
27
+ }
28
+
29
+
30
+ +static int
31
+ +virCPUx86CompareCandidateFeatureList(virCPUDef *cpuCurrent,
32
+ + virCPUDef *cpuCandidate)
33
+ +{
34
+ + size_t current = cpuCurrent->nfeatures;
35
+ + size_t candidate = cpuCandidate->nfeatures;
36
+ +
37
+ + if (candidate < current) {
38
+ + VIR_DEBUG("%s is better than %s: %zu < %zu",
39
+ + cpuCandidate->model, cpuCurrent->model,
40
+ + candidate, current);
41
+ + return 1;
42
+ + }
43
+ +
44
+ + VIR_DEBUG("%s is not better than %s: %zu >= %zu",
45
+ + cpuCandidate->model, cpuCurrent->model,
46
+ + candidate, current);
47
+ + return 0;
48
+ +}
49
+ +
50
+ +
51
+ /*
52
+ * Checks whether a candidate model is a better fit for the CPU data than the
53
+ * current model.
54
+ @@ -2038,15 +2059,7 @@ x86DecodeUseCandidate(virCPUx86Model *current,
55
+ }
56
+ }
57
+
58
+ - if (cpuCurrent->nfeatures > cpuCandidate->nfeatures) {
59
+ - VIR_DEBUG("%s results in shorter feature list than %s",
60
+ - cpuCandidate->model, cpuCurrent->model);
61
+ - return 1;
62
+ - }
63
+ -
64
+ - VIR_DEBUG("%s does not result in shorter feature list than %s",
65
+ - cpuCandidate->model, cpuCurrent->model);
66
+ - return 0;
67
+ + return virCPUx86CompareCandidateFeatureList(cpuCurrent, cpuCandidate);
68
+ }
69
+
70
+
71
+ --
72
+ 2.35.1
73
+
SOURCES/libvirt-cputest-Add-some-real-world-baseline-tests.patch ADDED
@@ -0,0 +1,498 @@
1
+ From 8f7e267c7b98b378e301519b10aa3d18f0ceb45c Mon Sep 17 00:00:00 2001
2
+ Message-Id: <8f7e267c7b98b378e301519b10aa3d18f0ceb45c@dist-git>
3
+ From: Jiri Denemark <jdenemar@redhat.com>
4
+ Date: Thu, 21 Apr 2022 18:25:15 +0200
5
+ Subject: [PATCH] cputest: Add some real world baseline tests
6
+
7
+ Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
8
+ Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
9
+ (cherry picked from commit 63d633b9a4fc42da7e2acaf45501914607d968a5)
10
+
11
+ https://bugzilla.redhat.com/show_bug.cgi?id=2084030
12
+
13
+ Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
14
+ ---
15
+ tests/cputest.c | 118 +++++++++++++++---
16
+ ...id-baseline-Broadwell-IBRS+Cascadelake.xml | 11 ++
17
+ ..._64-cpuid-baseline-Cascadelake+Icelake.xml | 14 +++
18
+ ...puid-baseline-Cascadelake+Skylake-IBRS.xml | 12 ++
19
+ ..._64-cpuid-baseline-Cascadelake+Skylake.xml | 8 ++
20
+ ...-cpuid-baseline-Cooperlake+Cascadelake.xml | 17 +++
21
+ ...6_64-cpuid-baseline-Cooperlake+Icelake.xml | 14 +++
22
+ .../x86_64-cpuid-baseline-EPYC+Rome.xml | 13 ++
23
+ .../x86_64-cpuid-baseline-Haswell+Skylake.xml | 14 +++
24
+ ...-baseline-Haswell-noTSX-IBRS+Broadwell.xml | 14 +++
25
+ ...seline-Haswell-noTSX-IBRS+Skylake-IBRS.xml | 14 +++
26
+ ...id-baseline-Haswell-noTSX-IBRS+Skylake.xml | 14 +++
27
+ .../x86_64-cpuid-baseline-Ryzen+Rome.xml | 13 ++
28
+ ...4-cpuid-baseline-Skylake-Client+Server.xml | 9 ++
29
+ 14 files changed, 271 insertions(+), 14 deletions(-)
30
+ create mode 100644 tests/cputestdata/x86_64-cpuid-baseline-Broadwell-IBRS+Cascadelake.xml
31
+ create mode 100644 tests/cputestdata/x86_64-cpuid-baseline-Cascadelake+Icelake.xml
32
+ create mode 100644 tests/cputestdata/x86_64-cpuid-baseline-Cascadelake+Skylake-IBRS.xml
33
+ create mode 100644 tests/cputestdata/x86_64-cpuid-baseline-Cascadelake+Skylake.xml
34
+ create mode 100644 tests/cputestdata/x86_64-cpuid-baseline-Cooperlake+Cascadelake.xml
35
+ create mode 100644 tests/cputestdata/x86_64-cpuid-baseline-Cooperlake+Icelake.xml
36
+ create mode 100644 tests/cputestdata/x86_64-cpuid-baseline-EPYC+Rome.xml
37
+ create mode 100644 tests/cputestdata/x86_64-cpuid-baseline-Haswell+Skylake.xml
38
+ create mode 100644 tests/cputestdata/x86_64-cpuid-baseline-Haswell-noTSX-IBRS+Broadwell.xml
39
+ create mode 100644 tests/cputestdata/x86_64-cpuid-baseline-Haswell-noTSX-IBRS+Skylake-IBRS.xml
40
+ create mode 100644 tests/cputestdata/x86_64-cpuid-baseline-Haswell-noTSX-IBRS+Skylake.xml
41
+ create mode 100644 tests/cputestdata/x86_64-cpuid-baseline-Ryzen+Rome.xml
42
+ create mode 100644 tests/cputestdata/x86_64-cpuid-baseline-Skylake-Client+Server.xml
43
+
44
+ diff --git a/tests/cputest.c b/tests/cputest.c
45
+ index b939e20718..b39ec7e18b 100644
46
+ --- a/tests/cputest.c
47
+ +++ b/tests/cputest.c
48
+ @@ -58,6 +58,8 @@ struct data {
49
+ const char *name;
50
+ virDomainCapsCPUModels *models;
51
+ const char *modelsName;
52
+ + const char **cpus;
53
+ + int ncpus;
54
+ unsigned int flags;
55
+ int result;
56
+ };
57
+ @@ -561,6 +563,60 @@ cpuTestCPUID(bool guest, const void *arg)
58
+ }
59
+
60
+
61
+ +static int
62
+ +cpuTestCPUIDBaseline(const void *arg)
63
+ +{
64
+ + const struct data *data = arg;
65
+ + int ret = -1;
66
+ + virCPUDef **cpus = NULL;
67
+ + virCPUDef *baseline = NULL;
68
+ + g_autofree char *result = NULL;
69
+ + size_t i;
70
+ +
71
+ + cpus = g_new0(virCPUDef *, data->ncpus);
72
+ + for (i = 0; i < data->ncpus; i++) {
73
+ + g_autofree char *name = NULL;
74
+ +
75
+ + name = g_strdup_printf("cpuid-%s-json", data->cpus[i]);
76
+ + if (!(cpus[i] = cpuTestLoadXML(data->arch, name)))
77
+ + goto cleanup;
78
+ + }
79
+ +
80
+ + baseline = virCPUBaseline(data->arch, cpus, data->ncpus, NULL, NULL, false);
81
+ + if (!baseline)
82
+ + goto cleanup;
83
+ +
84
+ + result = g_strdup_printf("cpuid-baseline-%s", data->name);
85
+ +
86
+ + if (cpuTestCompareXML(data->arch, baseline, result) < 0)
87
+ + goto cleanup;
88
+ +
89
+ + for (i = 0; i < data->ncpus; i++) {
90
+ + virCPUCompareResult cmp;
91
+ +
92
+ + cmp = virCPUCompare(data->arch, cpus[i], baseline, false);
93
+ + if (cmp != VIR_CPU_COMPARE_SUPERSET &&
94
+ + cmp != VIR_CPU_COMPARE_IDENTICAL) {
95
+ + VIR_TEST_VERBOSE("\nbaseline CPU is incompatible with CPU %zu", i);
96
+ + VIR_TEST_VERBOSE("%74s", "... ");
97
+ + ret = -1;
98
+ + goto cleanup;
99
+ + }
100
+ + }
101
+ +
102
+ + ret = 0;
103
+ +
104
+ + cleanup:
105
+ + if (cpus) {
106
+ + for (i = 0; i < data->ncpus; i++)
107
+ + virCPUDefFree(cpus[i]);
108
+ + VIR_FREE(cpus);
109
+ + }
110
+ + virCPUDefFree(baseline);
111
+ + return ret;
112
+ +}
113
+ +
114
+ +
115
+ static int
116
+ cpuTestHostCPUID(const void *arg)
117
+ {
118
+ @@ -888,13 +944,13 @@ mymain(void)
119
+ goto cleanup;
120
+ }
121
+
122
+ -#define DO_TEST(arch, api, name, host, cpu, \
123
+ +#define DO_TEST(arch, api, name, host, cpu, cpus, ncpus, \
124
+ models, flags, result) \
125
+ do { \
126
+ struct data data = { \
127
+ arch, host, cpu, models, \
128
+ models == NULL ? NULL : #models, \
129
+ - flags, result \
130
+ + cpus, ncpus, flags, result \
131
+ }; \
132
+ g_autofree char *testLabel = NULL; \
133
+ \
134
+ @@ -907,12 +963,12 @@ mymain(void)
135
+ #define DO_TEST_COMPARE(arch, host, cpu, result) \
136
+ DO_TEST(arch, cpuTestCompare, \
137
+ host "/" cpu " (" #result ")", \
138
+ - host, cpu, NULL, 0, result)
139
+ + host, cpu, NULL, 0, NULL, 0, result)
140
+
141
+ #define DO_TEST_UPDATE_ONLY(arch, host, cpu) \
142
+ DO_TEST(arch, cpuTestUpdate, \
143
+ cpu " on " host, \
144
+ - host, cpu, NULL, 0, 0)
145
+ + host, cpu, NULL, 0, NULL, 0, 0)
146
+
147
+ #define DO_TEST_UPDATE(arch, host, cpu, result) \
148
+ do { \
149
+ @@ -930,31 +986,31 @@ mymain(void)
150
+ suffix = " (migratable)"; \
151
+ label = g_strdup_printf("%s%s", name, suffix); \
152
+ DO_TEST(arch, cpuTestBaseline, label, NULL, \
153
+ - "baseline-" name, NULL, flags, result); \
154
+ + "baseline-" name, NULL, 0, NULL, flags, result); \
155
+ } while (0)
156
+
157
+ #define DO_TEST_HASFEATURE(arch, host, feature, result) \
158
+ DO_TEST(arch, cpuTestHasFeature, \
159
+ host "/" feature " (" #result ")", \
160
+ - host, feature, NULL, 0, result)
161
+ + host, feature, NULL, 0, NULL, 0, result)
162
+
163
+ #define DO_TEST_GUESTCPU(arch, host, cpu, models, result) \
164
+ DO_TEST(arch, cpuTestGuestCPU, \
165
+ host "/" cpu " (" #models ")", \
166
+ - host, cpu, models, 0, result)
167
+ + host, cpu, NULL, 0, models, 0, result)
168
+
169
+ #if WITH_QEMU
170
+ # define DO_TEST_JSON(arch, host, json) \
171
+ do { \
172
+ if (json == JSON_MODELS) { \
173
+ DO_TEST(arch, cpuTestGuestCPUID, host, host, \
174
+ - NULL, NULL, 0, 0); \
175
+ + NULL, NULL, 0, NULL, 0, 0); \
176
+ } \
177
+ if (json != JSON_NONE) { \
178
+ DO_TEST(arch, cpuTestJSONCPUID, host, host, \
179
+ - NULL, NULL, json, 0); \
180
+ + NULL, NULL, 0, NULL, json, 0); \
181
+ DO_TEST(arch, cpuTestJSONSignature, host, host, \
182
+ - NULL, NULL, 0, 0); \
183
+ + NULL, NULL, 0, NULL, 0, 0); \
184
+ } \
185
+ } while (0)
186
+ #else
187
+ @@ -964,18 +1020,26 @@ mymain(void)
188
+ #define DO_TEST_CPUID(arch, host, json) \
189
+ do { \
190
+ DO_TEST(arch, cpuTestHostCPUID, host, host, \
191
+ - NULL, NULL, 0, 0); \
192
+ + NULL, NULL, 0, NULL, 0, 0); \
193
+ DO_TEST(arch, cpuTestGuestCPUID, host, host, \
194
+ - NULL, NULL, json, 0); \
195
+ + NULL, NULL, 0, NULL, json, 0); \
196
+ DO_TEST(arch, cpuTestCPUIDSignature, host, host, \
197
+ - NULL, NULL, 0, 0); \
198
+ + NULL, NULL, 0, NULL, 0, 0); \
199
+ DO_TEST_JSON(arch, host, json); \
200
+ if (json != JSON_NONE) { \
201
+ DO_TEST(arch, cpuTestUpdateLive, host, host, \
202
+ - NULL, NULL, json, 0); \
203
+ + NULL, NULL, 0, NULL, json, 0); \
204
+ } \
205
+ } while (0)
206
+
207
+ +#define DO_TEST_CPUID_BASELINE(arch, label, cpu1, cpu2) \
208
+ + do { \
209
+ + const char *cpus[] = {cpu1, cpu2}; \
210
+ + DO_TEST(arch, cpuTestCPUIDBaseline, \
211
+ + label " (" cpu1 ", " cpu2 ")", \
212
+ + NULL, label, cpus, 2, NULL, 0, 0); \
213
+ + } while (0)
214
+ +
215
+ /* host to host comparison */
216
+ DO_TEST_COMPARE(VIR_ARCH_X86_64, "host", "host", VIR_CPU_COMPARE_IDENTICAL);
217
+ DO_TEST_COMPARE(VIR_ARCH_X86_64, "host", "host-better", VIR_CPU_COMPARE_INCOMPATIBLE);
218
+ @@ -1157,6 +1221,32 @@ mymain(void)
219
+ DO_TEST_CPUID(VIR_ARCH_X86_64, "Ice-Lake-Server", JSON_MODELS);
220
+ DO_TEST_CPUID(VIR_ARCH_X86_64, "Cooperlake", JSON_MODELS);
221
+
222
+ + DO_TEST_CPUID_BASELINE(VIR_ARCH_X86_64, "Ryzen+Rome",
223
+ + "Ryzen-7-1800X-Eight-Core", "Ryzen-9-3900X-12-Core");
224
+ + DO_TEST_CPUID_BASELINE(VIR_ARCH_X86_64, "EPYC+Rome",
225
+ + "EPYC-7601-32-Core", "EPYC-7502-32-Core");
226
+ + DO_TEST_CPUID_BASELINE(VIR_ARCH_X86_64, "Haswell-noTSX-IBRS+Skylake",
227
+ + "Xeon-E5-2609-v3", "Xeon-Gold-6148");
228
+ + DO_TEST_CPUID_BASELINE(VIR_ARCH_X86_64, "Haswell-noTSX-IBRS+Skylake-IBRS",
229
+ + "Xeon-E5-2609-v3", "Xeon-Gold-6130");
230
+ + DO_TEST_CPUID_BASELINE(VIR_ARCH_X86_64, "Broadwell-IBRS+Cascadelake",
231
+ + "Xeon-E5-2623-v4", "Xeon-Platinum-8268");
232
+ + DO_TEST_CPUID_BASELINE(VIR_ARCH_X86_64, "Cascadelake+Skylake-IBRS",
233
+ + "Xeon-Platinum-8268", "Xeon-Gold-6130");
234
+ + DO_TEST_CPUID_BASELINE(VIR_ARCH_X86_64, "Cascadelake+Skylake",
235
+ + "Xeon-Platinum-9242", "Xeon-Gold-6148");
236
+ + DO_TEST_CPUID_BASELINE(VIR_ARCH_X86_64, "Cascadelake+Icelake",
237
+ + "Xeon-Platinum-9242", "Ice-Lake-Server");
238
+ + DO_TEST_CPUID_BASELINE(VIR_ARCH_X86_64, "Cooperlake+Icelake",
239
+ + "Cooperlake", "Ice-Lake-Server");
240
+ + DO_TEST_CPUID_BASELINE(VIR_ARCH_X86_64, "Cooperlake+Cascadelake",
241
+ + "Cooperlake", "Xeon-Platinum-9242");
242
+ + DO_TEST_CPUID_BASELINE(VIR_ARCH_X86_64, "Skylake-Client+Server",
243
+ + "Core-i5-6600", "Xeon-Gold-6148");
244
+ + DO_TEST_CPUID_BASELINE(VIR_ARCH_X86_64, "Haswell-noTSX-IBRS+Broadwell",
245
+ + "Xeon-E5-2609-v3", "Xeon-E5-2650-v4");
246
+ + DO_TEST_CPUID_BASELINE(VIR_ARCH_X86_64, "Haswell+Skylake",
247
+ + "Xeon-E7-8890-v3", "Xeon-Gold-5115");
248
+ cleanup:
249
+ #if WITH_QEMU
250
+ qemuTestDriverFree(&driver);
251
+ diff --git a/tests/cputestdata/x86_64-cpuid-baseline-Broadwell-IBRS+Cascadelake.xml b/tests/cputestdata/x86_64-cpuid-baseline-Broadwell-IBRS+Cascadelake.xml
252
+ new file mode 100644
253
+ index 0000000000..4e3f253e9b
254
+ --- /dev/null
255
+ +++ b/tests/cputestdata/x86_64-cpuid-baseline-Broadwell-IBRS+Cascadelake.xml
256
+ @@ -0,0 +1,11 @@
257
+ +<cpu mode='custom' match='exact'>
258
+ + <model fallback='allow'>Skylake-Client-IBRS</model>
259
+ + <vendor>Intel</vendor>
260
+ + <feature policy='require' name='ss'/>
261
+ + <feature policy='require' name='hypervisor'/>
262
+ + <feature policy='require' name='tsc_adjust'/>
263
+ + <feature policy='require' name='pdpe1gb'/>
264
+ + <feature policy='disable' name='mpx'/>
265
+ + <feature policy='disable' name='xsavec'/>
266
+ + <feature policy='disable' name='xgetbv1'/>
267
+ +</cpu>
268
+ diff --git a/tests/cputestdata/x86_64-cpuid-baseline-Cascadelake+Icelake.xml b/tests/cputestdata/x86_64-cpuid-baseline-Cascadelake+Icelake.xml
269
+ new file mode 100644
270
+ index 0000000000..e372a3e446
271
+ --- /dev/null
272
+ +++ b/tests/cputestdata/x86_64-cpuid-baseline-Cascadelake+Icelake.xml
273
+ @@ -0,0 +1,14 @@
274
+ +<cpu mode='custom' match='exact'>
275
+ + <model fallback='allow'>Cooperlake</model>
276
+ + <vendor>Intel</vendor>
277
+ + <feature policy='require' name='ss'/>
278
+ + <feature policy='require' name='hypervisor'/>
279
+ + <feature policy='require' name='tsc_adjust'/>
280
+ + <feature policy='require' name='mpx'/>
281
+ + <feature policy='require' name='umip'/>
282
+ + <feature policy='require' name='xsaves'/>
283
+ + <feature policy='disable' name='avx512-bf16'/>
284
+ + <feature policy='disable' name='mds-no'/>
285
+ + <feature policy='disable' name='pschange-mc-no'/>
286
+ + <feature policy='disable' name='taa-no'/>
287
+ +</cpu>
288
+ diff --git a/tests/cputestdata/x86_64-cpuid-baseline-Cascadelake+Skylake-IBRS.xml b/tests/cputestdata/x86_64-cpuid-baseline-Cascadelake+Skylake-IBRS.xml
289
+ new file mode 100644
290
+ index 0000000000..e559e01583
291
+ --- /dev/null
292
+ +++ b/tests/cputestdata/x86_64-cpuid-baseline-Cascadelake+Skylake-IBRS.xml
293
+ @@ -0,0 +1,12 @@
294
+ +<cpu mode='custom' match='exact'>
295
+ + <model fallback='allow'>Cascadelake-Server</model>
296
+ + <vendor>Intel</vendor>
297
+ + <feature policy='require' name='ss'/>
298
+ + <feature policy='require' name='hypervisor'/>
299
+ + <feature policy='require' name='tsc_adjust'/>
300
+ + <feature policy='require' name='umip'/>
301
+ + <feature policy='require' name='pku'/>
302
+ + <feature policy='require' name='xsaves'/>
303
+ + <feature policy='require' name='skip-l1dfl-vmentry'/>
304
+ + <feature policy='disable' name='avx512vnni'/>
305
+ +</cpu>
306
+ diff --git a/tests/cputestdata/x86_64-cpuid-baseline-Cascadelake+Skylake.xml b/tests/cputestdata/x86_64-cpuid-baseline-Cascadelake+Skylake.xml
307
+ new file mode 100644
308
+ index 0000000000..906259df0b
309
+ --- /dev/null
310
+ +++ b/tests/cputestdata/x86_64-cpuid-baseline-Cascadelake+Skylake.xml
311
+ @@ -0,0 +1,8 @@
312
+ +<cpu mode='custom' match='exact'>
313
+ + <model fallback='allow'>Skylake-Server</model>
314
+ + <vendor>Intel</vendor>
315
+ + <feature policy='require' name='ss'/>
316
+ + <feature policy='require' name='hypervisor'/>
317
+ + <feature policy='require' name='tsc_adjust'/>
318
+ + <feature policy='require' name='clflushopt'/>
319
+ +</cpu>
320
+ diff --git a/tests/cputestdata/x86_64-cpuid-baseline-Cooperlake+Cascadelake.xml b/tests/cputestdata/x86_64-cpuid-baseline-Cooperlake+Cascadelake.xml
321
+ new file mode 100644
322
+ index 0000000000..46c32c996f
323
+ --- /dev/null
324
+ +++ b/tests/cputestdata/x86_64-cpuid-baseline-Cooperlake+Cascadelake.xml
325
+ @@ -0,0 +1,17 @@
326
+ +<cpu mode='custom' match='exact'>
327
+ + <model fallback='allow'>Cooperlake</model>
328
+ + <vendor>Intel</vendor>
329
+ + <feature policy='require' name='ss'/>
330
+ + <feature policy='require' name='vmx'/>
331
+ + <feature policy='require' name='hypervisor'/>
332
+ + <feature policy='require' name='tsc_adjust'/>
333
+ + <feature policy='require' name='mpx'/>
334
+ + <feature policy='require' name='umip'/>
335
+ + <feature policy='require' name='md-clear'/>
336
+ + <feature policy='require' name='xsaves'/>
337
+ + <feature policy='require' name='ibpb'/>
338
+ + <feature policy='require' name='amd-ssbd'/>
339
+ + <feature policy='require' name='tsx-ctrl'/>
340
+ + <feature policy='disable' name='avx512-bf16'/>
341
+ + <feature policy='disable' name='taa-no'/>
342
+ +</cpu>
343
+ diff --git a/tests/cputestdata/x86_64-cpuid-baseline-Cooperlake+Icelake.xml b/tests/cputestdata/x86_64-cpuid-baseline-Cooperlake+Icelake.xml
344
+ new file mode 100644
345
+ index 0000000000..e372a3e446
346
+ --- /dev/null
347
+ +++ b/tests/cputestdata/x86_64-cpuid-baseline-Cooperlake+Icelake.xml
348
+ @@ -0,0 +1,14 @@
349
+ +<cpu mode='custom' match='exact'>
350
+ + <model fallback='allow'>Cooperlake</model>
351
+ + <vendor>Intel</vendor>
352
+ + <feature policy='require' name='ss'/>
353
+ + <feature policy='require' name='hypervisor'/>
354
+ + <feature policy='require' name='tsc_adjust'/>
355
+ + <feature policy='require' name='mpx'/>
356
+ + <feature policy='require' name='umip'/>
357
+ + <feature policy='require' name='xsaves'/>
358
+ + <feature policy='disable' name='avx512-bf16'/>
359
+ + <feature policy='disable' name='mds-no'/>
360
+ + <feature policy='disable' name='pschange-mc-no'/>
361
+ + <feature policy='disable' name='taa-no'/>
362
+ +</cpu>
363
+ diff --git a/tests/cputestdata/x86_64-cpuid-baseline-EPYC+Rome.xml b/tests/cputestdata/x86_64-cpuid-baseline-EPYC+Rome.xml
364
+ new file mode 100644
365
+ index 0000000000..e1984b2890
366
+ --- /dev/null
367
+ +++ b/tests/cputestdata/x86_64-cpuid-baseline-EPYC+Rome.xml
368
+ @@ -0,0 +1,13 @@
369
+ +<cpu mode='custom' match='exact'>
370
+ + <model fallback='allow'>EPYC</model>
371
+ + <vendor>AMD</vendor>
372
+ + <feature policy='require' name='x2apic'/>
373
+ + <feature policy='require' name='tsc-deadline'/>
374
+ + <feature policy='require' name='hypervisor'/>
375
+ + <feature policy='require' name='tsc_adjust'/>
376
+ + <feature policy='require' name='cmp_legacy'/>
377
+ + <feature policy='require' name='npt'/>
378
+ + <feature policy='require' name='nrip-save'/>
379
+ + <feature policy='disable' name='svm'/>
380
+ + <feature policy='disable' name='monitor'/>
381
+ +</cpu>
382
+ diff --git a/tests/cputestdata/x86_64-cpuid-baseline-Haswell+Skylake.xml b/tests/cputestdata/x86_64-cpuid-baseline-Haswell+Skylake.xml
383
+ new file mode 100644
384
+ index 0000000000..e687a679b3
385
+ --- /dev/null
386
+ +++ b/tests/cputestdata/x86_64-cpuid-baseline-Haswell+Skylake.xml
387
+ @@ -0,0 +1,14 @@
388
+ +<cpu mode='custom' match='exact'>
389
+ + <model fallback='allow'>Haswell</model>
390
+ + <vendor>Intel</vendor>
391
+ + <feature policy='require' name='vme'/>
392
+ + <feature policy='require' name='ss'/>
393
+ + <feature policy='require' name='f16c'/>
394
+ + <feature policy='require' name='rdrand'/>
395
+ + <feature policy='require' name='hypervisor'/>
396
+ + <feature policy='require' name='arat'/>
397
+ + <feature policy='require' name='tsc_adjust'/>
398
+ + <feature policy='require' name='xsaveopt'/>
399
+ + <feature policy='require' name='pdpe1gb'/>
400
+ + <feature policy='require' name='abm'/>
401
+ +</cpu>
402
+ diff --git a/tests/cputestdata/x86_64-cpuid-baseline-Haswell-noTSX-IBRS+Broadwell.xml b/tests/cputestdata/x86_64-cpuid-baseline-Haswell-noTSX-IBRS+Broadwell.xml
403
+ new file mode 100644
404
+ index 0000000000..651457b17a
405
+ --- /dev/null
406
+ +++ b/tests/cputestdata/x86_64-cpuid-baseline-Haswell-noTSX-IBRS+Broadwell.xml
407
+ @@ -0,0 +1,14 @@
408
+ +<cpu mode='custom' match='exact'>
409
+ + <model fallback='allow'>Haswell-noTSX</model>
410
+ + <vendor>Intel</vendor>
411
+ + <feature policy='require' name='vme'/>
412
+ + <feature policy='require' name='ss'/>
413
+ + <feature policy='require' name='f16c'/>
414
+ + <feature policy='require' name='rdrand'/>
415
+ + <feature policy='require' name='hypervisor'/>
416
+ + <feature policy='require' name='arat'/>
417
+ + <feature policy='require' name='tsc_adjust'/>
418
+ + <feature policy='require' name='xsaveopt'/>
419
+ + <feature policy='require' name='pdpe1gb'/>
420
+ + <feature policy='require' name='abm'/>
421
+ +</cpu>
422
+ diff --git a/tests/cputestdata/x86_64-cpuid-baseline-Haswell-noTSX-IBRS+Skylake-IBRS.xml b/tests/cputestdata/x86_64-cpuid-baseline-Haswell-noTSX-IBRS+Skylake-IBRS.xml
423
+ new file mode 100644
424
+ index 0000000000..8bda1c02e2
425
+ --- /dev/null
426
+ +++ b/tests/cputestdata/x86_64-cpuid-baseline-Haswell-noTSX-IBRS+Skylake-IBRS.xml
427
+ @@ -0,0 +1,14 @@
428
+ +<cpu mode='custom' match='exact'>
429
+ + <model fallback='allow'>Haswell-noTSX-IBRS</model>
430
+ + <vendor>Intel</vendor>
431
+ + <feature policy='require' name='vme'/>
432
+ + <feature policy='require' name='ss'/>
433
+ + <feature policy='require' name='f16c'/>
434
+ + <feature policy='require' name='rdrand'/>
435
+ + <feature policy='require' name='hypervisor'/>
436
+ + <feature policy='require' name='arat'/>
437
+ + <feature policy='require' name='tsc_adjust'/>
438
+ + <feature policy='require' name='xsaveopt'/>
439
+ + <feature policy='require' name='pdpe1gb'/>
440
+ + <feature policy='require' name='abm'/>
441
+ +</cpu>
442
+ diff --git a/tests/cputestdata/x86_64-cpuid-baseline-Haswell-noTSX-IBRS+Skylake.xml b/tests/cputestdata/x86_64-cpuid-baseline-Haswell-noTSX-IBRS+Skylake.xml
443
+ new file mode 100644
444
+ index 0000000000..651457b17a
445
+ --- /dev/null
446
+ +++ b/tests/cputestdata/x86_64-cpuid-baseline-Haswell-noTSX-IBRS+Skylake.xml
447
+ @@ -0,0 +1,14 @@
448
+ +<cpu mode='custom' match='exact'>
449
+ + <model fallback='allow'>Haswell-noTSX</model>
450
+ + <vendor>Intel</vendor>
451
+ + <feature policy='require' name='vme'/>
452
+ + <feature policy='require' name='ss'/>
453
+ + <feature policy='require' name='f16c'/>
454
+ + <feature policy='require' name='rdrand'/>
455
+ + <feature policy='require' name='hypervisor'/>
456
+ + <feature policy='require' name='arat'/>
457
+ + <feature policy='require' name='tsc_adjust'/>
458
+ + <feature policy='require' name='xsaveopt'/>
459
+ + <feature policy='require' name='pdpe1gb'/>
460
+ + <feature policy='require' name='abm'/>
461
+ +</cpu>
462
+ diff --git a/tests/cputestdata/x86_64-cpuid-baseline-Ryzen+Rome.xml b/tests/cputestdata/x86_64-cpuid-baseline-Ryzen+Rome.xml
463
+ new file mode 100644
464
+ index 0000000000..051402b9d5
465
+ --- /dev/null
466
+ +++ b/tests/cputestdata/x86_64-cpuid-baseline-Ryzen+Rome.xml
467
+ @@ -0,0 +1,13 @@
468
+ +<cpu mode='custom' match='exact'>
469
+ + <model fallback='allow'>EPYC</model>
470
+ + <vendor>AMD</vendor>
471
+ + <feature policy='require' name='x2apic'/>
472
+ + <feature policy='require' name='tsc-deadline'/>
473
+ + <feature policy='require' name='hypervisor'/>
474
+ + <feature policy='require' name='tsc_adjust'/>
475
+ + <feature policy='require' name='cmp_legacy'/>
476
+ + <feature policy='require' name='npt'/>
477
+ + <feature policy='require' name='nrip-save'/>
478
+ + <feature policy='disable' name='sha-ni'/>
479
+ + <feature policy='disable' name='monitor'/>
480
+ +</cpu>
481
+ diff --git a/tests/cputestdata/x86_64-cpuid-baseline-Skylake-Client+Server.xml b/tests/cputestdata/x86_64-cpuid-baseline-Skylake-Client+Server.xml
482
+ new file mode 100644
483
+ index 0000000000..d46ff26eeb
484
+ --- /dev/null
485
+ +++ b/tests/cputestdata/x86_64-cpuid-baseline-Skylake-Client+Server.xml
486
+ @@ -0,0 +1,9 @@
487
+ +<cpu mode='custom' match='exact'>
488
+ + <model fallback='allow'>Skylake-Client</model>
489
+ + <vendor>Intel</vendor>
490
+ + <feature policy='require' name='ss'/>
491
+ + <feature policy='require' name='hypervisor'/>
492
+ + <feature policy='require' name='tsc_adjust'/>
493
+ + <feature policy='require' name='clflushopt'/>
494
+ + <feature policy='require' name='pdpe1gb'/>
495
+ +</cpu>
496
+ --
497
+ 2.35.1
498
+
SOURCES/libvirt-cputest-Drop-some-old-artificial-baseline-tests.patch ADDED
@@ -0,0 +1,334 @@
1
+ From 039e6627a7ee53973da64405b79cc0c0f6111fc7 Mon Sep 17 00:00:00 2001
2
+ Message-Id: <039e6627a7ee53973da64405b79cc0c0f6111fc7@dist-git>
3
+ From: Jiri Denemark <jdenemar@redhat.com>
4
+ Date: Wed, 4 May 2022 16:21:38 +0200
5
+ Subject: [PATCH] cputest: Drop some old artificial baseline tests
6
+
7
+ Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
8
+ Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
9
+ (cherry picked from commit 6aff36019bbaf643f451779621c6c88cab0e64a7)
10
+
11
+ https://bugzilla.redhat.com/show_bug.cgi?id=2084030
12
+
13
+ Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
14
+ ---
15
+ tests/cputest.c | 6 ---
16
+ .../cputestdata/x86_64-baseline-1-result.xml | 5 --
17
+ tests/cputestdata/x86_64-baseline-1.xml | 20 --------
18
+ .../cputestdata/x86_64-baseline-2-result.xml | 4 --
19
+ tests/cputestdata/x86_64-baseline-2.xml | 22 ---------
20
+ .../x86_64-baseline-5-expanded.xml | 47 -------------------
21
+ .../cputestdata/x86_64-baseline-5-result.xml | 10 ----
22
+ tests/cputestdata/x86_64-baseline-5.xml | 35 --------------
23
+ .../cputestdata/x86_64-baseline-7-result.xml | 4 --
24
+ tests/cputestdata/x86_64-baseline-7.xml | 24 ----------
25
+ .../cputestdata/x86_64-baseline-8-result.xml | 4 --
26
+ tests/cputestdata/x86_64-baseline-8.xml | 28 -----------
27
+ 12 files changed, 209 deletions(-)
28
+ delete mode 100644 tests/cputestdata/x86_64-baseline-1-result.xml
29
+ delete mode 100644 tests/cputestdata/x86_64-baseline-1.xml
30
+ delete mode 100644 tests/cputestdata/x86_64-baseline-2-result.xml
31
+ delete mode 100644 tests/cputestdata/x86_64-baseline-2.xml
32
+ delete mode 100644 tests/cputestdata/x86_64-baseline-5-expanded.xml
33
+ delete mode 100644 tests/cputestdata/x86_64-baseline-5-result.xml
34
+ delete mode 100644 tests/cputestdata/x86_64-baseline-5.xml
35
+ delete mode 100644 tests/cputestdata/x86_64-baseline-7-result.xml
36
+ delete mode 100644 tests/cputestdata/x86_64-baseline-7.xml
37
+ delete mode 100644 tests/cputestdata/x86_64-baseline-8-result.xml
38
+ delete mode 100644 tests/cputestdata/x86_64-baseline-8.xml
39
+
40
+ diff --git a/tests/cputest.c b/tests/cputest.c
41
+ index 0f0621292a..20d56836be 100644
42
+ --- a/tests/cputest.c
43
+ +++ b/tests/cputest.c
44
+ @@ -1051,18 +1051,12 @@ mymain(void)
45
+ DO_TEST_BASELINE(VIR_ARCH_X86_64, "incompatible-vendors", 0, -1);
46
+ DO_TEST_BASELINE(VIR_ARCH_X86_64, "no-vendor", 0, 0);
47
+ DO_TEST_BASELINE(VIR_ARCH_X86_64, "some-vendors", 0, 0);
48
+ - DO_TEST_BASELINE(VIR_ARCH_X86_64, "1", 0, 0);
49
+ - DO_TEST_BASELINE(VIR_ARCH_X86_64, "2", 0, 0);
50
+ DO_TEST_BASELINE(VIR_ARCH_X86_64, "3", 0, 0);
51
+ DO_TEST_BASELINE(VIR_ARCH_X86_64, "3", VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES, 0);
52
+ DO_TEST_BASELINE(VIR_ARCH_X86_64, "4", 0, 0);
53
+ DO_TEST_BASELINE(VIR_ARCH_X86_64, "4", VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES, 0);
54
+ - DO_TEST_BASELINE(VIR_ARCH_X86_64, "5", 0, 0);
55
+ - DO_TEST_BASELINE(VIR_ARCH_X86_64, "5", VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES, 0);
56
+ DO_TEST_BASELINE(VIR_ARCH_X86_64, "6", 0, 0);
57
+ DO_TEST_BASELINE(VIR_ARCH_X86_64, "6", VIR_CONNECT_BASELINE_CPU_MIGRATABLE, 0);
58
+ - DO_TEST_BASELINE(VIR_ARCH_X86_64, "7", 0, 0);
59
+ - DO_TEST_BASELINE(VIR_ARCH_X86_64, "8", 0, 0);
60
+
61
+ DO_TEST_BASELINE(VIR_ARCH_PPC64, "incompatible-vendors", 0, -1);
62
+ DO_TEST_BASELINE(VIR_ARCH_PPC64, "no-vendor", 0, 0);
63
+ diff --git a/tests/cputestdata/x86_64-baseline-1-result.xml b/tests/cputestdata/x86_64-baseline-1-result.xml
64
+ deleted file mode 100644
65
+ index 96c4f43b3d..0000000000
66
+ --- a/tests/cputestdata/x86_64-baseline-1-result.xml
67
+ +++ /dev/null
68
+ @@ -1,5 +0,0 @@
69
+ -<cpu mode='custom' match='exact'>
70
+ - <model fallback='allow'>Conroe</model>
71
+ - <vendor>Intel</vendor>
72
+ - <feature policy='disable' name='lahf_lm'/>
73
+ -</cpu>
74
+ diff --git a/tests/cputestdata/x86_64-baseline-1.xml b/tests/cputestdata/x86_64-baseline-1.xml
75
+ deleted file mode 100644
76
+ index 509e6a85d2..0000000000
77
+ --- a/tests/cputestdata/x86_64-baseline-1.xml
78
+ +++ /dev/null
79
+ @@ -1,20 +0,0 @@
80
+ -<cpuTest>
81
+ -<cpu>
82
+ - <arch>x86_64</arch>
83
+ - <model>Penryn</model>
84
+ - <vendor>Intel</vendor>
85
+ - <topology sockets='2' cores='4' threads='1'/>
86
+ -</cpu>
87
+ -<cpu>
88
+ - <arch>x86_64</arch>
89
+ - <model>Conroe</model>
90
+ - <vendor>Intel</vendor>
91
+ - <topology sockets='1' cores='1' threads='1'/>
92
+ -</cpu>
93
+ -<cpu>
94
+ - <arch>x86_64</arch>
95
+ - <model>core2duo</model>
96
+ - <vendor>Intel</vendor>
97
+ - <topology sockets='1' cores='1' threads='1'/>
98
+ -</cpu>
99
+ -</cpuTest>
100
+ diff --git a/tests/cputestdata/x86_64-baseline-2-result.xml b/tests/cputestdata/x86_64-baseline-2-result.xml
101
+ deleted file mode 100644
102
+ index a11352d0b1..0000000000
103
+ --- a/tests/cputestdata/x86_64-baseline-2-result.xml
104
+ +++ /dev/null
105
+ @@ -1,4 +0,0 @@
106
+ -<cpu mode='custom' match='exact'>
107
+ - <model fallback='allow'>core2duo</model>
108
+ - <feature policy='disable' name='nx'/>
109
+ -</cpu>
110
+ diff --git a/tests/cputestdata/x86_64-baseline-2.xml b/tests/cputestdata/x86_64-baseline-2.xml
111
+ deleted file mode 100644
112
+ index 055223fd34..0000000000
113
+ --- a/tests/cputestdata/x86_64-baseline-2.xml
114
+ +++ /dev/null
115
+ @@ -1,22 +0,0 @@
116
+ -<cpuTest>
117
+ -<cpu>
118
+ - <arch>x86_64</arch>
119
+ - <model>core2duo</model>
120
+ - <topology sockets='1' cores='2' threads='1'/>
121
+ -</cpu>
122
+ -<cpu>
123
+ - <arch>x86_64</arch>
124
+ - <model>pentiumpro</model>
125
+ - <topology sockets='1' cores='2' threads='1'/>
126
+ - <feature name='mtrr'/>
127
+ - <feature name='clflush'/>
128
+ - <feature name='mca'/>
129
+ - <feature name='vme'/>
130
+ - <feature name='pse36'/>
131
+ - <feature name='pni'/>
132
+ - <feature name='monitor'/>
133
+ - <feature name='ssse3'/>
134
+ - <feature name='lm'/>
135
+ - <feature name='syscall'/>
136
+ -</cpu>
137
+ -</cpuTest>
138
+ diff --git a/tests/cputestdata/x86_64-baseline-5-expanded.xml b/tests/cputestdata/x86_64-baseline-5-expanded.xml
139
+ deleted file mode 100644
140
+ index 2c1b400150..0000000000
141
+ --- a/tests/cputestdata/x86_64-baseline-5-expanded.xml
142
+ +++ /dev/null
143
+ @@ -1,47 +0,0 @@
144
+ -<cpu mode='custom' match='exact'>
145
+ - <model fallback='allow'>SandyBridge</model>
146
+ - <vendor>Intel</vendor>
147
+ - <feature policy='require' name='aes'/>
148
+ - <feature policy='require' name='apic'/>
149
+ - <feature policy='require' name='avx'/>
150
+ - <feature policy='require' name='clflush'/>
151
+ - <feature policy='require' name='cmov'/>
152
+ - <feature policy='require' name='cx16'/>
153
+ - <feature policy='require' name='cx8'/>
154
+ - <feature policy='require' name='de'/>
155
+ - <feature policy='require' name='fpu'/>
156
+ - <feature policy='require' name='fxsr'/>
157
+ - <feature policy='require' name='hypervisor'/>
158
+ - <feature policy='require' name='lahf_lm'/>
159
+ - <feature policy='require' name='lm'/>
160
+ - <feature policy='require' name='mca'/>
161
+ - <feature policy='require' name='mce'/>
162
+ - <feature policy='require' name='mmx'/>
163
+ - <feature policy='require' name='msr'/>
164
+ - <feature policy='require' name='mtrr'/>
165
+ - <feature policy='require' name='nx'/>
166
+ - <feature policy='require' name='osxsave'/>
167
+ - <feature policy='require' name='pae'/>
168
+ - <feature policy='require' name='pat'/>
169
+ - <feature policy='require' name='pcid'/>
170
+ - <feature policy='require' name='pclmuldq'/>
171
+ - <feature policy='require' name='pge'/>
172
+ - <feature policy='require' name='pni'/>
173
+ - <feature policy='require' name='popcnt'/>
174
+ - <feature policy='require' name='pse'/>
175
+ - <feature policy='require' name='pse36'/>
176
+ - <feature policy='disable' name='rdtscp'/>
177
+ - <feature policy='require' name='sep'/>
178
+ - <feature policy='require' name='ss'/>
179
+ - <feature policy='require' name='sse'/>
180
+ - <feature policy='require' name='sse2'/>
181
+ - <feature policy='require' name='sse4.1'/>
182
+ - <feature policy='require' name='sse4.2'/>
183
+ - <feature policy='require' name='ssse3'/>
184
+ - <feature policy='require' name='syscall'/>
185
+ - <feature policy='require' name='tsc'/>
186
+ - <feature policy='require' name='tsc-deadline'/>
187
+ - <feature policy='require' name='vme'/>
188
+ - <feature policy='require' name='x2apic'/>
189
+ - <feature policy='require' name='xsave'/>
190
+ -</cpu>
191
+ diff --git a/tests/cputestdata/x86_64-baseline-5-result.xml b/tests/cputestdata/x86_64-baseline-5-result.xml
192
+ deleted file mode 100644
193
+ index 775a27de2e..0000000000
194
+ --- a/tests/cputestdata/x86_64-baseline-5-result.xml
195
+ +++ /dev/null
196
+ @@ -1,10 +0,0 @@
197
+ -<cpu mode='custom' match='exact'>
198
+ - <model fallback='allow'>SandyBridge</model>
199
+ - <vendor>Intel</vendor>
200
+ - <feature policy='require' name='vme'/>
201
+ - <feature policy='require' name='ss'/>
202
+ - <feature policy='require' name='pcid'/>
203
+ - <feature policy='require' name='osxsave'/>
204
+ - <feature policy='require' name='hypervisor'/>
205
+ - <feature policy='disable' name='rdtscp'/>
206
+ -</cpu>
207
+ diff --git a/tests/cputestdata/x86_64-baseline-5.xml b/tests/cputestdata/x86_64-baseline-5.xml
208
+ deleted file mode 100644
209
+ index 80cd533ca4..0000000000
210
+ --- a/tests/cputestdata/x86_64-baseline-5.xml
211
+ +++ /dev/null
212
+ @@ -1,35 +0,0 @@
213
+ -<cpuTest>
214
+ -<cpu>
215
+ - <arch>x86_64</arch>
216
+ - <model>Westmere</model>
217
+ - <vendor>Intel</vendor>
218
+ - <topology sockets='4' cores='1' threads='1'/>
219
+ - <feature name='hypervisor'/>
220
+ - <feature name='avx'/>
221
+ - <feature name='osxsave'/>
222
+ - <feature name='xsave'/>
223
+ - <feature name='tsc-deadline'/>
224
+ - <feature name='x2apic'/>
225
+ - <feature name='pcid'/>
226
+ - <feature name='pclmuldq'/>
227
+ - <feature name='ss'/>
228
+ - <feature name='vme'/>
229
+ -</cpu>
230
+ -<cpu>
231
+ - <arch>x86_64</arch>
232
+ - <model>Nehalem</model>
233
+ - <vendor>Intel</vendor>
234
+ - <topology sockets='4' cores='1' threads='1'/>
235
+ - <feature name='aes'/>
236
+ - <feature name='hypervisor'/>
237
+ - <feature name='avx'/>
238
+ - <feature name='osxsave'/>
239
+ - <feature name='xsave'/>
240
+ - <feature name='tsc-deadline'/>
241
+ - <feature name='x2apic'/>
242
+ - <feature name='pcid'/>
243
+ - <feature name='pclmuldq'/>
244
+ - <feature name='ss'/>
245
+ - <feature name='vme'/>
246
+ -</cpu>
247
+ -</cpuTest>
248
+ diff --git a/tests/cputestdata/x86_64-baseline-7-result.xml b/tests/cputestdata/x86_64-baseline-7-result.xml
249
+ deleted file mode 100644
250
+ index 2af549e77a..0000000000
251
+ --- a/tests/cputestdata/x86_64-baseline-7-result.xml
252
+ +++ /dev/null
253
+ @@ -1,4 +0,0 @@
254
+ -<cpu mode='custom' match='exact'>
255
+ - <model fallback='allow'>Haswell-noTSX</model>
256
+ - <vendor>Intel</vendor>
257
+ -</cpu>
258
+ diff --git a/tests/cputestdata/x86_64-baseline-7.xml b/tests/cputestdata/x86_64-baseline-7.xml
259
+ deleted file mode 100644
260
+ index b7e61b160c..0000000000
261
+ --- a/tests/cputestdata/x86_64-baseline-7.xml
262
+ +++ /dev/null
263
+ @@ -1,24 +0,0 @@
264
+ -<cpuTest>
265
+ - <cpu>
266
+ - <arch>x86_64</arch>
267
+ - <model>SandyBridge</model>
268
+ - <vendor>Intel</vendor>
269
+ - <topology sockets='1' cores='2' threads='2'/>
270
+ - <feature name='invpcid'/>
271
+ - <feature name='erms'/>
272
+ - <feature name='bmi2'/>
273
+ - <feature name='smep'/>
274
+ - <feature name='avx2'/>
275
+ - <feature name='bmi1'/>
276
+ - <feature name='fsgsbase'/>
277
+ - <feature name='movbe'/>
278
+ - <feature name='pcid'/>
279
+ - <feature name='fma'/>
280
+ - </cpu>
281
+ - <cpu>
282
+ - <arch>x86_64</arch>
283
+ - <model>Haswell-noTSX</model>
284
+ - <vendor>Intel</vendor>
285
+ - <topology sockets='1' cores='2' threads='2'/>
286
+ - </cpu>
287
+ -</cpuTest>
288
+ diff --git a/tests/cputestdata/x86_64-baseline-8-result.xml b/tests/cputestdata/x86_64-baseline-8-result.xml
289
+ deleted file mode 100644
290
+ index 88226b3dab..0000000000
291
+ --- a/tests/cputestdata/x86_64-baseline-8-result.xml
292
+ +++ /dev/null
293
+ @@ -1,4 +0,0 @@
294
+ -<cpu mode='custom' match='exact'>
295
+ - <model fallback='allow'>Broadwell-noTSX</model>
296
+ - <vendor>Intel</vendor>
297
+ -</cpu>
298
+ diff --git a/tests/cputestdata/x86_64-baseline-8.xml b/tests/cputestdata/x86_64-baseline-8.xml
299
+ deleted file mode 100644
300
+ index f1ee67d542..0000000000
301
+ --- a/tests/cputestdata/x86_64-baseline-8.xml
302
+ +++ /dev/null
303
+ @@ -1,28 +0,0 @@
304
+ -<cpuTest>
305
+ - <cpu>
306
+ - <arch>x86_64</arch>
307
+ - <model>SandyBridge</model>
308
+ - <vendor>Intel</vendor>
309
+ - <topology sockets='1' cores='2' threads='2'/>
310
+ - <feature name='invpcid'/>
311
+ - <feature name='erms'/>
312
+ - <feature name='bmi2'/>
313
+ - <feature name='smep'/>
314
+ - <feature name='avx2'/>
315
+ - <feature name='bmi1'/>
316
+ - <feature name='fsgsbase'/>
317
+ - <feature name='movbe'/>
318
+ - <feature name='pcid'/>
319
+ - <feature name='fma'/>
320
+ - <feature name='3dnowprefetch'/>
321
+ - <feature name='rdseed'/>
322
+ - <feature name='adx'/>
323
+ - <feature name='smap'/>
324
+ - </cpu>
325
+ - <cpu>
326
+ - <arch>x86_64</arch>
327
+ - <model>Broadwell-noTSX</model>
328
+ - <vendor>Intel</vendor>
329
+ - <topology sockets='1' cores='2' threads='2'/>
330
+ - </cpu>
331
+ -</cpuTest>
332
+ --
333
+ 2.35.1
334
+
SOURCES/libvirt-cputest-Give-better-names-to-baseline-tests.patch ADDED
@@ -0,0 +1,97 @@
1
+ From 89272567fd9e2b87133333f5565c1d9e2befb350 Mon Sep 17 00:00:00 2001
2
+ Message-Id: <89272567fd9e2b87133333f5565c1d9e2befb350@dist-git>
3
+ From: Jiri Denemark <jdenemar@redhat.com>
4
+ Date: Wed, 4 May 2022 16:28:03 +0200
5
+ Subject: [PATCH] cputest: Give better names to baseline tests
6
+
7
+ Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
8
+ Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
9
+ (cherry picked from commit 3daa68e26514dc114d71f4c44f7d728e93a53cd0)
10
+
11
+ https://bugzilla.redhat.com/show_bug.cgi?id=2084030
12
+
13
+ Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
14
+ ---
15
+ tests/cputest.c | 12 ++++++------
16
+ ... x86_64-baseline-Westmere+Nehalem-migratable.xml} | 0
17
+ ...l => x86_64-baseline-Westmere+Nehalem-result.xml} | 0
18
+ ...ne-6.xml => x86_64-baseline-Westmere+Nehalem.xml} | 0
19
+ ...ded.xml => x86_64-baseline-features-expanded.xml} | 0
20
+ ...esult.xml => x86_64-baseline-features-result.xml} | 0
21
+ ...4-baseline-4.xml => x86_64-baseline-features.xml} | 0
22
+ ...anded.xml => x86_64-baseline-simple-expanded.xml} | 0
23
+ ...-result.xml => x86_64-baseline-simple-result.xml} | 0
24
+ ..._64-baseline-3.xml => x86_64-baseline-simple.xml} | 0
25
+ 10 files changed, 6 insertions(+), 6 deletions(-)
26
+ rename tests/cputestdata/{x86_64-baseline-6-migratable.xml => x86_64-baseline-Westmere+Nehalem-migratable.xml} (100%)
27
+ rename tests/cputestdata/{x86_64-baseline-6-result.xml => x86_64-baseline-Westmere+Nehalem-result.xml} (100%)
28
+ rename tests/cputestdata/{x86_64-baseline-6.xml => x86_64-baseline-Westmere+Nehalem.xml} (100%)
29
+ rename tests/cputestdata/{x86_64-baseline-4-expanded.xml => x86_64-baseline-features-expanded.xml} (100%)
30
+ rename tests/cputestdata/{x86_64-baseline-4-result.xml => x86_64-baseline-features-result.xml} (100%)
31
+ rename tests/cputestdata/{x86_64-baseline-4.xml => x86_64-baseline-features.xml} (100%)
32
+ rename tests/cputestdata/{x86_64-baseline-3-expanded.xml => x86_64-baseline-simple-expanded.xml} (100%)
33
+ rename tests/cputestdata/{x86_64-baseline-3-result.xml => x86_64-baseline-simple-result.xml} (100%)
34
+ rename tests/cputestdata/{x86_64-baseline-3.xml => x86_64-baseline-simple.xml} (100%)
35
+
36
+ diff --git a/tests/cputest.c b/tests/cputest.c
37
+ index 20d56836be..b939e20718 100644
38
+ --- a/tests/cputest.c
39
+ +++ b/tests/cputest.c
40
+ @@ -1051,12 +1051,12 @@ mymain(void)
41
+ DO_TEST_BASELINE(VIR_ARCH_X86_64, "incompatible-vendors", 0, -1);
42
+ DO_TEST_BASELINE(VIR_ARCH_X86_64, "no-vendor", 0, 0);
43
+ DO_TEST_BASELINE(VIR_ARCH_X86_64, "some-vendors", 0, 0);
44
+ - DO_TEST_BASELINE(VIR_ARCH_X86_64, "3", 0, 0);
45
+ - DO_TEST_BASELINE(VIR_ARCH_X86_64, "3", VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES, 0);
46
+ - DO_TEST_BASELINE(VIR_ARCH_X86_64, "4", 0, 0);
47
+ - DO_TEST_BASELINE(VIR_ARCH_X86_64, "4", VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES, 0);
48
+ - DO_TEST_BASELINE(VIR_ARCH_X86_64, "6", 0, 0);
49
+ - DO_TEST_BASELINE(VIR_ARCH_X86_64, "6", VIR_CONNECT_BASELINE_CPU_MIGRATABLE, 0);
50
+ + DO_TEST_BASELINE(VIR_ARCH_X86_64, "simple", 0, 0);
51
+ + DO_TEST_BASELINE(VIR_ARCH_X86_64, "simple", VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES, 0);
52
+ + DO_TEST_BASELINE(VIR_ARCH_X86_64, "features", 0, 0);
53
+ + DO_TEST_BASELINE(VIR_ARCH_X86_64, "features", VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES, 0);
54
+ + DO_TEST_BASELINE(VIR_ARCH_X86_64, "Westmere+Nehalem", 0, 0);
55
+ + DO_TEST_BASELINE(VIR_ARCH_X86_64, "Westmere+Nehalem", VIR_CONNECT_BASELINE_CPU_MIGRATABLE, 0);
56
+
57
+ DO_TEST_BASELINE(VIR_ARCH_PPC64, "incompatible-vendors", 0, -1);
58
+ DO_TEST_BASELINE(VIR_ARCH_PPC64, "no-vendor", 0, 0);
59
+ diff --git a/tests/cputestdata/x86_64-baseline-6-migratable.xml b/tests/cputestdata/x86_64-baseline-Westmere+Nehalem-migratable.xml
60
+ similarity index 100%
61
+ rename from tests/cputestdata/x86_64-baseline-6-migratable.xml
62
+ rename to tests/cputestdata/x86_64-baseline-Westmere+Nehalem-migratable.xml
63
+ diff --git a/tests/cputestdata/x86_64-baseline-6-result.xml b/tests/cputestdata/x86_64-baseline-Westmere+Nehalem-result.xml
64
+ similarity index 100%
65
+ rename from tests/cputestdata/x86_64-baseline-6-result.xml
66
+ rename to tests/cputestdata/x86_64-baseline-Westmere+Nehalem-result.xml
67
+ diff --git a/tests/cputestdata/x86_64-baseline-6.xml b/tests/cputestdata/x86_64-baseline-Westmere+Nehalem.xml
68
+ similarity index 100%
69
+ rename from tests/cputestdata/x86_64-baseline-6.xml
70
+ rename to tests/cputestdata/x86_64-baseline-Westmere+Nehalem.xml
71
+ diff --git a/tests/cputestdata/x86_64-baseline-4-expanded.xml b/tests/cputestdata/x86_64-baseline-features-expanded.xml
72
+ similarity index 100%
73
+ rename from tests/cputestdata/x86_64-baseline-4-expanded.xml
74
+ rename to tests/cputestdata/x86_64-baseline-features-expanded.xml
75
+ diff --git a/tests/cputestdata/x86_64-baseline-4-result.xml b/tests/cputestdata/x86_64-baseline-features-result.xml
76
+ similarity index 100%
77
+ rename from tests/cputestdata/x86_64-baseline-4-result.xml
78
+ rename to tests/cputestdata/x86_64-baseline-features-result.xml
79
+ diff --git a/tests/cputestdata/x86_64-baseline-4.xml b/tests/cputestdata/x86_64-baseline-features.xml
80
+ similarity index 100%
81
+ rename from tests/cputestdata/x86_64-baseline-4.xml
82
+ rename to tests/cputestdata/x86_64-baseline-features.xml
83
+ diff --git a/tests/cputestdata/x86_64-baseline-3-expanded.xml b/tests/cputestdata/x86_64-baseline-simple-expanded.xml
84
+ similarity index 100%
85
+ rename from tests/cputestdata/x86_64-baseline-3-expanded.xml
86
+ rename to tests/cputestdata/x86_64-baseline-simple-expanded.xml
87
+ diff --git a/tests/cputestdata/x86_64-baseline-3-result.xml b/tests/cputestdata/x86_64-baseline-simple-result.xml
88
+ similarity index 100%
89
+ rename from tests/cputestdata/x86_64-baseline-3-result.xml
90
+ rename to tests/cputestdata/x86_64-baseline-simple-result.xml
91
+ diff --git a/tests/cputestdata/x86_64-baseline-3.xml b/tests/cputestdata/x86_64-baseline-simple.xml
92
+ similarity index 100%
93
+ rename from tests/cputestdata/x86_64-baseline-3.xml
94
+ rename to tests/cputestdata/x86_64-baseline-simple.xml
95
+ --
96
+ 2.35.1
97
+
SOURCES/libvirt-qemu_capabilities-Detect-memory-backend-.prealloc-threads-property.patch ADDED
@@ -0,0 +1,314 @@
1
+ From 9f9fcbc842846c6f2579ca52190f506060e191d8 Mon Sep 17 00:00:00 2001
2
+ Message-Id: <9f9fcbc842846c6f2579ca52190f506060e191d8@dist-git>
3
+ From: Michal Privoznik <mprivozn@redhat.com>
4
+ Date: Mon, 21 Mar 2022 16:55:05 +0100
5
+ Subject: [PATCH] qemu_capabilities: Detect memory-backend-*.prealloc-threads
6
+ property
7
+
8
+ The prealloc-threads is property of memory-backend class which is
9
+ parent to the other three classes memory-backend-{ram,file,memfd}.
10
+ Therefore the property is present for all, or none if QEMU is
11
+ older than v5.0.0-rc0~75^2~1^2~3 which introduced the property.
12
+
13
+ Anyway, the .reserve property is the same story, and we chose
14
+ memory-backend-file to detect it, so stick with our earlier
15
+ decision and use the same backend to detect this new property.
16
+
17
+ Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
18
+ Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
19
+ (cherry picked from commit a30dac15dcdb7a6c7a3e9b6cfc5cd77bae185081)
20
+
21
+ Conflicts:
22
+ src/qemu/qemu_capabilities.c: Context
23
+ src/qemu/qemu_capabilities.h
24
+ tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml
25
+ tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml
26
+ tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml
27
+ tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml
28
+ tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml
29
+ tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml
30
+ tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml
31
+ tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml
32
+ tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml
33
+ tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml
34
+ tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml
35
+ tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml
36
+ tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml
37
+ tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml
38
+
39
+ Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2075569
40
+ Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
41
+ ---
42
+ src/qemu/qemu_capabilities.c | 2 ++
43
+ src/qemu/qemu_capabilities.h | 1 +
44
+ tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml | 1 +
45
+ tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml | 1 +
46
+ tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml | 1 +
47
+ tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml | 1 +
48
+ tests/qemucapabilitiesdata/caps_5.1.0.sparc.xml | 1 +
49
+ tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml | 1 +
50
+ tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml | 1 +
51
+ tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml | 1 +
52
+ tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml | 1 +
53
+ tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml | 1 +
54
+ tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml | 1 +
55
+ tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml | 1 +
56
+ tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml | 1 +
57
+ tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml | 1 +
58
+ tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml | 1 +
59
+ tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml | 1 +
60
+ tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml | 1 +
61
+ tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml | 1 +
62
+ 20 files changed, 21 insertions(+)
63
+
64
+ diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
65
+ index 8ae80ef8d7..c4f7db55c8 100644
66
+ --- a/src/qemu/qemu_capabilities.c
67
+ +++ b/src/qemu/qemu_capabilities.c
68
+ @@ -657,6 +657,7 @@ VIR_ENUM_IMPL(virQEMUCaps,
69
+
70
+ /* 420 */
71
+ "blockdev-reopen.__com.redhat_rhel-av-8_2_0-api", /* QEMU_CAPS_BLOCKDEV_REOPEN_COM_REDHAT_AV_8_2_0_API */
72
+ + "memory-backend-file.prealloc-threads", /* QEMU_CAPS_MEMORY_BACKEND_PREALLOC_THREADS */
73
+ );
74
+
75
+
76
+ @@ -1713,6 +1714,7 @@ static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsMemoryBackendFile[] =
77
+ * released qemu versions. */
78
+ { "x-use-canonical-path-for-ramblock-id", QEMU_CAPS_X_USE_CANONICAL_PATH_FOR_RAMBLOCK_ID },
79
+ { "reserve", QEMU_CAPS_MEMORY_BACKEND_RESERVE },
80
+ + { "prealloc-threads", QEMU_CAPS_MEMORY_BACKEND_PREALLOC_THREADS },
81
+ };
82
+
83
+ static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsMemoryBackendMemfd[] = {
84
+ diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
85
+ index cde6c18b4c..8e65635e0d 100644
86
+ --- a/src/qemu/qemu_capabilities.h
87
+ +++ b/src/qemu/qemu_capabilities.h
88
+ @@ -636,6 +636,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */
89
+
90
+ /* 420 */
91
+ QEMU_CAPS_BLOCKDEV_REOPEN_COM_REDHAT_AV_8_2_0_API, /* downstream support for blockdev reopen in rhel-av-8.2.0 */
92
+ + QEMU_CAPS_MEMORY_BACKEND_PREALLOC_THREADS, /* -object memory-backend-*.prealloc-threads */
93
+
94
+ QEMU_CAPS_LAST /* this must always be the last item */
95
+ } virQEMUCapsFlags;
96
+ diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml
97
+ index bb6a7d5ee7..3b18f160db 100644
98
+ --- a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml
99
+ +++ b/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml
100
+ @@ -179,6 +179,7 @@
101
+ <flag name='input-linux'/>
102
+ <flag name='query-display-options'/>
103
+ <flag name='virtio-blk.queue-size'/>
104
+ + <flag name='memory-backend-file.prealloc-threads'/>
105
+ <version>5000000</version>
106
+ <kvmVersion>0</kvmVersion>
107
+ <microcodeVersion>61700241</microcodeVersion>
108
+ diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml
109
+ index f8317c1117..c90f2be296 100644
110
+ --- a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml
111
+ +++ b/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml
112
+ @@ -187,6 +187,7 @@
113
+ <flag name='input-linux'/>
114
+ <flag name='query-display-options'/>
115
+ <flag name='virtio-blk.queue-size'/>
116
+ + <flag name='memory-backend-file.prealloc-threads'/>
117
+ <version>5000000</version>
118
+ <kvmVersion>0</kvmVersion>
119
+ <microcodeVersion>42900241</microcodeVersion>
120
+ diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml b/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml
121
+ index 58c7eb6651..8fbe8f114f 100644
122
+ --- a/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml
123
+ +++ b/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml
124
+ @@ -171,6 +171,7 @@
125
+ <flag name='input-linux'/>
126
+ <flag name='query-display-options'/>
127
+ <flag name='virtio-blk.queue-size'/>
128
+ + <flag name='memory-backend-file.prealloc-threads'/>
129
+ <version>5000000</version>
130
+ <kvmVersion>0</kvmVersion>
131
+ <microcodeVersion>0</microcodeVersion>
132
+ diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml
133
+ index 69f49020e7..b76c4346a4 100644
134
+ --- a/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml
135
+ +++ b/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml
136
+ @@ -221,6 +221,7 @@
137
+ <flag name='input-linux'/>
138
+ <flag name='query-display-options'/>
139
+ <flag name='virtio-blk.queue-size'/>
140
+ + <flag name='memory-backend-file.prealloc-threads'/>
141
+ <version>5000000</version>
142
+ <kvmVersion>0</kvmVersion>
143
+ <microcodeVersion>43100241</microcodeVersion>
144
+ diff --git a/tests/qemucapabilitiesdata/caps_5.1.0.sparc.xml b/tests/qemucapabilitiesdata/caps_5.1.0.sparc.xml
145
+ index 58af90b29f..7de7c291f5 100644
146
+ --- a/tests/qemucapabilitiesdata/caps_5.1.0.sparc.xml
147
+ +++ b/tests/qemucapabilitiesdata/caps_5.1.0.sparc.xml
148
+ @@ -90,6 +90,7 @@
149
+ <flag name='rotation-rate'/>
150
+ <flag name='input-linux'/>
151
+ <flag name='query-display-options'/>
152
+ + <flag name='memory-backend-file.prealloc-threads'/>
153
+ <version>5001000</version>
154
+ <kvmVersion>0</kvmVersion>
155
+ <microcodeVersion>0</microcodeVersion>
156
+ diff --git a/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml
157
+ index 578e16e8b0..9b5cb3cd7a 100644
158
+ --- a/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml
159
+ +++ b/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml
160
+ @@ -224,6 +224,7 @@
161
+ <flag name='query-display-options'/>
162
+ <flag name='virtio-blk.queue-size'/>
163
+ <flag name='virtio-mem-pci'/>
164
+ + <flag name='memory-backend-file.prealloc-threads'/>
165
+ <version>5001000</version>
166
+ <kvmVersion>0</kvmVersion>
167
+ <microcodeVersion>43100242</microcodeVersion>
168
+ diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml
169
+ index b943eaedaf..020c04c1c4 100644
170
+ --- a/tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml
171
+ +++ b/tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml
172
+ @@ -184,6 +184,7 @@
173
+ <flag name='query-display-options'/>
174
+ <flag name='virtio-blk.queue-size'/>
175
+ <flag name='query-dirty-rate'/>
176
+ + <flag name='memory-backend-file.prealloc-threads'/>
177
+ <version>5002000</version>
178
+ <kvmVersion>0</kvmVersion>
179
+ <microcodeVersion>61700243</microcodeVersion>
180
+ diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml
181
+ index ec64e1cacf..5346b1552c 100644
182
+ --- a/tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml
183
+ +++ b/tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml
184
+ @@ -190,6 +190,7 @@
185
+ <flag name='query-display-options'/>
186
+ <flag name='virtio-blk.queue-size'/>
187
+ <flag name='query-dirty-rate'/>
188
+ + <flag name='memory-backend-file.prealloc-threads'/>
189
+ <version>5002000</version>
190
+ <kvmVersion>0</kvmVersion>
191
+ <microcodeVersion>42900243</microcodeVersion>
192
+ diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml b/tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml
193
+ index a11d15f91a..9f6974f85d 100644
194
+ --- a/tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml
195
+ +++ b/tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml
196
+ @@ -174,6 +174,7 @@
197
+ <flag name='query-display-options'/>
198
+ <flag name='virtio-blk.queue-size'/>
199
+ <flag name='query-dirty-rate'/>
200
+ + <flag name='memory-backend-file.prealloc-threads'/>
201
+ <version>5002000</version>
202
+ <kvmVersion>0</kvmVersion>
203
+ <microcodeVersion>0</microcodeVersion>
204
+ diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml b/tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml
205
+ index 552e1d43c9..44753b64c3 100644
206
+ --- a/tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml
207
+ +++ b/tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml
208
+ @@ -141,6 +141,7 @@
209
+ <flag name='query-display-options'/>
210
+ <flag name='virtio-blk.queue-size'/>
211
+ <flag name='query-dirty-rate'/>
212
+ + <flag name='memory-backend-file.prealloc-threads'/>
213
+ <version>5002000</version>
214
+ <kvmVersion>0</kvmVersion>
215
+ <microcodeVersion>39100243</microcodeVersion>
216
+ diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml
217
+ index bcc262551a..db11c99739 100644
218
+ --- a/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml
219
+ +++ b/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml
220
+ @@ -227,6 +227,7 @@
221
+ <flag name='virtio-mem-pci'/>
222
+ <flag name='piix4.acpi-root-pci-hotplug'/>
223
+ <flag name='query-dirty-rate'/>
224
+ + <flag name='memory-backend-file.prealloc-threads'/>
225
+ <version>5002000</version>
226
+ <kvmVersion>0</kvmVersion>
227
+ <microcodeVersion>43100243</microcodeVersion>
228
+ diff --git a/tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml
229
+ index 0fefe64537..5f9a97df43 100644
230
+ --- a/tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml
231
+ +++ b/tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml
232
+ @@ -192,6 +192,7 @@
233
+ <flag name='set-action'/>
234
+ <flag name='virtio-blk.queue-size'/>
235
+ <flag name='query-dirty-rate'/>
236
+ + <flag name='memory-backend-file.prealloc-threads'/>
237
+ <version>6000000</version>
238
+ <kvmVersion>0</kvmVersion>
239
+ <microcodeVersion>61700242</microcodeVersion>
240
+ diff --git a/tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml b/tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml
241
+ index 61685066b8..46bd1d3d2d 100644
242
+ --- a/tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml
243
+ +++ b/tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml
244
+ @@ -149,6 +149,7 @@
245
+ <flag name='set-action'/>
246
+ <flag name='virtio-blk.queue-size'/>
247
+ <flag name='query-dirty-rate'/>
248
+ + <flag name='memory-backend-file.prealloc-threads'/>
249
+ <version>6000000</version>
250
+ <kvmVersion>0</kvmVersion>
251
+ <microcodeVersion>39100242</microcodeVersion>
252
+ diff --git a/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml
253
+ index 0d6763e9a3..99bbb6e237 100644
254
+ --- a/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml
255
+ +++ b/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml
256
+ @@ -236,6 +236,7 @@
257
+ <flag name='piix4.acpi-root-pci-hotplug'/>
258
+ <flag name='query-dirty-rate'/>
259
+ <flag name='sev-inject-launch-secret'/>
260
+ + <flag name='memory-backend-file.prealloc-threads'/>
261
+ <version>6000000</version>
262
+ <kvmVersion>0</kvmVersion>
263
+ <microcodeVersion>43100242</microcodeVersion>
264
+ diff --git a/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml
265
+ index 228f397c67..ff0715e605 100644
266
+ --- a/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml
267
+ +++ b/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml
268
+ @@ -240,6 +240,7 @@
269
+ <flag name='query-dirty-rate'/>
270
+ <flag name='rbd-encryption'/>
271
+ <flag name='sev-inject-launch-secret'/>
272
+ + <flag name='memory-backend-file.prealloc-threads'/>
273
+ <version>6001000</version>
274
+ <kvmVersion>0</kvmVersion>
275
+ <microcodeVersion>43100243</microcodeVersion>
276
+ diff --git a/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml
277
+ index 6bf9933bc5..dd6f0e6919 100644
278
+ --- a/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml
279
+ +++ b/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml
280
+ @@ -203,6 +203,7 @@
281
+ <flag name='memory-backend-file.reserve'/>
282
+ <flag name='query-dirty-rate'/>
283
+ <flag name='rbd-encryption'/>
284
+ + <flag name='memory-backend-file.prealloc-threads'/>
285
+ <version>6001050</version>
286
+ <kvmVersion>0</kvmVersion>
287
+ <microcodeVersion>61700244</microcodeVersion>
288
+ diff --git a/tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml
289
+ index 06cd7fb396..2646cdf88f 100644
290
+ --- a/tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml
291
+ +++ b/tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml
292
+ @@ -199,6 +199,7 @@
293
+ <flag name='piix4.acpi-root-pci-hotplug'/>
294
+ <flag name='query-dirty-rate'/>
295
+ <flag name='rbd-encryption'/>
296
+ + <flag name='memory-backend-file.prealloc-threads'/>
297
+ <version>6001050</version>
298
+ <kvmVersion>0</kvmVersion>
299
+ <microcodeVersion>42900244</microcodeVersion>
300
+ diff --git a/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml
301
+ index 75aaeed03c..f25ec1b84a 100644
302
+ --- a/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml
303
+ +++ b/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml
304
+ @@ -241,6 +241,7 @@
305
+ <flag name='rbd-encryption'/>
306
+ <flag name='sev-guest-kernel-hashes'/>
307
+ <flag name='sev-inject-launch-secret'/>
308
+ + <flag name='memory-backend-file.prealloc-threads'/>
309
+ <version>6002000</version>
310
+ <kvmVersion>0</kvmVersion>
311
+ <microcodeVersion>43100244</microcodeVersion>
312
+ --
313
+ 2.35.1
314
+
SOURCES/libvirt-qemu_command-Generate-prealloc-threads-property.patch ADDED
@@ -0,0 +1,66 @@
1
+ From f9c8097e8a836052239c51552d943a76b8164de3 Mon Sep 17 00:00:00 2001
2
+ Message-Id: <f9c8097e8a836052239c51552d943a76b8164de3@dist-git>
3
+ From: Michal Privoznik <mprivozn@redhat.com>
4
+ Date: Mon, 21 Mar 2022 17:10:15 +0100
5
+ Subject: [PATCH] qemu_command: Generate prealloc-threads property
6
+
7
+ Let's generate prealloc-threads property onto the cmd line if
8
+ domain configuration requests so.
9
+
10
+ Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
11
+ Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
12
+ (cherry picked from commit b8d6ecc70c8a8e9c90bab48b6829b42d8b77c748)
13
+
14
+ Conflicts:
15
+ tests/qemuxml2argvdata/memfd-memory-numa.x86_64-latest.args:
16
+ Upstream has moved some cmd line arguments
17
+ (v8.0.0-260-gaf23241cfe) but that is not backported.
18
+
19
+ Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2075569
20
+ Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
21
+ ---
22
+ src/qemu/qemu_command.c | 5 ++++-
23
+ tests/qemuxml2argvdata/memfd-memory-numa.x86_64-latest.args | 4 ++--
24
+ 2 files changed, 6 insertions(+), 3 deletions(-)
25
+
26
+ diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
27
+ index 2acdcca2ff..d23af97e0c 100644
28
+ --- a/src/qemu/qemu_command.c
29
+ +++ b/src/qemu/qemu_command.c
30
+ @@ -3856,7 +3856,10 @@ qemuBuildMemoryBackendProps(virJSONValue **backendProps,
31
+ return -1;
32
+ } else {
33
+ if (!priv->memPrealloc &&
34
+ - virJSONValueObjectAdd(&props, "B:prealloc", prealloc, NULL) < 0)
35
+ + virJSONValueObjectAdd(&props,
36
+ + "B:prealloc", prealloc,
37
+ + "p:prealloc-threads", def->mem.allocation_threads,
38
+ + NULL) < 0)
39
+ return -1;
40
+ }
41
+
42
+ diff --git a/tests/qemuxml2argvdata/memfd-memory-numa.x86_64-latest.args b/tests/qemuxml2argvdata/memfd-memory-numa.x86_64-latest.args
43
+ index 04a320d469..9b2e6086c3 100644
44
+ --- a/tests/qemuxml2argvdata/memfd-memory-numa.x86_64-latest.args
45
+ +++ b/tests/qemuxml2argvdata/memfd-memory-numa.x86_64-latest.args
46
+ @@ -16,7 +16,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-instance-00000092/.config \
47
+ -m size=14680064k,slots=16,maxmem=1099511627776k \
48
+ -overcommit mem-lock=off \
49
+ -smp 8,sockets=1,dies=1,cores=8,threads=1 \
50
+ --object '{"qom-type":"memory-backend-memfd","id":"ram-node0","hugetlb":true,"hugetlbsize":2097152,"share":true,"prealloc":true,"size":15032385536,"host-nodes":[3],"policy":"preferred"}' \
51
+ +-object '{"qom-type":"memory-backend-memfd","id":"ram-node0","hugetlb":true,"hugetlbsize":2097152,"share":true,"prealloc":true,"prealloc-threads":8,"size":15032385536,"host-nodes":[3],"policy":"preferred"}' \
52
+ -numa node,nodeid=0,cpus=0-7,memdev=ram-node0 \
53
+ -uuid 126f2720-6f8e-45ab-a886-ec9277079a67 \
54
+ -display none \
55
+ @@ -29,7 +29,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-instance-00000092/.config \
56
+ -no-acpi \
57
+ -boot strict=on \
58
+ -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
59
+ --object '{"qom-type":"memory-backend-file","id":"memnvdimm0","mem-path":"/tmp/nvdimm","share":true,"prealloc":true,"size":536870912,"host-nodes":[3],"policy":"preferred"}' \
60
+ +-object '{"qom-type":"memory-backend-file","id":"memnvdimm0","mem-path":"/tmp/nvdimm","share":true,"prealloc":true,"prealloc-threads":8,"size":536870912,"host-nodes":[3],"policy":"preferred"}' \
61
+ -device nvdimm,node=0,memdev=memnvdimm0,id=nvdimm0,slot=0 \
62
+ -audiodev '{"id":"audio1","driver":"none"}' \
63
+ -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \
64
+ --
65
+ 2.35.1
66
+
SOURCES/libvirt-qemu_validate-Validate-prealloc-threads-against-qemuCpas.patch ADDED
@@ -0,0 +1,39 @@
1
+ From d1a1a95343946fbe0736a14073b63831320d55d2 Mon Sep 17 00:00:00 2001
2
+ Message-Id: <d1a1a95343946fbe0736a14073b63831320d55d2@dist-git>
3
+ From: Michal Privoznik <mprivozn@redhat.com>
4
+ Date: Mon, 21 Mar 2022 17:09:40 +0100
5
+ Subject: [PATCH] qemu_validate: Validate prealloc threads against qemuCpas
6
+
7
+ Only fairly new QEMUs are capable of user provided number of
8
+ preallocation threads. Validate this assumption.
9
+
10
+ Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
11
+ Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
12
+ (cherry picked from commit 75a4e0165ef199809974e97b507d3953e1de01d1)
13
+ Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2075569
14
+ Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
15
+ ---
16
+ src/qemu/qemu_validate.c | 7 +++++++
17
+ 1 file changed, 7 insertions(+)
18
+
19
+ diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c
20
+ index 3a69733f81..7bc14293d6 100644
21
+ --- a/src/qemu/qemu_validate.c
22
+ +++ b/src/qemu/qemu_validate.c
23
+ @@ -739,6 +739,13 @@ qemuValidateDomainDefMemory(const virDomainDef *def,
24
+ return -1;
25
+ }
26
+
27
+ + if (mem->allocation_threads > 0 &&
28
+ + !virQEMUCapsGet(qemuCaps, QEMU_CAPS_MEMORY_BACKEND_PREALLOC_THREADS)) {
29
+ + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
30
+ + _("preallocation threads are unsupported with this QEMU"));
31
+ + return -1;
32
+ + }
33
+ +
34
+ if (mem->source == VIR_DOMAIN_MEMORY_SOURCE_ANONYMOUS) {
35
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
36
+ _("hugepages are not allowed with anonymous "
37
+ --
38
+ 2.35.1
39
+
file modified
+29 -1
SPECS/libvirt.spec CHANGED
@@ -210,7 +210,7 @@
210
210
Summary: Library providing a simple virtualization API
211
211
Name: libvirt
212
212
Version: 8.0.0
213
- Release: 5%{?dist}%{?extra_release}
213
+ Release: 5.2%{?dist}%{?extra_release}
214
214
License: LGPLv2+
215
215
URL: https://libvirt.org/
216
216
@@ -238,6 +238,18 @@ Patch15: libvirt-qemu_command-Generate-memory-only-after-controllers.patch
238
238
Patch16: libvirt-qemu-Validate-domain-definition-even-on-migration.patch
239
239
Patch17: libvirt-node_device-Rework-udevKludgeStorageType.patch
240
240
Patch18: libvirt-node_device-Treat-NVMe-disks-as-regular-disks.patch
241
+ Patch19: libvirt-conf-Introduce-memory-allocation-threads.patch
242
+ Patch20: libvirt-qemu_capabilities-Detect-memory-backend-.prealloc-threads-property.patch
243
+ Patch21: libvirt-qemu_validate-Validate-prealloc-threads-against-qemuCpas.patch
244
+ Patch22: libvirt-qemu_command-Generate-prealloc-threads-property.patch
245
+ Patch23: libvirt-cpu_map-Disable-cpu64-rhel-for-host-model-and-baseline.patch
246
+ Patch24: libvirt-cputest-Drop-some-old-artificial-baseline-tests.patch
247
+ Patch25: libvirt-cputest-Give-better-names-to-baseline-tests.patch
248
+ Patch26: libvirt-cputest-Add-some-real-world-baseline-tests.patch
249
+ Patch27: libvirt-cpu_x86-Consolidate-signature-match-in-x86DecodeUseCandidate.patch
250
+ Patch28: libvirt-cpu_x86-Refactor-feature-list-comparison-in-x86DecodeUseCandidate.patch
251
+ Patch29: libvirt-cpu_x86-Penalize-disabled-features-when-computing-CPU-model.patch
252
+ Patch30: libvirt-cpu_x86-Ignore-enabled-features-for-input-models-in-x86DecodeUseCandidate.patch
241
253
242
254
Requires: libvirt-daemon = %{version}-%{release}
243
255
Requires: libvirt-daemon-config-network = %{version}-%{release}
@@ -2111,6 +2123,22 @@ exit 0
2111
2123
2112
2124
2113
2125
%changelog
2126
+ * Tue May 17 2022 Jiri Denemark <jdenemar@redhat.com> - 8.0.0-5.2.el8
2127
+ - cpu_map: Disable cpu64-rhel* for host-model and baseline (rhbz#2084030)
2128
+ - cputest: Drop some old artificial baseline tests (rhbz#2084030)
2129
+ - cputest: Give better names to baseline tests (rhbz#2084030)
2130
+ - cputest: Add some real world baseline tests (rhbz#2084030)
2131
+ - cpu_x86: Consolidate signature match in x86DecodeUseCandidate (rhbz#2084030)
2132
+ - cpu_x86: Refactor feature list comparison in x86DecodeUseCandidate (rhbz#2084030)
2133
+ - cpu_x86: Penalize disabled features when computing CPU model (rhbz#2084030)
2134
+ - cpu_x86: Ignore enabled features for input models in x86DecodeUseCandidate (rhbz#2084030)
2135
+
2136
+ * Wed Apr 27 2022 Jiri Denemark <jdenemar@redhat.com> - 8.0.0-5.1.el8
2137
+ - conf: Introduce memory allocation threads (rhbz#2075569)
2138
+ - qemu_capabilities: Detect memory-backend-*.prealloc-threads property (rhbz#2075569)
2139
+ - qemu_validate: Validate prealloc threads against qemuCpas (rhbz#2075569)
2140
+ - qemu_command: Generate prealloc-threads property (rhbz#2075569)
2141
+
2114
2142
* Fri Feb 25 2022 Jiri Denemark <jdenemar@redhat.com> - 8.0.0-5
2115
2143
- node_device: Rework udevKludgeStorageType() (rhbz#2056673)
2116
2144
- node_device: Treat NVMe disks as regular disks (rhbz#2056673)