mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 11:35:19 +00:00
Do not format CPU features without a model
For host-passthrough CPU we don't honor the CPU features specified in the XML, but we allow outputting them via the UPDATE_CPU flag for dumpxml, this gives user a rough idea of what features the CPU might have. After restoring a managedsave'd domain, the features might end up in the live status XML (in /var/run) without the model. This XML cannot be parsed by the daemon after restart and the domain might disappear. This fix skips formatting the features for HOST_PASSTHROUGH when UPDATE_CPU is not specified, so the newly restored domains and newly created snapshots won't be affected. Note: this doesn't fix existing snapshots or already restored running domains. https://bugzilla.redhat.com/show_bug.cgi?id=1030793 https://bugzilla.redhat.com/show_bug.cgi?id=1151885
This commit is contained in:
parent
2764977314
commit
dd324bb270
@ -658,7 +658,7 @@ virCPUDefFormatBuf(virBufferPtr buf,
|
|||||||
virBufferAddLit(buf, "/>\n");
|
virBufferAddLit(buf, "/>\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < def->nfeatures; i++) {
|
for (i = 0; formatModel && i < def->nfeatures; i++) {
|
||||||
virCPUFeatureDefPtr feature = def->features + i;
|
virCPUFeatureDefPtr feature = def->features + i;
|
||||||
|
|
||||||
if (!feature->name) {
|
if (!feature->name) {
|
||||||
|
Loading…
Reference in New Issue
Block a user