diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c
index ca0e9b712d..81ff3be6ea 100644
--- a/src/cpu/cpu_x86.c
+++ b/src/cpu/cpu_x86.c
@@ -56,8 +56,6 @@ typedef virCPUx86Feature *virCPUx86FeaturePtr;
struct _virCPUx86Feature {
char *name;
virCPUx86Data *data;
-
- virCPUx86FeaturePtr next;
};
typedef struct _virCPUx86KVMFeature virCPUx86KVMFeature;
@@ -102,10 +100,12 @@ typedef virCPUx86Map *virCPUx86MapPtr;
struct _virCPUx86Map {
size_t nvendors;
virCPUx86VendorPtr *vendors;
- virCPUx86FeaturePtr features;
+ size_t nfeatures;
+ virCPUx86FeaturePtr *features;
size_t nmodels;
virCPUx86ModelPtr *models;
- virCPUx86FeaturePtr migrate_blockers;
+ size_t nblockers;
+ virCPUx86FeaturePtr *migrate_blockers;
};
static virCPUx86MapPtr cpuMap;
@@ -412,15 +412,15 @@ x86DataToCPUFeatures(virCPUDefPtr cpu,
virCPUx86Data *data,
virCPUx86MapPtr map)
{
- virCPUx86FeaturePtr feature = map->features;
+ size_t i;
- while (feature) {
+ for (i = 0; i < map->nfeatures; i++) {
+ virCPUx86FeaturePtr feature = map->features[i];
if (x86DataIsSubset(data, feature->data)) {
x86DataSubtract(data, feature->data);
if (virCPUDefAddFeature(cpu, feature->name, policy) < 0)
return -1;
}
- feature = feature->next;
}
return 0;
@@ -599,40 +599,15 @@ x86FeatureFree(virCPUx86FeaturePtr feature)
}
-static virCPUx86FeaturePtr
-x86FeatureCopy(virCPUx86FeaturePtr src)
-{
- virCPUx86FeaturePtr feature;
-
- if (VIR_ALLOC(feature) < 0)
- return NULL;
-
- if (VIR_STRDUP(feature->name, src->name) < 0)
- goto error;
-
- if (!(feature->data = x86DataCopy(src->data)))
- goto error;
-
- return feature;
-
- error:
- x86FeatureFree(feature);
- return NULL;
-}
-
-
static virCPUx86FeaturePtr
x86FeatureFind(virCPUx86MapPtr map,
const char *name)
{
- virCPUx86FeaturePtr feature;
+ size_t i;
- feature = map->features;
- while (feature) {
- if (STREQ(feature->name, name))
- return feature;
-
- feature = feature->next;
+ for (i = 0; i < map->nfeatures; i++) {
+ if (STREQ(map->features[i]->name, name))
+ return map->features[i];
}
return NULL;
@@ -646,21 +621,20 @@ x86FeatureNames(virCPUx86MapPtr map,
{
virBuffer ret = VIR_BUFFER_INITIALIZER;
bool first = true;
-
- virCPUx86FeaturePtr next_feature = map->features;
+ size_t i;
virBufferAdd(&ret, "", 0);
- while (next_feature) {
- if (x86DataIsSubset(data, next_feature->data)) {
+ for (i = 0; i < map->nfeatures; i++) {
+ virCPUx86FeaturePtr feature = map->features[i];
+ if (x86DataIsSubset(data, feature->data)) {
if (!first)
virBufferAdd(&ret, separator, -1);
else
first = false;
- virBufferAdd(&ret, next_feature->name, -1);
+ virBufferAdd(&ret, feature->name, -1);
}
- next_feature = next_feature->next;
}
return virBufferContentAndReset(&ret);
@@ -746,19 +720,13 @@ x86FeatureLoad(xmlXPathContextPtr ctxt,
goto cleanup;
}
- if (!migratable) {
- virCPUx86FeaturePtr blocker;
+ if (!migratable &&
+ VIR_APPEND_ELEMENT_COPY(map->migrate_blockers,
+ map->nblockers, feature) < 0)
+ goto cleanup;
- if (!(blocker = x86FeatureCopy(feature)))
- goto cleanup;
-
- blocker->next = map->migrate_blockers;
- map->migrate_blockers = blocker;
- }
-
- feature->next = map->features;
- map->features = feature;
- feature = NULL;
+ if (VIR_APPEND_ELEMENT(map->features, map->nfeatures, feature) < 0)
+ goto cleanup;
ret = 0;
@@ -1106,11 +1074,9 @@ x86MapFree(virCPUx86MapPtr map)
if (!map)
return;
- while (map->features) {
- virCPUx86FeaturePtr feature = map->features;
- map->features = feature->next;
- x86FeatureFree(feature);
- }
+ for (i = 0; i < map->nfeatures; i++)
+ x86FeatureFree(map->features[i]);
+ VIR_FREE(map->features);
for (i = 0; i < map->nmodels; i++)
x86ModelFree(map->models[i]);
@@ -1120,11 +1086,10 @@ x86MapFree(virCPUx86MapPtr map)
x86VendorFree(map->vendors[i]);
VIR_FREE(map->vendors);
- while (map->migrate_blockers) {
- virCPUx86FeaturePtr migrate_blocker = map->migrate_blockers;
- map->migrate_blockers = migrate_blocker->next;
- x86FeatureFree(migrate_blocker);
- }
+ /* migrate_blockers only points to the features from map->features list,
+ * which were already freed above
+ */
+ VIR_FREE(map->migrate_blockers);
VIR_FREE(map);
}
@@ -1157,14 +1122,19 @@ x86MapLoadInternalFeatures(virCPUx86MapPtr map)
{
size_t i;
virCPUx86FeaturePtr feature = NULL;
+ size_t nfeatures = map->nfeatures;
+ size_t count = ARRAY_CARDINALITY(x86_kvm_features);
- for (i = 0; i < ARRAY_CARDINALITY(x86_kvm_features); i++) {
+ if (VIR_EXPAND_N(map->features, nfeatures, count) < 0)
+ goto error;
+
+ for (i = 0; i < count; i++) {
const char *name = x86_kvm_features[i].name;
if (x86FeatureFind(map, name)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("CPU feature %s already defined"), name);
- return -1;
+ goto error;
}
if (!(feature = x86FeatureNew()))
@@ -1176,8 +1146,7 @@ x86MapLoadInternalFeatures(virCPUx86MapPtr map)
if (virCPUx86DataAddCPUID(feature->data, &x86_kvm_features[i].cpuid))
goto error;
- feature->next = map->features;
- map->features = feature;
+ map->features[map->nfeatures++] = feature;
feature = NULL;
}
@@ -1651,11 +1620,13 @@ x86Decode(virCPUDefPtr cpu,
* features directly */
if (flags & VIR_CONNECT_BASELINE_CPU_MIGRATABLE) {
for (i = 0; i < cpuModel->nfeatures; i++) {
- virCPUx86FeaturePtr feat;
- for (feat = map->migrate_blockers; feat; feat = feat->next) {
- if (STREQ(feat->name, cpuModel->features[i].name)) {
+ size_t j;
+ for (j = 0; j < map->nblockers; j++) {
+ if (STREQ(map->migrate_blockers[j]->name,
+ cpuModel->features[i].name)) {
VIR_FREE(cpuModel->features[i].name);
- VIR_DELETE_ELEMENT_INPLACE(cpuModel->features, i, cpuModel->nfeatures);
+ VIR_DELETE_ELEMENT_INPLACE(cpuModel->features, i,
+ cpuModel->nfeatures);
}
}
}
@@ -2106,7 +2077,6 @@ x86UpdateHostModel(virCPUDefPtr guest,
{
virCPUDefPtr oldguest = NULL;
virCPUx86MapPtr map;
- virCPUx86FeaturePtr feat;
size_t i;
int ret = -1;
@@ -2131,8 +2101,9 @@ x86UpdateHostModel(virCPUDefPtr guest,
* Note: this only works as long as no CPU model contains non-migratable
* features directly */
for (i = 0; i < guest->nfeatures; i++) {
- for (feat = map->migrate_blockers; feat; feat = feat->next) {
- if (STREQ(feat->name, guest->features[i].name)) {
+ size_t j;
+ for (j = 0; j < map->nblockers; j++) {
+ if (STREQ(map->migrate_blockers[j]->name, guest->features[i].name)) {
VIR_FREE(guest->features[i].name);
VIR_DELETE_ELEMENT_INPLACE(guest->features, i, guest->nfeatures);
}
diff --git a/tests/cputestdata/x86-baseline-3-expanded.xml b/tests/cputestdata/x86-baseline-3-expanded.xml
index a7e57be76d..f0c2273d8e 100644
--- a/tests/cputestdata/x86-baseline-3-expanded.xml
+++ b/tests/cputestdata/x86-baseline-3-expanded.xml
@@ -1,35 +1,35 @@
Westmere
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/cputestdata/x86-baseline-4-expanded.xml b/tests/cputestdata/x86-baseline-4-expanded.xml
index b5671b5d67..7e4578e1ac 100644
--- a/tests/cputestdata/x86-baseline-4-expanded.xml
+++ b/tests/cputestdata/x86-baseline-4-expanded.xml
@@ -1,46 +1,46 @@
Westmere
Intel
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/cputestdata/x86-baseline-4-result.xml b/tests/cputestdata/x86-baseline-4-result.xml
index 44fbc380bc..1461a5b430 100644
--- a/tests/cputestdata/x86-baseline-4-result.xml
+++ b/tests/cputestdata/x86-baseline-4-result.xml
@@ -1,14 +1,14 @@
Westmere
Intel
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
diff --git a/tests/cputestdata/x86-baseline-5-expanded.xml b/tests/cputestdata/x86-baseline-5-expanded.xml
index 2408704c85..daef2a78ff 100644
--- a/tests/cputestdata/x86-baseline-5-expanded.xml
+++ b/tests/cputestdata/x86-baseline-5-expanded.xml
@@ -1,47 +1,47 @@
SandyBridge
Intel
-
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/cputestdata/x86-baseline-5-result.xml b/tests/cputestdata/x86-baseline-5-result.xml
index 3c2f38c9aa..775a27de2e 100644
--- a/tests/cputestdata/x86-baseline-5-result.xml
+++ b/tests/cputestdata/x86-baseline-5-result.xml
@@ -1,10 +1,10 @@
SandyBridge
Intel
-
-
-
-
+
+
+
+
diff --git a/tests/cputestdata/x86-baseline-6-migratable.xml b/tests/cputestdata/x86-baseline-6-migratable.xml
index 3c2f38c9aa..775a27de2e 100644
--- a/tests/cputestdata/x86-baseline-6-migratable.xml
+++ b/tests/cputestdata/x86-baseline-6-migratable.xml
@@ -1,10 +1,10 @@
SandyBridge
Intel
-
-
-
-
+
+
+
+
diff --git a/tests/cputestdata/x86-baseline-6-result.xml b/tests/cputestdata/x86-baseline-6-result.xml
index bea0bebf40..cafca97d62 100644
--- a/tests/cputestdata/x86-baseline-6-result.xml
+++ b/tests/cputestdata/x86-baseline-6-result.xml
@@ -1,11 +1,11 @@
SandyBridge
Intel
-
-
-
-
-
+
+
+
+
+
diff --git a/tests/cputestdata/x86-host+guest,model486-result.xml b/tests/cputestdata/x86-host+guest,model486-result.xml
index e21c8b81f4..8bd425d203 100644
--- a/tests/cputestdata/x86-host+guest,model486-result.xml
+++ b/tests/cputestdata/x86-host+guest,model486-result.xml
@@ -1,37 +1,37 @@
x86_64
486
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/cputestdata/x86-host+guest,models,Penryn-result.xml b/tests/cputestdata/x86-host+guest,models,Penryn-result.xml
index 6a31dcd2aa..6cd0668326 100644
--- a/tests/cputestdata/x86-host+guest,models,Penryn-result.xml
+++ b/tests/cputestdata/x86-host+guest,models,Penryn-result.xml
@@ -1,13 +1,13 @@
x86_64
Nehalem
-
-
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/tests/cputestdata/x86-host+guest,models,qemu64-result.xml b/tests/cputestdata/x86-host+guest,models,qemu64-result.xml
index 469d39ac79..8b170e5fa5 100644
--- a/tests/cputestdata/x86-host+guest,models,qemu64-result.xml
+++ b/tests/cputestdata/x86-host+guest,models,qemu64-result.xml
@@ -1,13 +1,13 @@
x86_64
qemu64
-
-
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/tests/cputestdata/x86-host+guest,models-result.xml b/tests/cputestdata/x86-host+guest,models-result.xml
index 6a31dcd2aa..6cd0668326 100644
--- a/tests/cputestdata/x86-host+guest,models-result.xml
+++ b/tests/cputestdata/x86-host+guest,models-result.xml
@@ -1,13 +1,13 @@
x86_64
Nehalem
-
-
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/tests/cputestdata/x86-host+guest-result.xml b/tests/cputestdata/x86-host+guest-result.xml
index 9d37dec9ca..6082b7b992 100644
--- a/tests/cputestdata/x86-host+guest-result.xml
+++ b/tests/cputestdata/x86-host+guest-result.xml
@@ -1,11 +1,11 @@
x86_64
Penryn
-
-
-
-
-
+
+
+
+
+
diff --git a/tests/cputestdata/x86-host+host+host-model,models,Penryn-result.xml b/tests/cputestdata/x86-host+host+host-model,models,Penryn-result.xml
index e2b7f5b11d..2696356d98 100644
--- a/tests/cputestdata/x86-host+host+host-model,models,Penryn-result.xml
+++ b/tests/cputestdata/x86-host+host+host-model,models,Penryn-result.xml
@@ -1,19 +1,19 @@
x86_64
core2duo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/cputestdata/x86-host+min.xml b/tests/cputestdata/x86-host+min.xml
index 81011517bb..6d2d5cda35 100644
--- a/tests/cputestdata/x86-host+min.xml
+++ b/tests/cputestdata/x86-host+min.xml
@@ -1,17 +1,17 @@
Penryn
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/cputestdata/x86-host+pentium3.xml b/tests/cputestdata/x86-host+pentium3.xml
index d46525ce59..a8c15f433a 100644
--- a/tests/cputestdata/x86-host+pentium3.xml
+++ b/tests/cputestdata/x86-host+pentium3.xml
@@ -1,27 +1,27 @@
pentium3
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/cputestdata/x86-host+strict-force-extra-result.xml b/tests/cputestdata/x86-host+strict-force-extra-result.xml
index 68db4129c2..958d458fea 100644
--- a/tests/cputestdata/x86-host+strict-force-extra-result.xml
+++ b/tests/cputestdata/x86-host+strict-force-extra-result.xml
@@ -1,19 +1,19 @@
x86_64
Penryn
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/cputestdata/x86-host-Haswell-noTSX+Haswell,haswell,Haswell-result.xml b/tests/cputestdata/x86-host-Haswell-noTSX+Haswell,haswell,Haswell-result.xml
index 087aa7d4c9..dfdca1370a 100644
--- a/tests/cputestdata/x86-host-Haswell-noTSX+Haswell,haswell,Haswell-result.xml
+++ b/tests/cputestdata/x86-host-Haswell-noTSX+Haswell,haswell,Haswell-result.xml
@@ -1,6 +1,6 @@
x86_64
Haswell
-
+
diff --git a/tests/cputestdata/x86-host-Haswell-noTSX+Haswell-noTSX,haswell,Haswell-noTSX-result.xml b/tests/cputestdata/x86-host-Haswell-noTSX+Haswell-noTSX,haswell,Haswell-noTSX-result.xml
index 087aa7d4c9..dfdca1370a 100644
--- a/tests/cputestdata/x86-host-Haswell-noTSX+Haswell-noTSX,haswell,Haswell-noTSX-result.xml
+++ b/tests/cputestdata/x86-host-Haswell-noTSX+Haswell-noTSX,haswell,Haswell-noTSX-result.xml
@@ -1,6 +1,6 @@
x86_64
Haswell
-
+
diff --git a/tests/cputestdata/x86-host-better+pentium3,core2duo-result.xml b/tests/cputestdata/x86-host-better+pentium3,core2duo-result.xml
index 0c436d9216..2bf691c34b 100644
--- a/tests/cputestdata/x86-host-better+pentium3,core2duo-result.xml
+++ b/tests/cputestdata/x86-host-better+pentium3,core2duo-result.xml
@@ -1,21 +1,21 @@
x86_64
core2duo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/cputestdata/x86-host-better+pentium3,pentium3-result.xml b/tests/cputestdata/x86-host-better+pentium3,pentium3-result.xml
index 1e4f488616..d1d0c4b1e3 100644
--- a/tests/cputestdata/x86-host-better+pentium3,pentium3-result.xml
+++ b/tests/cputestdata/x86-host-better+pentium3,pentium3-result.xml
@@ -1,30 +1,30 @@
x86_64
pentium3
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/cputestdata/x86-host-better+pentium3-result.xml b/tests/cputestdata/x86-host-better+pentium3-result.xml
index 07be0f7d64..a37b36890d 100644
--- a/tests/cputestdata/x86-host-better+pentium3-result.xml
+++ b/tests/cputestdata/x86-host-better+pentium3-result.xml
@@ -1,18 +1,18 @@
x86_64
Nehalem
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/cputestdata/x86-host-worse+guest-result.xml b/tests/cputestdata/x86-host-worse+guest-result.xml
index 441259fac8..6b9c74add4 100644
--- a/tests/cputestdata/x86-host-worse+guest-result.xml
+++ b/tests/cputestdata/x86-host-worse+guest-result.xml
@@ -1,9 +1,9 @@
x86_64
Penryn
-
-
-
+
+
+
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-cpu-Haswell2.args b/tests/qemuxml2argvdata/qemuxml2argv-cpu-Haswell2.args
index 3f55ffb76b..6503a521c4 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-cpu-Haswell2.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-cpu-Haswell2.args
@@ -8,7 +8,7 @@ QEMU_AUDIO_DRV=none \
-name QEMUGuest1 \
-S \
-M pc \
--cpu Haswell,-rtm,-hle \
+-cpu Haswell,-hle,-rtm \
-m 214 \
-smp 6 \
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-cpu-exact1.args b/tests/qemuxml2argvdata/qemuxml2argv-cpu-exact1.args
index 9c9f53a077..971d522f44 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-cpu-exact1.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-cpu-exact1.args
@@ -8,7 +8,7 @@ QEMU_AUDIO_DRV=none \
-name QEMUGuest1 \
-S \
-M pc \
--cpu qemu64,-svm,-lm,-nx,-syscall,-clflush,-pse36,-mca \
+-cpu qemu64,-mca,-pse36,-clflush,-syscall,-nx,-lm,-svm \
-m 214 \
-smp 6 \
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-cpu-exact2-nofallback.args b/tests/qemuxml2argvdata/qemuxml2argv-cpu-exact2-nofallback.args
index 2bc03ca020..404878d1d2 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-cpu-exact2-nofallback.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-cpu-exact2-nofallback.args
@@ -8,7 +8,7 @@ QEMU_AUDIO_DRV=none \
-name QEMUGuest1 \
-S \
-M pc \
--cpu core2duo,+lahf_lm,+3dnowext,+xtpr,+ds_cpl,+tm,+ht,+ds,-nx \
+-cpu core2duo,+ds,+ht,+tm,+ds_cpl,+xtpr,+3dnowext,+lahf_lm,-nx \
-m 214 \
-smp 6 \
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-cpu-exact2.args b/tests/qemuxml2argvdata/qemuxml2argv-cpu-exact2.args
index 2bc03ca020..404878d1d2 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-cpu-exact2.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-cpu-exact2.args
@@ -8,7 +8,7 @@ QEMU_AUDIO_DRV=none \
-name QEMUGuest1 \
-S \
-M pc \
--cpu core2duo,+lahf_lm,+3dnowext,+xtpr,+ds_cpl,+tm,+ht,+ds,-nx \
+-cpu core2duo,+ds,+ht,+tm,+ds_cpl,+xtpr,+3dnowext,+lahf_lm,-nx \
-m 214 \
-smp 6 \
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-cpu-host-model-fallback.args b/tests/qemuxml2argvdata/qemuxml2argv-cpu-host-model-fallback.args
index 07a85041d7..d96d973471 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-cpu-host-model-fallback.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-cpu-host-model-fallback.args
@@ -8,8 +8,8 @@ QEMU_AUDIO_DRV=none \
-name QEMUGuest1 \
-S \
-M pc \
--cpu Penryn,+xtpr,+tm2,+est,+vmx,+ds_cpl,+monitor,+pbe,+tm,+ht,+ss,+acpi,+ds,\
-+vme,-sse4.1 \
+-cpu Penryn,+vme,+ds,+acpi,+ss,+ht,+tm,+pbe,+monitor,+ds_cpl,+vmx,+est,+tm2,\
++xtpr,-sse4.1 \
-m 214 \
-smp 6 \
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-cpu-host-model-vendor.args b/tests/qemuxml2argvdata/qemuxml2argv-cpu-host-model-vendor.args
index 4a8cf90860..04abe064cd 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-cpu-host-model-vendor.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-cpu-host-model-vendor.args
@@ -8,8 +8,8 @@ QEMU_AUDIO_DRV=none \
-name QEMUGuest1 \
-S \
-M pc \
--cpu 'core2duo,vendor=Libvirt QEMU,+lahf_lm,+xtpr,+cx16,+tm2,+est,+vmx,+ds_cpl,\
-+pbe,+tm,+ht,+ss,+acpi,+ds' \
+-cpu 'core2duo,vendor=Libvirt QEMU,+ds,+acpi,+ss,+ht,+tm,+pbe,+ds_cpl,+vmx,+est,\
++tm2,+cx16,+xtpr,+lahf_lm' \
-m 214 \
-smp 6 \
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-cpu-host-model.args b/tests/qemuxml2argvdata/qemuxml2argv-cpu-host-model.args
index b8dd2d446e..b6e660cf2f 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-cpu-host-model.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-cpu-host-model.args
@@ -8,8 +8,8 @@ QEMU_AUDIO_DRV=none \
-name QEMUGuest1 \
-S \
-M pc \
--cpu core2duo,+lahf_lm,+xtpr,+cx16,+tm2,+est,+vmx,+ds_cpl,+pbe,+tm,+ht,+ss,+acpi,\
-+ds \
+-cpu core2duo,+ds,+acpi,+ss,+ht,+tm,+pbe,+ds_cpl,+vmx,+est,+tm2,+cx16,+xtpr,\
++lahf_lm \
-m 214 \
-smp 6 \
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-cpu-minimum1.args b/tests/qemuxml2argvdata/qemuxml2argv-cpu-minimum1.args
index 849d945458..a7d37fc713 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-cpu-minimum1.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-cpu-minimum1.args
@@ -8,8 +8,8 @@ QEMU_AUDIO_DRV=none \
-name QEMUGuest1 \
-S \
-M pc \
--cpu core2duo,+lahf_lm,+xtpr,+cx16,+tm2,+est,+vmx,+ds_cpl,+pbe,+tm,+ht,+ss,+acpi,\
-+ds \
+-cpu core2duo,+ds,+acpi,+ss,+ht,+tm,+pbe,+ds_cpl,+vmx,+est,+tm2,+cx16,+xtpr,\
++lahf_lm \
-m 214 \
-smp 6 \
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-cpu-minimum2.args b/tests/qemuxml2argvdata/qemuxml2argv-cpu-minimum2.args
index 0de55abad6..ca6592fd36 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-cpu-minimum2.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-cpu-minimum2.args
@@ -8,8 +8,8 @@ QEMU_AUDIO_DRV=none \
-name QEMUGuest1 \
-S \
-M pc \
--cpu core2duo,+lahf_lm,+xtpr,+cx16,+tm2,+est,+vmx,+ds_cpl,+pbe,+tm,+ht,+ss,+acpi,\
-+ds,-lm,-nx,-syscall \
+-cpu core2duo,+ds,+acpi,+ss,+ht,+tm,+pbe,+ds_cpl,+vmx,+est,+tm2,+cx16,+xtpr,\
++lahf_lm,-syscall,-nx,-lm \
-m 214 \
-smp 6 \
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-cpu-strict1.args b/tests/qemuxml2argvdata/qemuxml2argv-cpu-strict1.args
index c0b420f36b..a6b2c1f155 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-cpu-strict1.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-cpu-strict1.args
@@ -8,7 +8,7 @@ QEMU_AUDIO_DRV=none \
-name QEMUGuest1 \
-S \
-M pc \
--cpu core2duo,+lahf_lm,+3dnowext,+xtpr,+est,+vmx,+ds_cpl,+tm,+ht,+acpi,+ds,-nx \
+-cpu core2duo,+ds,+acpi,+ht,+tm,+ds_cpl,+vmx,+est,+xtpr,+3dnowext,+lahf_lm,-nx \
-m 214 \
-smp 6 \
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-timeout.args b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-timeout.args
index 0950c1b285..100a94e45e 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-timeout.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-timeout.args
@@ -8,8 +8,8 @@ QEMU_AUDIO_DRV=spice \
-name f14 \
-S \
-M pc \
--cpu core2duo,+lahf_lm,+xtpr,+cx16,+tm2,+est,+vmx,+ds_cpl,+pbe,+tm,+ht,+ss,+acpi,\
-+ds \
+-cpu core2duo,+ds,+acpi,+ss,+ht,+tm,+pbe,+ds_cpl,+vmx,+est,+tm2,+cx16,+xtpr,\
++lahf_lm \
-m 1024 \
-smp 2 \
-uuid 553effab-b5e1-2d80-dfe3-da4344826c43 \