When starting a domain without a CPU model specified in the domain XML, QEMU will choose a default one. Which is fine unless the domain gets migrated to another host because libvirt doesn't perform any CPU ABI checks and the virtual CPU provided by QEMU on the destination host can differ from the one on the source host. With QEMU 4.2.0 we can probe for the default CPU model used by QEMU for a particular machine type and store it in the domain XML. This way the chosen CPU model is more visible to users and libvirt will make sure the guest will see the exact same CPU after migration. https://bugzilla.redhat.com/show_bug.cgi?id=1598151 https://bugzilla.redhat.com/show_bug.cgi?id=1598162 Jiri Denemark (22): conf: Use VIR_AUTO* in virDomainCapsCPUModelsAdd conf: Drop nameLen parameter from virDomainCapsCPUModelsAdd qemu: Copy CPU models in virQEMUCapsGetCPUDefinitions qemu: Filter models in virQEMUCapsGetCPUDefinitions qemu: Use virQEMUCapsGetCPUDefinitions more qemu: Use VIR_AUTOPTR in qemuMonitorJSONGetCPUDefinitions qemu: Introduce qemuMonitorCPUDefs struct qemu: Flatten qemuMonitorCPUDefs.cpus build: Export virStringListCopy internal API qemu: Add qemuMonitorCPUDefsCopy qemu: Use VIR_AUTOFREE in virQEMUCapsLoadCPUModels qemu: Introduce virQEMUCapsCPUDefsToModels qemu: Switch qemuCaps to use qemuMonitorCPUDefs conf: Drop unused virDomainCapsCPUModelsFilter conf: Drop virDomainCapsCPUModelsAddSteal qemu: Store typename from query-cpu-definitions in qemuCaps qemu: Probe for default CPU types qemu: Introduce virQEMUCapsGetMachineDefaultCPU qemu: Drop unused virQEMUCapsGetDefaultMachine qemu: Use VIR_AUTOUNREF in qemuDomainDefPostParse conf: Define VIR_AUTOPTR for virCPUDef qemu: Store default CPU in domain XML src/conf/cpu_conf.h | 1 + src/conf/domain_capabilities.c | 86 +- src/conf/domain_capabilities.h | 8 - src/libvirt_private.syms | 3 +- src/qemu/qemu_capabilities.c | 324 +-- src/qemu/qemu_capabilities.h | 8 +- src/qemu/qemu_domain.c | 79 +- src/qemu/qemu_driver.c | 4 +- src/qemu/qemu_monitor.c | 74 +- src/qemu/qemu_monitor.h | 18 +- src/qemu/qemu_monitor_json.c | 81 +- src/qemu/qemu_monitor_json.h | 2 +- src/qemu/qemu_process.c | 7 +- tests/cputest.c | 7 +- .../caps_2.10.0.aarch64.xml | 126 +- .../caps_2.10.0.ppc64.xml | 1734 ++++++++-------- .../caps_2.10.0.s390x.xml | 264 +-- .../caps_2.10.0.x86_64.xml | 132 +- .../caps_2.11.0.s390x.xml | 264 +-- .../caps_2.11.0.x86_64.xml | 136 +- .../caps_2.12.0.aarch64.xml | 136 +- .../caps_2.12.0.ppc64.xml | 1750 ++++++++--------- .../caps_2.12.0.s390x.xml | 264 +-- .../caps_2.12.0.x86_64.xml | 180 +- .../qemucapabilitiesdata/caps_2.9.0.ppc64.xml | 1734 ++++++++-------- .../qemucapabilitiesdata/caps_2.9.0.s390x.xml | 256 +-- .../caps_2.9.0.x86_64.xml | 128 +- .../qemucapabilitiesdata/caps_3.0.0.ppc64.xml | 1750 ++++++++--------- .../qemucapabilitiesdata/caps_3.0.0.s390x.xml | 272 +-- .../caps_3.0.0.x86_64.xml | 184 +- .../qemucapabilitiesdata/caps_3.1.0.ppc64.xml | 1750 ++++++++--------- .../caps_3.1.0.x86_64.xml | 196 +- .../caps_4.0.0.aarch64.xml | 148 +- .../qemucapabilitiesdata/caps_4.0.0.ppc64.xml | 1750 ++++++++--------- .../qemucapabilitiesdata/caps_4.0.0.s390x.xml | 284 +-- .../caps_4.0.0.x86_64.xml | 196 +- .../caps_4.1.0.x86_64.xml | 400 ++-- .../caps_4.2.0.x86_64.xml | 492 ++--- tests/qemumonitorjsontest.c | 38 +- .../disk-cache.x86_64-latest.args | 1 + .../disk-cdrom-network.x86_64-latest.args | 1 + .../disk-cdrom-tray.x86_64-latest.args | 1 + .../disk-copy_on_read.x86_64-latest.args | 1 + .../disk-detect-zeroes.x86_64-latest.args | 1 + .../disk-floppy-q35-2_11.x86_64-latest.args | 1 + .../disk-floppy-q35-2_9.x86_64-latest.args | 1 + .../os-firmware-bios.x86_64-latest.args | 1 + ...os-firmware-efi-secboot.x86_64-latest.args | 1 + .../os-firmware-efi.x86_64-latest.args | 1 + .../tpm-emulator-tpm2-enc.x86_64-latest.args | 1 + .../tpm-emulator-tpm2.x86_64-latest.args | 1 + .../tpm-emulator.x86_64-latest.args | 1 + .../tseg-explicit-size.x86_64-latest.args | 1 + .../vhost-vsock-auto.x86_64-latest.args | 1 + .../vhost-vsock.x86_64-latest.args | 1 + .../os-firmware-bios.x86_64-latest.xml | 3 + .../os-firmware-efi-secboot.x86_64-latest.xml | 3 + .../os-firmware-efi.x86_64-latest.xml | 3 + .../tpm-emulator-tpm2-enc.x86_64-latest.xml | 3 + .../tpm-emulator-tpm2.x86_64-latest.xml | 3 + .../tpm-emulator.x86_64-latest.xml | 3 + .../tpm-passthrough-crb.x86_64-latest.xml | 3 + .../tpm-passthrough.x86_64-latest.xml | 3 + 63 files changed, 7721 insertions(+), 7585 deletions(-) -- 2.23.0 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list