[libvirt] [PATCH 0/6] RFC: qemu: virtio-{non-}transitional support

This series adds the beginnings of support for virtio-transitional and virtio-non-transitional qemu devices. qemu patches, queued for qemu 4.0.0: https://lists.gnu.org/archive/html/qemu-devel/2018-12/msg00923.html Previous libvirt discussion around this: https://www.redhat.com/archives/libvir-list/2018-August/msg01073.html Long story short we need to expose these options so apps have a usable way to support rhel6 + virtio + q35. This series only covers exposing the associated device models for disk and rng devices to make sure I'm on the right track. serial, net, scsi, input-host, balloon 9p, vsock, vhost-scsi still need to be implemented. Those should follow the rng example, except vhost-scsi may need to be a different approach. The main RFC bits here are: * The disk approach. danpb and I briefly discussed on IRC adding new bus= values vs a new model= attribute. We decided model= is the lesser of two evils, since bus= handling in apps is tied with target= generation, so adding new virtio-X bus= values will cause more work for apps. These patches add a <disk model=X/> attribute * The XML and naming. Previous discussions seemed to favor adding new model-style values rather than a 'transitional' attribute or similar. So these patches add model='virtio-transitional' and model='virtio-non-transitional' * The PCI address handling. I just mapped virtio-non-transitional to imply plain PCI addressing. I think that's all we need but I'm not positive so I'd appreciate a review of that approach. Cole Robinson (6): tests: Add capabilities data for QEMU 4.0.0 x86_64 tests: qemuxml2xml: Add basic DO_TEST_CAPS impl conf: Add <disk model='virtio-{non-}transitional'/> qemu: Wire up disk model=virtio-{non-}transitional qemu: domcaps: Report disk <enum name="model"> qemu: Support rng model=virtio-{non-}transitional docs/formatdomain.html.in | 10 + docs/schemas/domaincommon.rng | 14 +- src/conf/domain_capabilities.c | 1 + src/conf/domain_capabilities.h | 1 + src/conf/domain_conf.c | 32 +- src/conf/domain_conf.h | 12 + src/libvirt_private.syms | 2 + src/qemu/qemu_capabilities.c | 17 + src/qemu/qemu_capabilities.h | 6 + src/qemu/qemu_command.c | 43 +- src/qemu/qemu_domain_address.c | 8 +- .../bhyve_basic.x86_64.xml | 1 + .../bhyve_fbuf.x86_64.xml | 1 + .../bhyve_uefi.x86_64.xml | 1 + tests/domaincapsschemadata/full.xml | 5 + .../domaincapsschemadata/libxl-xenfv-usb.xml | 1 + .../domaincapsschemadata/libxl-xenpv-usb.xml | 1 + .../qemu_1.7.0.x86_64.xml | 1 + .../qemu_2.12.0-virt.aarch64.xml | 1 + .../qemu_2.12.0.ppc64.xml | 1 + .../qemu_2.12.0.s390x.xml | 1 + .../qemu_2.12.0.x86_64.xml | 1 + .../qemu_2.6.0-virt.aarch64.xml | 1 + .../qemu_2.6.0.aarch64.xml | 1 + .../domaincapsschemadata/qemu_2.6.0.ppc64.xml | 1 + .../qemu_2.6.0.x86_64.xml | 1 + .../domaincapsschemadata/qemu_2.7.0.s390x.xml | 1 + .../qemu_2.8.0-tcg.x86_64.xml | 1 + .../domaincapsschemadata/qemu_2.8.0.s390x.xml | 1 + .../qemu_2.8.0.x86_64.xml | 1 + .../qemu_2.9.0-q35.x86_64.xml | 1 + .../qemu_2.9.0-tcg.x86_64.xml | 1 + .../qemu_2.9.0.x86_64.xml | 1 + .../domaincapsschemadata/qemu_3.0.0.s390x.xml | 1 + .../qemu_4.0.0.x86_64.xml | 153 + tests/domaincapstest.c | 4 + .../caps_4.0.0.x86_64.replies | 23180 ++++++++++++++++ .../caps_4.0.0.x86_64.xml | 1388 + tests/qemucapabilitiestest.c | 1 + ...virtio-non-transitional.x86_64-latest.args | 37 + .../virtio-non-transitional.xml | 29 + .../virtio-transitional.x86_64-latest.args | 37 + .../qemuxml2argvdata/virtio-transitional.xml | 29 + tests/qemuxml2argvtest.c | 3 + .../virtio-non-transitional.xml | 50 + .../virtio-transitional.xml | 51 + tests/qemuxml2xmltest.c | 60 +- 47 files changed, 25172 insertions(+), 23 deletions(-) create mode 100644 tests/domaincapsschemadata/qemu_4.0.0.x86_64.xml create mode 100644 tests/qemucapabilitiesdata/caps_4.0.0.x86_64.replies create mode 100644 tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml create mode 100644 tests/qemuxml2argvdata/virtio-non-transitional.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/virtio-non-transitional.xml create mode 100644 tests/qemuxml2argvdata/virtio-transitional.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/virtio-transitional.xml create mode 100644 tests/qemuxml2xmloutdata/virtio-non-transitional.xml create mode 100644 tests/qemuxml2xmloutdata/virtio-transitional.xml -- 2.20.1

The next release of QEMU is going to be 4.0.0. A bit early, but this adds capabilities data for x86_64 from current qemu git 15bede554162dda822cd762c689edb6fa32b6e3b Signed-off-by: Cole Robinson <crobinso@redhat.com> --- .replies file snipped so mailing list doesn't reject it .../caps_4.0.0.x86_64.replies | 23180 ++++++++++++++++ .../caps_4.0.0.x86_64.xml | 1384 + tests/qemucapabilitiestest.c | 1 + 3 files changed, 24565 insertions(+) create mode 100644 tests/qemucapabilitiesdata/caps_4.0.0.x86_64.replies create mode 100644 tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml diff --git a/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml new file mode 100644 index 0000000000..c2db392e83 --- /dev/null +++ b/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml @@ -0,0 +1,1384 @@ +<qemuCaps> + <qemuctime>0</qemuctime> + <selfctime>0</selfctime> + <selfvers>0</selfvers> + <usedQMP/> + <flag name='kvm'/> + <flag name='no-hpet'/> + <flag name='spice'/> + <flag name='hda-duplex'/> + <flag name='ccid-emulated'/> + <flag name='ccid-passthru'/> + <flag name='virtio-tx-alg'/> + <flag name='virtio-blk-pci.ioeventfd'/> + <flag name='sga'/> + <flag name='virtio-blk-pci.event_idx'/> + <flag name='virtio-net-pci.event_idx'/> + <flag name='piix3-usb-uhci'/> + <flag name='piix4-usb-uhci'/> + <flag name='usb-ehci'/> + <flag name='ich9-usb-ehci1'/> + <flag name='vt82c686b-usb-uhci'/> + <flag name='pci-ohci'/> + <flag name='usb-redir'/> + <flag name='usb-hub'/> + <flag name='ich9-ahci'/> + <flag name='no-acpi'/> + <flag name='virtio-blk-pci.scsi'/> + <flag name='scsi-disk.channel'/> + <flag name='scsi-block'/> + <flag name='transaction'/> + <flag name='block-job-async'/> + <flag name='scsi-cd'/> + <flag name='ide-cd'/> + <flag name='hda-micro'/> + <flag name='dump-guest-memory'/> + <flag name='nec-usb-xhci'/> + <flag name='balloon-event'/> + <flag name='lsi'/> + <flag name='virtio-scsi-pci'/> + <flag name='blockio'/> + <flag name='disable-s3'/> + <flag name='disable-s4'/> + <flag name='usb-redir.filter'/> + <flag name='ide-drive.wwn'/> + <flag name='scsi-disk.wwn'/> + <flag name='seccomp-sandbox'/> + <flag name='reboot-timeout'/> + <flag name='seamless-migration'/> + <flag name='block-commit'/> + <flag name='vnc'/> + <flag name='drive-mirror'/> + <flag name='blockdev-snapshot-sync'/> + <flag name='qxl'/> + <flag name='VGA'/> + <flag name='cirrus-vga'/> + <flag name='vmware-svga'/> + <flag name='device-video-primary'/> + <flag name='usb-serial'/> + <flag name='nbd-server'/> + <flag name='virtio-rng'/> + <flag name='rng-random'/> + <flag name='rng-egd'/> + <flag name='megasas'/> + <flag name='tpm-passthrough'/> + <flag name='tpm-tis'/> + <flag name='pci-bridge'/> + <flag name='vfio-pci'/> + <flag name='mem-merge'/> + <flag name='drive-discard'/> + <flag name='mlock'/> + <flag name='device-del-event'/> + <flag name='dmi-to-pci-bridge'/> + <flag name='i440fx-pci-hole64-size'/> + <flag name='q35-pci-hole64-size'/> + <flag name='usb-storage'/> + <flag name='usb-storage.removable'/> + <flag name='ich9-intel-hda'/> + <flag name='kvm-pit-lost-tick-policy'/> + <flag name='boot-strict'/> + <flag name='pvpanic'/> + <flag name='spice-file-xfer-disable'/> + <flag name='usb-kbd'/> + <flag name='msg-timestamp'/> + <flag name='active-commit'/> + <flag name='change-backing-file'/> + <flag name='memory-backend-ram'/> + <flag name='numa'/> + <flag name='memory-backend-file'/> + <flag name='usb-audio'/> + <flag name='rtc-reset-reinjection'/> + <flag name='splash-timeout'/> + <flag name='iothread'/> + <flag name='migrate-rdma'/> + <flag name='ivshmem'/> + <flag name='drive-iotune-max'/> + <flag name='VGA.vgamem_mb'/> + <flag name='vmware-svga.vgamem_mb'/> + <flag name='qxl.vgamem_mb'/> + <flag name='pc-dimm'/> + <flag name='machine-vmport-opt'/> + <flag name='aes-key-wrap'/> + <flag name='dea-key-wrap'/> + <flag name='pci-serial'/> + <flag name='vhost-user-multiqueue'/> + <flag name='migration-event'/> + <flag name='ioh3420'/> + <flag name='x3130-upstream'/> + <flag name='xio3130-downstream'/> + <flag name='rtl8139'/> + <flag name='e1000'/> + <flag name='virtio-net'/> + <flag name='gic-version'/> + <flag name='incoming-defer'/> + <flag name='virtio-gpu'/> + <flag name='virtio-gpu.virgl'/> + <flag name='virtio-keyboard'/> + <flag name='virtio-mouse'/> + <flag name='virtio-tablet'/> + <flag name='virtio-input-host'/> + <flag name='chardev-file-append'/> + <flag name='ich9-disable-s3'/> + <flag name='ich9-disable-s4'/> + <flag name='vserport-change-event'/> + <flag name='virtio-balloon-pci.deflate-on-oom'/> + <flag name='mptsas1068'/> + <flag name='spice-gl'/> + <flag name='qxl.vram64_size_mb'/> + <flag name='chardev-logfile'/> + <flag name='debug-threads'/> + <flag name='secret'/> + <flag name='pxb'/> + <flag name='pxb-pcie'/> + <flag name='device-tray-moved-event'/> + <flag name='nec-usb-xhci-ports'/> + <flag name='virtio-scsi-pci.iothread'/> + <flag name='name-guest'/> + <flag name='qxl.max_outputs'/> + <flag name='spice-unix'/> + <flag name='drive-detect-zeroes'/> + <flag name='tls-creds-x509'/> + <flag name='intel-iommu'/> + <flag name='smm'/> + <flag name='virtio-pci-disable-legacy'/> + <flag name='query-hotpluggable-cpus'/> + <flag name='virtio-net.rx_queue_size'/> + <flag name='virtio-vga'/> + <flag name='drive-iotune-max-length'/> + <flag name='ivshmem-plain'/> + <flag name='ivshmem-doorbell'/> + <flag name='query-qmp-schema'/> + <flag name='gluster.debug_level'/> + <flag name='vhost-scsi'/> + <flag name='drive-iotune-group'/> + <flag name='query-cpu-model-expansion'/> + <flag name='virtio-net.host_mtu'/> + <flag name='spice-rendernode'/> + <flag name='nvdimm'/> + <flag name='pcie-root-port'/> + <flag name='query-cpu-definitions'/> + <flag name='block-write-threshold'/> + <flag name='query-named-block-nodes'/> + <flag name='cpu-cache'/> + <flag name='qemu-xhci'/> + <flag name='kernel-irqchip'/> + <flag name='kernel-irqchip.split'/> + <flag name='intel-iommu.intremap'/> + <flag name='intel-iommu.caching-mode'/> + <flag name='intel-iommu.eim'/> + <flag name='intel-iommu.device-iotlb'/> + <flag name='virtio.iommu_platform'/> + <flag name='virtio.ats'/> + <flag name='loadparm'/> + <flag name='vnc-multi-servers'/> + <flag name='virtio-net.tx_queue_size'/> + <flag name='chardev-reconnect'/> + <flag name='virtio-gpu.max_outputs'/> + <flag name='vxhs'/> + <flag name='virtio-blk.num-queues'/> + <flag name='vmcoreinfo'/> + <flag name='numa.dist'/> + <flag name='disk-share-rw'/> + <flag name='iscsi.password-secret'/> + <flag name='isa-serial'/> + <flag name='dump-completed'/> + <flag name='qcow2-luks'/> + <flag name='pcie-pci-bridge'/> + <flag name='seccomp-blacklist'/> + <flag name='query-cpus-fast'/> + <flag name='disk-write-cache'/> + <flag name='nbd-tls'/> + <flag name='tpm-crb'/> + <flag name='pr-manager-helper'/> + <flag name='qom-list-properties'/> + <flag name='memory-backend-file.discard-data'/> + <flag name='sdl-gl'/> + <flag name='screendump_device'/> + <flag name='hda-output'/> + <flag name='blockdev-del'/> + <flag name='vmgenid'/> + <flag name='vhost-vsock'/> + <flag name='chardev-fd-pass'/> + <flag name='tpm-emulator'/> + <flag name='mch'/> + <flag name='mch.extended-tseg-mbytes'/> + <flag name='usb-storage.werror'/> + <flag name='egl-headless'/> + <flag name='vfio-pci.display'/> + <flag name='memory-backend-memfd'/> + <flag name='memory-backend-memfd.hugetlb'/> + <flag name='iothread.poll-max-ns'/> + <flag name='egl-headless.rendernode'/> + <flag name='memory-backend-file.align'/> + <flag name='memory-backend-file.pmem'/> + <flag name='nvdimm.unarmed'/> + <version>3001050</version> + <kvmVersion>0</kvmVersion> + <microcodeVersion>446361</microcodeVersion> + <package>v3.1.0-759-g15bede5541</package> + <arch>x86_64</arch> + <hostCPU type='kvm' model='base' migratability='yes'> + <property name='phys-bits' type='number' value='0'/> + <property name='core-id' type='number' value='-1'/> + <property name='xlevel' type='number' value='2147483656'/> + <property name='cmov' type='boolean' value='true' migratable='yes'/> + <property name='ia64' type='boolean' value='false'/> + <property name='ssb-no' type='boolean' value='false'/> + <property name='aes' type='boolean' value='true' migratable='yes'/> + <property name='mmx' type='boolean' value='true' migratable='yes'/> + <property name='rdpid' type='boolean' value='false'/> + <property name='arat' type='boolean' value='true' migratable='yes'/> + <property name='gfni' type='boolean' value='false'/> + <property name='ibrs-all' type='boolean' value='false'/> + <property name='pause-filter' type='boolean' value='false'/> + <property name='xsavec' type='boolean' value='true' migratable='yes'/> + <property name='intel-pt' type='boolean' value='false'/> + <property name='hv-frequencies' type='boolean' value='false'/> + <property name='tsc-frequency' type='number' value='0'/> + <property name='xd' type='boolean' value='true' migratable='yes'/> + <property name='hv-vendor-id' type='string' value=''/> + <property name='kvm-asyncpf' type='boolean' value='true' migratable='yes'/> + <property name='kvm_asyncpf' type='boolean' value='true' migratable='yes'/> + <property name='perfctr_core' type='boolean' value='false'/> + <property name='perfctr-core' type='boolean' value='false'/> + <property name='mpx' type='boolean' value='true' migratable='yes'/> + <property name='pbe' type='boolean' value='false'/> + <property name='decodeassists' type='boolean' value='false'/> + <property name='avx512cd' type='boolean' value='false'/> + <property name='sse4_1' type='boolean' value='true' migratable='yes'/> + <property name='sse4.1' type='boolean' value='true' migratable='yes'/> + <property name='sse4-1' type='boolean' value='true' migratable='yes'/> + <property name='family' type='number' value='6'/> + <property name='legacy-cache' type='boolean' value='true' migratable='yes'/> + <property name='vmware-cpuid-freq' type='boolean' value='true' migratable='yes'/> + <property name='wbnoinvd' type='boolean' value='false'/> + <property name='avx512f' type='boolean' value='false'/> + <property name='msr' type='boolean' value='true' migratable='yes'/> + <property name='mce' type='boolean' value='true' migratable='yes'/> + <property name='mca' type='boolean' value='true' migratable='yes'/> + <property name='hv-runtime' type='boolean' value='false'/> + <property name='xcrypt' type='boolean' value='false'/> + <property name='thread-id' type='number' value='-1'/> + <property name='min-level' type='number' value='13'/> + <property name='xgetbv1' type='boolean' value='true' migratable='yes'/> + <property name='cid' type='boolean' value='false'/> + <property name='hv-relaxed' type='boolean' value='false'/> + <property name='hv-crash' type='boolean' value='false'/> + <property name='ds' type='boolean' value='false'/> + <property name='fxsr' type='boolean' value='true' migratable='yes'/> + <property name='xsaveopt' type='boolean' value='true' migratable='yes'/> + <property name='xtpr' type='boolean' value='false'/> + <property name='hv-evmcs' type='boolean' value='false'/> + <property name='avx512vl' type='boolean' value='false'/> + <property name='avx512-vpopcntdq' type='boolean' value='false'/> + <property name='phe' type='boolean' value='false'/> + <property name='extapic' type='boolean' value='false'/> + <property name='3dnowprefetch' type='boolean' value='true' migratable='yes'/> + <property name='avx512vbmi2' type='boolean' value='false'/> + <property name='cr8legacy' type='boolean' value='false'/> + <property name='stibp' type='boolean' value='false'/> + <property name='cpuid-0xb' type='boolean' value='true' migratable='yes'/> + <property name='xcrypt-en' type='boolean' value='false'/> + <property name='kvm_pv_eoi' type='boolean' value='true' migratable='yes'/> + <property name='apic-id' type='number' value='4294967295'/> + <property name='rsba' type='boolean' value='false'/> + <property name='pn' type='boolean' value='false'/> + <property name='dca' type='boolean' value='false'/> + <property name='vendor' type='string' value='GenuineIntel'/> + <property name='hv-ipi' type='boolean' value='false'/> + <property name='pku' type='boolean' value='false'/> + <property name='smx' type='boolean' value='false'/> + <property name='cmp_legacy' type='boolean' value='false'/> + <property name='cmp-legacy' type='boolean' value='false'/> + <property name='node-id' type='number' value='-1'/> + <property name='avx512-4fmaps' type='boolean' value='false'/> + <property name='vmcb_clean' type='boolean' value='false'/> + <property name='vmcb-clean' type='boolean' value='false'/> + <property name='3dnowext' type='boolean' value='false'/> + <property name='amd-no-ssb' type='boolean' value='false'/> + <property name='hle' type='boolean' value='true' migratable='yes'/> + <property name='npt' type='boolean' value='false'/> + <property name='rdctl-no' type='boolean' value='false'/> + <property name='memory' type='string' value='/machine/unattached/system[0]'/> + <property name='clwb' type='boolean' value='false'/> + <property name='lbrv' type='boolean' value='false'/> + <property name='adx' type='boolean' value='true' migratable='yes'/> + <property name='ss' type='boolean' value='true' migratable='yes'/> + <property name='pni' type='boolean' value='true' migratable='yes'/> + <property name='svm_lock' type='boolean' value='false'/> + <property name='svm-lock' type='boolean' value='false'/> + <property name='pfthreshold' type='boolean' value='false'/> + <property name='smep' type='boolean' value='true' migratable='yes'/> + <property name='smap' type='boolean' value='true' migratable='yes'/> + <property name='x2apic' type='boolean' value='true' migratable='yes'/> + <property name='avx512vbmi' type='boolean' value='false'/> + <property name='avx512vnni' type='boolean' value='false'/> + <property name='hv-stimer' type='boolean' value='false'/> + <property name='x-hv-synic-kvm-only' type='boolean' value='false'/> + <property name='i64' type='boolean' value='true' migratable='yes'/> + <property name='flushbyasid' type='boolean' value='false'/> + <property name='f16c' type='boolean' value='true' migratable='yes'/> + <property name='ace2-en' type='boolean' value='false'/> + <property name='pat' type='boolean' value='true' migratable='yes'/> + <property name='pae' type='boolean' value='true' migratable='yes'/> + <property name='sse' type='boolean' value='true' migratable='yes'/> + <property name='phe-en' type='boolean' value='false'/> + <property name='kvm_nopiodelay' type='boolean' value='true' migratable='yes'/> + <property name='kvm-nopiodelay' type='boolean' value='true' migratable='yes'/> + <property name='tm' type='boolean' value='false'/> + <property name='kvmclock-stable-bit' type='boolean' value='true' migratable='yes'/> + <property name='hypervisor' type='boolean' value='true' migratable='yes'/> + <property name='socket-id' type='number' value='-1'/> + <property name='pcommit' type='boolean' value='false'/> + <property name='syscall' type='boolean' value='true' migratable='yes'/> + <property name='level' type='number' value='13'/> + <property name='avx512dq' type='boolean' value='false'/> + <property name='x-migrate-smi-count' type='boolean' value='true' migratable='yes'/> + <property name='svm' type='boolean' value='false'/> + <property name='full-cpuid-auto-level' type='boolean' value='true' migratable='yes'/> + <property name='hv-reset' type='boolean' value='false'/> + <property name='invtsc' type='boolean' value='true' migratable='no'/> + <property name='sse3' type='boolean' value='true' migratable='yes'/> + <property name='sse2' type='boolean' value='true' migratable='yes'/> + <property name='ssbd' type='boolean' value='true' migratable='yes'/> + <property name='est' type='boolean' value='false'/> + <property name='avx512ifma' type='boolean' value='false'/> + <property name='tm2' type='boolean' value='false'/> + <property name='kvm-pv-ipi' type='boolean' value='true' migratable='yes'/> + <property name='kvm-pv-eoi' type='boolean' value='true' migratable='yes'/> + <property name='cx8' type='boolean' value='true' migratable='yes'/> + <property name='cldemote' type='boolean' value='false'/> + <property name='hv-reenlightenment' type='boolean' value='false'/> + <property name='kvm_mmu' type='boolean' value='false'/> + <property name='kvm-mmu' type='boolean' value='false'/> + <property name='sse4_2' type='boolean' value='true' migratable='yes'/> + <property name='sse4.2' type='boolean' value='true' migratable='yes'/> + <property name='sse4-2' type='boolean' value='true' migratable='yes'/> + <property name='pge' type='boolean' value='true' migratable='yes'/> + <property name='fill-mtrr-mask' type='boolean' value='true' migratable='yes'/> + <property name='avx512bitalg' type='boolean' value='false'/> + <property name='nodeid_msr' type='boolean' value='false'/> + <property name='pdcm' type='boolean' value='false'/> + <property name='movbe' type='boolean' value='true' migratable='yes'/> + <property name='model' type='number' value='142'/> + <property name='nrip_save' type='boolean' value='false'/> + <property name='nrip-save' type='boolean' value='false'/> + <property name='kvm_pv_unhalt' type='boolean' value='true' migratable='yes'/> + <property name='ssse3' type='boolean' value='true' migratable='yes'/> + <property name='sse4a' type='boolean' value='false'/> + <property name='invpcid' type='boolean' value='true' migratable='yes'/> + <property name='pdpe1gb' type='boolean' value='true' migratable='yes'/> + <property name='tsc-deadline' type='boolean' value='true' migratable='yes'/> + <property name='skip-l1dfl-vmentry' type='boolean' value='true' migratable='yes'/> + <property name='fma' type='boolean' value='true' migratable='yes'/> + <property name='cx16' type='boolean' value='true' migratable='yes'/> + <property name='de' type='boolean' value='true' migratable='yes'/> + <property name='pconfig' type='boolean' value='false'/> + <property name='enforce' type='boolean' value='false'/> + <property name='stepping' type='number' value='10'/> + <property name='xsave' type='boolean' value='true' migratable='yes'/> + <property name='clflush' type='boolean' value='true' migratable='yes'/> + <property name='skinit' type='boolean' value='false'/> + <property name='tsc' type='boolean' value='true' migratable='yes'/> + <property name='tce' type='boolean' value='false'/> + <property name='fpu' type='boolean' value='true' migratable='yes'/> + <property name='ibs' type='boolean' value='false'/> + <property name='ds_cpl' type='boolean' value='false'/> + <property name='ds-cpl' type='boolean' value='false'/> + <property name='host-phys-bits' type='boolean' value='false'/> + <property name='fma4' type='boolean' value='false'/> + <property name='la57' type='boolean' value='false'/> + <property name='osvw' type='boolean' value='false'/> + <property name='check' type='boolean' value='true' migratable='yes'/> + <property name='hv-spinlocks' type='number' value='-1'/> + <property name='pmu' type='boolean' value='false'/> + <property name='pmm' type='boolean' value='false'/> + <property name='apic' type='boolean' value='true' migratable='yes'/> + <property name='spec-ctrl' type='boolean' value='true' migratable='yes'/> + <property name='min-xlevel2' type='number' value='0'/> + <property name='tsc-adjust' type='boolean' value='true' migratable='yes'/> + <property name='tsc_adjust' type='boolean' value='true' migratable='yes'/> + <property name='kvm-steal-time' type='boolean' value='true' migratable='yes'/> + <property name='kvm_steal_time' type='boolean' value='true' migratable='yes'/> + <property name='kvmclock' type='boolean' value='true' migratable='yes'/> + <property name='l3-cache' type='boolean' value='true' migratable='yes'/> + <property name='lwp' type='boolean' value='false'/> + <property name='amd-ssbd' type='boolean' value='false'/> + <property name='ibpb' type='boolean' value='false'/> + <property name='xop' type='boolean' value='false'/> + <property name='avx' type='boolean' value='true' migratable='yes'/> + <property name='movdiri' type='boolean' value='false'/> + <property name='ace2' type='boolean' value='false'/> + <property name='avx512bw' type='boolean' value='false'/> + <property name='acpi' type='boolean' value='false'/> + <property name='hv-vapic' type='boolean' value='false'/> + <property name='fsgsbase' type='boolean' value='true' migratable='yes'/> + <property name='ht' type='boolean' value='false'/> + <property name='nx' type='boolean' value='true' migratable='yes'/> + <property name='pclmulqdq' type='boolean' value='true' migratable='yes'/> + <property name='mmxext' type='boolean' value='false'/> + <property name='vaes' type='boolean' value='false'/> + <property name='popcnt' type='boolean' value='true' migratable='yes'/> + <property name='xsaves' type='boolean' value='true' migratable='yes'/> + <property name='movdir64b' type='boolean' value='false'/> + <property name='tcg-cpuid' type='boolean' value='true' migratable='yes'/> + <property name='lm' type='boolean' value='true' migratable='yes'/> + <property name='umip' type='boolean' value='true' migratable='yes'/> + <property name='pse' type='boolean' value='true' migratable='yes'/> + <property name='avx2' type='boolean' value='true' migratable='yes'/> + <property name='sep' type='boolean' value='true' migratable='yes'/> + <property name='pclmuldq' type='boolean' value='true' migratable='yes'/> + <property name='virt-ssbd' type='boolean' value='false'/> + <property name='x-hv-max-vps' type='number' value='-1'/> + <property name='nodeid-msr' type='boolean' value='false'/> + <property name='kvm' type='boolean' value='true' migratable='yes'/> + <property name='misalignsse' type='boolean' value='false'/> + <property name='min-xlevel' type='number' value='2147483656'/> + <property name='kvm-pv-unhalt' type='boolean' value='true' migratable='yes'/> + <property name='bmi2' type='boolean' value='true' migratable='yes'/> + <property name='bmi1' type='boolean' value='true' migratable='yes'/> + <property name='realized' type='boolean' value='false'/> + <property name='tsc_scale' type='boolean' value='false'/> + <property name='tsc-scale' type='boolean' value='false'/> + <property name='topoext' type='boolean' value='false'/> + <property name='hv-vpindex' type='boolean' value='false'/> + <property name='xlevel2' type='number' value='0'/> + <property name='clflushopt' type='boolean' value='true' migratable='yes'/> + <property name='kvm-no-smi-migration' type='boolean' value='false'/> + <property name='monitor' type='boolean' value='false'/> + <property name='avx512er' type='boolean' value='false'/> + <property name='pmm-en' type='boolean' value='false'/> + <property name='pcid' type='boolean' value='true' migratable='yes'/> + <property name='arch-capabilities' type='boolean' value='true' migratable='no'/> + <property name='3dnow' type='boolean' value='false'/> + <property name='erms' type='boolean' value='true' migratable='yes'/> + <property name='lahf-lm' type='boolean' value='true' migratable='yes'/> + <property name='lahf_lm' type='boolean' value='true' migratable='yes'/> + <property name='vpclmulqdq' type='boolean' value='false'/> + <property name='fxsr-opt' type='boolean' value='false'/> + <property name='hv-synic' type='boolean' value='false'/> + <property name='xstore' type='boolean' value='false'/> + <property name='fxsr_opt' type='boolean' value='false'/> + <property name='kvm-hint-dedicated' type='boolean' value='false'/> + <property name='rtm' type='boolean' value='true' migratable='yes'/> + <property name='lmce' type='boolean' value='true' migratable='yes'/> + <property name='hv-time' type='boolean' value='false'/> + <property name='perfctr-nb' type='boolean' value='false'/> + <property name='perfctr_nb' type='boolean' value='false'/> + <property name='ffxsr' type='boolean' value='false'/> + <property name='hv-tlbflush' type='boolean' value='false'/> + <property name='rdrand' type='boolean' value='true' migratable='yes'/> + <property name='rdseed' type='boolean' value='true' migratable='yes'/> + <property name='avx512-4vnniw' type='boolean' value='false'/> + <property name='vmx' type='boolean' value='true' migratable='yes'/> + <property name='vme' type='boolean' value='true' migratable='yes'/> + <property name='dtes64' type='boolean' value='false'/> + <property name='mtrr' type='boolean' value='true' migratable='yes'/> + <property name='rdtscp' type='boolean' value='true' migratable='yes'/> + <property name='pse36' type='boolean' value='true' migratable='yes'/> + <property name='kvm-pv-tlb-flush' type='boolean' value='true' migratable='yes'/> + <property name='tbm' type='boolean' value='false'/> + <property name='wdt' type='boolean' value='false'/> + <property name='pause_filter' type='boolean' value='false'/> + <property name='sha-ni' type='boolean' value='false'/> + <property name='model-id' type='string' value='Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz'/> + <property name='abm' type='boolean' value='true' migratable='yes'/> + <property name='avx512pf' type='boolean' value='false'/> + <property name='xstore-en' type='boolean' value='false'/> + </hostCPU> + <hostCPU type='tcg' model='base' migratability='yes'> + <property name='phys-bits' type='number' value='0'/> + <property name='core-id' type='number' value='-1'/> + <property name='xlevel' type='number' value='2147483658'/> + <property name='cmov' type='boolean' value='true' migratable='yes'/> + <property name='ia64' type='boolean' value='false'/> + <property name='ssb-no' type='boolean' value='false'/> + <property name='aes' type='boolean' value='true' migratable='yes'/> + <property name='mmx' type='boolean' value='true' migratable='yes'/> + <property name='rdpid' type='boolean' value='false'/> + <property name='arat' type='boolean' value='true' migratable='yes'/> + <property name='gfni' type='boolean' value='false'/> + <property name='ibrs-all' type='boolean' value='false'/> + <property name='pause-filter' type='boolean' value='false'/> + <property name='xsavec' type='boolean' value='false'/> + <property name='intel-pt' type='boolean' value='false'/> + <property name='hv-frequencies' type='boolean' value='false'/> + <property name='tsc-frequency' type='number' value='0'/> + <property name='xd' type='boolean' value='true' migratable='yes'/> + <property name='hv-vendor-id' type='string' value=''/> + <property name='kvm-asyncpf' type='boolean' value='false'/> + <property name='kvm_asyncpf' type='boolean' value='false'/> + <property name='perfctr_core' type='boolean' value='false'/> + <property name='perfctr-core' type='boolean' value='false'/> + <property name='mpx' type='boolean' value='true' migratable='yes'/> + <property name='pbe' type='boolean' value='false'/> + <property name='decodeassists' type='boolean' value='false'/> + <property name='avx512cd' type='boolean' value='false'/> + <property name='sse4_1' type='boolean' value='true' migratable='yes'/> + <property name='sse4.1' type='boolean' value='true' migratable='yes'/> + <property name='sse4-1' type='boolean' value='true' migratable='yes'/> + <property name='family' type='number' value='6'/> + <property name='legacy-cache' type='boolean' value='true' migratable='yes'/> + <property name='vmware-cpuid-freq' type='boolean' value='true' migratable='yes'/> + <property name='wbnoinvd' type='boolean' value='false'/> + <property name='avx512f' type='boolean' value='false'/> + <property name='msr' type='boolean' value='true' migratable='yes'/> + <property name='mce' type='boolean' value='true' migratable='yes'/> + <property name='mca' type='boolean' value='true' migratable='yes'/> + <property name='hv-runtime' type='boolean' value='false'/> + <property name='xcrypt' type='boolean' value='false'/> + <property name='thread-id' type='number' value='-1'/> + <property name='min-level' type='number' value='13'/> + <property name='xgetbv1' type='boolean' value='true' migratable='yes'/> + <property name='cid' type='boolean' value='false'/> + <property name='hv-relaxed' type='boolean' value='false'/> + <property name='hv-crash' type='boolean' value='false'/> + <property name='ds' type='boolean' value='false'/> + <property name='fxsr' type='boolean' value='true' migratable='yes'/> + <property name='xsaveopt' type='boolean' value='true' migratable='yes'/> + <property name='xtpr' type='boolean' value='false'/> + <property name='hv-evmcs' type='boolean' value='false'/> + <property name='avx512vl' type='boolean' value='false'/> + <property name='avx512-vpopcntdq' type='boolean' value='false'/> + <property name='phe' type='boolean' value='false'/> + <property name='extapic' type='boolean' value='false'/> + <property name='3dnowprefetch' type='boolean' value='false'/> + <property name='avx512vbmi2' type='boolean' value='false'/> + <property name='cr8legacy' type='boolean' value='true' migratable='yes'/> + <property name='stibp' type='boolean' value='false'/> + <property name='cpuid-0xb' type='boolean' value='true' migratable='yes'/> + <property name='xcrypt-en' type='boolean' value='false'/> + <property name='kvm_pv_eoi' type='boolean' value='false'/> + <property name='apic-id' type='number' value='4294967295'/> + <property name='rsba' type='boolean' value='false'/> + <property name='pn' type='boolean' value='false'/> + <property name='dca' type='boolean' value='false'/> + <property name='vendor' type='string' value='AuthenticAMD'/> + <property name='hv-ipi' type='boolean' value='false'/> + <property name='pku' type='boolean' value='true' migratable='yes'/> + <property name='smx' type='boolean' value='false'/> + <property name='cmp_legacy' type='boolean' value='false'/> + <property name='cmp-legacy' type='boolean' value='false'/> + <property name='node-id' type='number' value='-1'/> + <property name='avx512-4fmaps' type='boolean' value='false'/> + <property name='vmcb_clean' type='boolean' value='false'/> + <property name='vmcb-clean' type='boolean' value='false'/> + <property name='3dnowext' type='boolean' value='true' migratable='yes'/> + <property name='amd-no-ssb' type='boolean' value='false'/> + <property name='hle' type='boolean' value='false'/> + <property name='npt' type='boolean' value='true' migratable='yes'/> + <property name='rdctl-no' type='boolean' value='false'/> + <property name='memory' type='string' value='/machine/unattached/system[0]'/> + <property name='clwb' type='boolean' value='true' migratable='yes'/> + <property name='lbrv' type='boolean' value='false'/> + <property name='adx' type='boolean' value='true' migratable='yes'/> + <property name='ss' type='boolean' value='true' migratable='yes'/> + <property name='pni' type='boolean' value='true' migratable='yes'/> + <property name='svm_lock' type='boolean' value='false'/> + <property name='svm-lock' type='boolean' value='false'/> + <property name='pfthreshold' type='boolean' value='false'/> + <property name='smep' type='boolean' value='true' migratable='yes'/> + <property name='smap' type='boolean' value='true' migratable='yes'/> + <property name='x2apic' type='boolean' value='false'/> + <property name='avx512vbmi' type='boolean' value='false'/> + <property name='avx512vnni' type='boolean' value='false'/> + <property name='hv-stimer' type='boolean' value='false'/> + <property name='x-hv-synic-kvm-only' type='boolean' value='false'/> + <property name='i64' type='boolean' value='true' migratable='yes'/> + <property name='flushbyasid' type='boolean' value='false'/> + <property name='f16c' type='boolean' value='false'/> + <property name='ace2-en' type='boolean' value='false'/> + <property name='pat' type='boolean' value='true' migratable='yes'/> + <property name='pae' type='boolean' value='true' migratable='yes'/> + <property name='sse' type='boolean' value='true' migratable='yes'/> + <property name='phe-en' type='boolean' value='false'/> + <property name='kvm_nopiodelay' type='boolean' value='false'/> + <property name='kvm-nopiodelay' type='boolean' value='false'/> + <property name='tm' type='boolean' value='false'/> + <property name='kvmclock-stable-bit' type='boolean' value='false'/> + <property name='hypervisor' type='boolean' value='true' migratable='yes'/> + <property name='socket-id' type='number' value='-1'/> + <property name='pcommit' type='boolean' value='true' migratable='yes'/> + <property name='syscall' type='boolean' value='true' migratable='yes'/> + <property name='level' type='number' value='13'/> + <property name='avx512dq' type='boolean' value='false'/> + <property name='x-migrate-smi-count' type='boolean' value='true' migratable='yes'/> + <property name='svm' type='boolean' value='true' migratable='yes'/> + <property name='full-cpuid-auto-level' type='boolean' value='true' migratable='yes'/> + <property name='hv-reset' type='boolean' value='false'/> + <property name='invtsc' type='boolean' value='false'/> + <property name='sse3' type='boolean' value='true' migratable='yes'/> + <property name='sse2' type='boolean' value='true' migratable='yes'/> + <property name='ssbd' type='boolean' value='false'/> + <property name='est' type='boolean' value='false'/> + <property name='avx512ifma' type='boolean' value='false'/> + <property name='tm2' type='boolean' value='false'/> + <property name='kvm-pv-ipi' type='boolean' value='false'/> + <property name='kvm-pv-eoi' type='boolean' value='false'/> + <property name='cx8' type='boolean' value='true' migratable='yes'/> + <property name='cldemote' type='boolean' value='false'/> + <property name='hv-reenlightenment' type='boolean' value='false'/> + <property name='kvm_mmu' type='boolean' value='false'/> + <property name='kvm-mmu' type='boolean' value='false'/> + <property name='sse4_2' type='boolean' value='true' migratable='yes'/> + <property name='sse4.2' type='boolean' value='true' migratable='yes'/> + <property name='sse4-2' type='boolean' value='true' migratable='yes'/> + <property name='pge' type='boolean' value='true' migratable='yes'/> + <property name='fill-mtrr-mask' type='boolean' value='true' migratable='yes'/> + <property name='avx512bitalg' type='boolean' value='false'/> + <property name='nodeid_msr' type='boolean' value='false'/> + <property name='pdcm' type='boolean' value='false'/> + <property name='movbe' type='boolean' value='true' migratable='yes'/> + <property name='model' type='number' value='6'/> + <property name='nrip_save' type='boolean' value='false'/> + <property name='nrip-save' type='boolean' value='false'/> + <property name='kvm_pv_unhalt' type='boolean' value='false'/> + <property name='ssse3' type='boolean' value='true' migratable='yes'/> + <property name='sse4a' type='boolean' value='true' migratable='yes'/> + <property name='invpcid' type='boolean' value='false'/> + <property name='pdpe1gb' type='boolean' value='true' migratable='yes'/> + <property name='tsc-deadline' type='boolean' value='false'/> + <property name='skip-l1dfl-vmentry' type='boolean' value='false'/> + <property name='fma' type='boolean' value='false'/> + <property name='cx16' type='boolean' value='true' migratable='yes'/> + <property name='de' type='boolean' value='true' migratable='yes'/> + <property name='pconfig' type='boolean' value='false'/> + <property name='enforce' type='boolean' value='false'/> + <property name='stepping' type='number' value='3'/> + <property name='xsave' type='boolean' value='true' migratable='yes'/> + <property name='clflush' type='boolean' value='true' migratable='yes'/> + <property name='skinit' type='boolean' value='false'/> + <property name='tsc' type='boolean' value='true' migratable='yes'/> + <property name='tce' type='boolean' value='false'/> + <property name='fpu' type='boolean' value='true' migratable='yes'/> + <property name='ibs' type='boolean' value='false'/> + <property name='ds_cpl' type='boolean' value='false'/> + <property name='ds-cpl' type='boolean' value='false'/> + <property name='host-phys-bits' type='boolean' value='false'/> + <property name='fma4' type='boolean' value='false'/> + <property name='la57' type='boolean' value='true' migratable='yes'/> + <property name='osvw' type='boolean' value='false'/> + <property name='check' type='boolean' value='true' migratable='yes'/> + <property name='hv-spinlocks' type='number' value='-1'/> + <property name='pmu' type='boolean' value='false'/> + <property name='pmm' type='boolean' value='false'/> + <property name='apic' type='boolean' value='true' migratable='yes'/> + <property name='spec-ctrl' type='boolean' value='false'/> + <property name='min-xlevel2' type='number' value='0'/> + <property name='tsc-adjust' type='boolean' value='false'/> + <property name='tsc_adjust' type='boolean' value='false'/> + <property name='kvm-steal-time' type='boolean' value='false'/> + <property name='kvm_steal_time' type='boolean' value='false'/> + <property name='kvmclock' type='boolean' value='false'/> + <property name='l3-cache' type='boolean' value='true' migratable='yes'/> + <property name='lwp' type='boolean' value='false'/> + <property name='amd-ssbd' type='boolean' value='false'/> + <property name='ibpb' type='boolean' value='false'/> + <property name='xop' type='boolean' value='false'/> + <property name='avx' type='boolean' value='false'/> + <property name='movdiri' type='boolean' value='false'/> + <property name='ace2' type='boolean' value='false'/> + <property name='avx512bw' type='boolean' value='false'/> + <property name='acpi' type='boolean' value='true' migratable='yes'/> + <property name='hv-vapic' type='boolean' value='false'/> + <property name='fsgsbase' type='boolean' value='true' migratable='yes'/> + <property name='ht' type='boolean' value='false'/> + <property name='nx' type='boolean' value='true' migratable='yes'/> + <property name='pclmulqdq' type='boolean' value='true' migratable='yes'/> + <property name='mmxext' type='boolean' value='true' migratable='yes'/> + <property name='vaes' type='boolean' value='false'/> + <property name='popcnt' type='boolean' value='true' migratable='yes'/> + <property name='xsaves' type='boolean' value='false'/> + <property name='movdir64b' type='boolean' value='false'/> + <property name='tcg-cpuid' type='boolean' value='true' migratable='yes'/> + <property name='lm' type='boolean' value='true' migratable='yes'/> + <property name='umip' type='boolean' value='false'/> + <property name='pse' type='boolean' value='true' migratable='yes'/> + <property name='avx2' type='boolean' value='false'/> + <property name='sep' type='boolean' value='true' migratable='yes'/> + <property name='pclmuldq' type='boolean' value='true' migratable='yes'/> + <property name='virt-ssbd' type='boolean' value='false'/> + <property name='x-hv-max-vps' type='number' value='-1'/> + <property name='nodeid-msr' type='boolean' value='false'/> + <property name='kvm' type='boolean' value='true' migratable='yes'/> + <property name='misalignsse' type='boolean' value='false'/> + <property name='min-xlevel' type='number' value='2147483658'/> + <property name='kvm-pv-unhalt' type='boolean' value='false'/> + <property name='bmi2' type='boolean' value='true' migratable='yes'/> + <property name='bmi1' type='boolean' value='true' migratable='yes'/> + <property name='realized' type='boolean' value='false'/> + <property name='tsc_scale' type='boolean' value='false'/> + <property name='tsc-scale' type='boolean' value='false'/> + <property name='topoext' type='boolean' value='false'/> + <property name='hv-vpindex' type='boolean' value='false'/> + <property name='xlevel2' type='number' value='0'/> + <property name='clflushopt' type='boolean' value='true' migratable='yes'/> + <property name='kvm-no-smi-migration' type='boolean' value='false'/> + <property name='monitor' type='boolean' value='true' migratable='yes'/> + <property name='avx512er' type='boolean' value='false'/> + <property name='pmm-en' type='boolean' value='false'/> + <property name='pcid' type='boolean' value='false'/> + <property name='arch-capabilities' type='boolean' value='false'/> + <property name='3dnow' type='boolean' value='true' migratable='yes'/> + <property name='erms' type='boolean' value='true' migratable='yes'/> + <property name='lahf-lm' type='boolean' value='true' migratable='yes'/> + <property name='lahf_lm' type='boolean' value='true' migratable='yes'/> + <property name='vpclmulqdq' type='boolean' value='false'/> + <property name='fxsr-opt' type='boolean' value='false'/> + <property name='hv-synic' type='boolean' value='false'/> + <property name='xstore' type='boolean' value='false'/> + <property name='fxsr_opt' type='boolean' value='false'/> + <property name='kvm-hint-dedicated' type='boolean' value='false'/> + <property name='rtm' type='boolean' value='false'/> + <property name='lmce' type='boolean' value='false'/> + <property name='hv-time' type='boolean' value='false'/> + <property name='perfctr-nb' type='boolean' value='false'/> + <property name='perfctr_nb' type='boolean' value='false'/> + <property name='ffxsr' type='boolean' value='false'/> + <property name='hv-tlbflush' type='boolean' value='false'/> + <property name='rdrand' type='boolean' value='false'/> + <property name='rdseed' type='boolean' value='false'/> + <property name='avx512-4vnniw' type='boolean' value='false'/> + <property name='vmx' type='boolean' value='false'/> + <property name='vme' type='boolean' value='false'/> + <property name='dtes64' type='boolean' value='false'/> + <property name='mtrr' type='boolean' value='true' migratable='yes'/> + <property name='rdtscp' type='boolean' value='true' migratable='yes'/> + <property name='pse36' type='boolean' value='true' migratable='yes'/> + <property name='kvm-pv-tlb-flush' type='boolean' value='false'/> + <property name='tbm' type='boolean' value='false'/> + <property name='wdt' type='boolean' value='false'/> + <property name='pause_filter' type='boolean' value='false'/> + <property name='sha-ni' type='boolean' value='false'/> + <property name='model-id' type='string' value='QEMU TCG CPU version 2.5+'/> + <property name='abm' type='boolean' value='true' migratable='yes'/> + <property name='avx512pf' type='boolean' value='false'/> + <property name='xstore-en' type='boolean' value='false'/> + </hostCPU> + <cpu type='kvm' name='max' usable='yes'/> + <cpu type='kvm' name='host' usable='yes'/> + <cpu type='kvm' name='base' usable='yes'/> + <cpu type='kvm' name='qemu64' usable='yes'/> + <cpu type='kvm' name='qemu32' usable='yes'/> + <cpu type='kvm' name='phenom' usable='no'> + <blocker name='mmxext'/> + <blocker name='fxsr-opt'/> + <blocker name='3dnowext'/> + <blocker name='3dnow'/> + <blocker name='sse4a'/> + <blocker name='npt'/> + </cpu> + <cpu type='kvm' name='pentium3' usable='yes'/> + <cpu type='kvm' name='pentium2' usable='yes'/> + <cpu type='kvm' name='pentium' usable='yes'/> + <cpu type='kvm' name='n270' usable='yes'/> + <cpu type='kvm' name='kvm64' usable='yes'/> + <cpu type='kvm' name='kvm32' usable='yes'/> + <cpu type='kvm' name='coreduo' usable='yes'/> + <cpu type='kvm' name='core2duo' usable='yes'/> + <cpu type='kvm' name='athlon' usable='no'> + <blocker name='mmxext'/> + <blocker name='3dnowext'/> + <blocker name='3dnow'/> + </cpu> + <cpu type='kvm' name='Westmere-IBRS' usable='yes'/> + <cpu type='kvm' name='Westmere' usable='yes'/> + <cpu type='kvm' name='Skylake-Server-IBRS' usable='no'> + <blocker name='avx512f'/> + <blocker name='avx512dq'/> + <blocker name='clwb'/> + <blocker name='avx512cd'/> + <blocker name='avx512bw'/> + <blocker name='avx512vl'/> + <blocker name='pku'/> + <blocker name='avx512f'/> + <blocker name='avx512f'/> + <blocker name='avx512f'/> + <blocker name='pku'/> + </cpu> + <cpu type='kvm' name='Skylake-Server' usable='no'> + <blocker name='avx512f'/> + <blocker name='avx512dq'/> + <blocker name='clwb'/> + <blocker name='avx512cd'/> + <blocker name='avx512bw'/> + <blocker name='avx512vl'/> + <blocker name='pku'/> + <blocker name='avx512f'/> + <blocker name='avx512f'/> + <blocker name='avx512f'/> + <blocker name='pku'/> + </cpu> + <cpu type='kvm' name='Skylake-Client-IBRS' usable='yes'/> + <cpu type='kvm' name='Skylake-Client' usable='yes'/> + <cpu type='kvm' name='SandyBridge-IBRS' usable='yes'/> + <cpu type='kvm' name='SandyBridge' usable='yes'/> + <cpu type='kvm' name='Penryn' usable='yes'/> + <cpu type='kvm' name='Opteron_G5' usable='no'> + <blocker name='sse4a'/> + <blocker name='misalignsse'/> + <blocker name='xop'/> + <blocker name='fma4'/> + <blocker name='tbm'/> + </cpu> + <cpu type='kvm' name='Opteron_G4' usable='no'> + <blocker name='sse4a'/> + <blocker name='misalignsse'/> + <blocker name='xop'/> + <blocker name='fma4'/> + </cpu> + <cpu type='kvm' name='Opteron_G3' usable='no'> + <blocker name='sse4a'/> + <blocker name='misalignsse'/> + </cpu> + <cpu type='kvm' name='Opteron_G2' usable='yes'/> + <cpu type='kvm' name='Opteron_G1' usable='yes'/> + <cpu type='kvm' name='Nehalem-IBRS' usable='yes'/> + <cpu type='kvm' name='Nehalem' usable='yes'/> + <cpu type='kvm' name='KnightsMill' usable='no'> + <blocker name='avx512f'/> + <blocker name='avx512pf'/> + <blocker name='avx512er'/> + <blocker name='avx512cd'/> + <blocker name='avx512-vpopcntdq'/> + <blocker name='avx512-4vnniw'/> + <blocker name='avx512-4fmaps'/> + <blocker name='avx512f'/> + <blocker name='avx512f'/> + <blocker name='avx512f'/> + </cpu> + <cpu type='kvm' name='IvyBridge-IBRS' usable='yes'/> + <cpu type='kvm' name='IvyBridge' usable='yes'/> + <cpu type='kvm' name='Icelake-Server' usable='no'> + <blocker name='avx512f'/> + <blocker name='avx512dq'/> + <blocker name='clwb'/> + <blocker name='intel-pt'/> + <blocker name='avx512cd'/> + <blocker name='avx512bw'/> + <blocker name='avx512vl'/> + <blocker name='avx512vbmi'/> + <blocker name='pku'/> + <blocker name=''/> + <blocker name='avx512vbmi2'/> + <blocker name='gfni'/> + <blocker name='vaes'/> + <blocker name='vpclmulqdq'/> + <blocker name='avx512vnni'/> + <blocker name='avx512bitalg'/> + <blocker name='avx512-vpopcntdq'/> + <blocker name='la57'/> + <blocker name='pconfig'/> + <blocker name='wbnoinvd'/> + <blocker name='avx512f'/> + <blocker name='avx512f'/> + <blocker name='avx512f'/> + <blocker name='pku'/> + </cpu> + <cpu type='kvm' name='Icelake-Client' usable='no'> + <blocker name='intel-pt'/> + <blocker name='avx512vbmi'/> + <blocker name='pku'/> + <blocker name=''/> + <blocker name='avx512vbmi2'/> + <blocker name='gfni'/> + <blocker name='vaes'/> + <blocker name='vpclmulqdq'/> + <blocker name='avx512vnni'/> + <blocker name='avx512bitalg'/> + <blocker name='avx512-vpopcntdq'/> + <blocker name='wbnoinvd'/> + <blocker name='pku'/> + </cpu> + <cpu type='kvm' name='Haswell-noTSX-IBRS' usable='yes'/> + <cpu type='kvm' name='Haswell-noTSX' usable='yes'/> + <cpu type='kvm' name='Haswell-IBRS' usable='yes'/> + <cpu type='kvm' name='Haswell' usable='yes'/> + <cpu type='kvm' name='EPYC-IBPB' usable='no'> + <blocker name='sha-ni'/> + <blocker name='mmxext'/> + <blocker name='fxsr-opt'/> + <blocker name='cr8legacy'/> + <blocker name='sse4a'/> + <blocker name='misalignsse'/> + <blocker name='osvw'/> + <blocker name='ibpb'/> + </cpu> + <cpu type='kvm' name='EPYC' usable='no'> + <blocker name='sha-ni'/> + <blocker name='mmxext'/> + <blocker name='fxsr-opt'/> + <blocker name='cr8legacy'/> + <blocker name='sse4a'/> + <blocker name='misalignsse'/> + <blocker name='osvw'/> + </cpu> + <cpu type='kvm' name='Conroe' usable='yes'/> + <cpu type='kvm' name='Cascadelake-Server' usable='no'> + <blocker name='avx512f'/> + <blocker name='avx512dq'/> + <blocker name='clwb'/> + <blocker name='intel-pt'/> + <blocker name='avx512cd'/> + <blocker name='avx512bw'/> + <blocker name='avx512vl'/> + <blocker name='pku'/> + <blocker name=''/> + <blocker name='avx512vnni'/> + <blocker name='avx512f'/> + <blocker name='avx512f'/> + <blocker name='avx512f'/> + <blocker name='pku'/> + </cpu> + <cpu type='kvm' name='Broadwell-noTSX-IBRS' usable='yes'/> + <cpu type='kvm' name='Broadwell-noTSX' usable='yes'/> + <cpu type='kvm' name='Broadwell-IBRS' usable='yes'/> + <cpu type='kvm' name='Broadwell' usable='yes'/> + <cpu type='kvm' name='486' usable='yes'/> + <cpu type='tcg' name='max' usable='yes'/> + <cpu type='tcg' name='host' usable='no'> + <blocker name='kvm'/> + </cpu> + <cpu type='tcg' name='base' usable='yes'/> + <cpu type='tcg' name='qemu64' usable='yes'/> + <cpu type='tcg' name='qemu32' usable='yes'/> + <cpu type='tcg' name='phenom' usable='no'> + <blocker name='fxsr-opt'/> + </cpu> + <cpu type='tcg' name='pentium3' usable='yes'/> + <cpu type='tcg' name='pentium2' usable='yes'/> + <cpu type='tcg' name='pentium' usable='yes'/> + <cpu type='tcg' name='n270' usable='yes'/> + <cpu type='tcg' name='kvm64' usable='yes'/> + <cpu type='tcg' name='kvm32' usable='yes'/> + <cpu type='tcg' name='coreduo' usable='yes'/> + <cpu type='tcg' name='core2duo' usable='yes'/> + <cpu type='tcg' name='athlon' usable='yes'/> + <cpu type='tcg' name='Westmere-IBRS' usable='no'> + <blocker name='spec-ctrl'/> + </cpu> + <cpu type='tcg' name='Westmere' usable='yes'/> + <cpu type='tcg' name='Skylake-Server-IBRS' usable='no'> + <blocker name='fma'/> + <blocker name='pcid'/> + <blocker name='x2apic'/> + <blocker name='tsc-deadline'/> + <blocker name='avx'/> + <blocker name='f16c'/> + <blocker name='rdrand'/> + <blocker name='hle'/> + <blocker name='avx2'/> + <blocker name='invpcid'/> + <blocker name='rtm'/> + <blocker name='avx512f'/> + <blocker name='avx512dq'/> + <blocker name='rdseed'/> + <blocker name='avx512cd'/> + <blocker name='avx512bw'/> + <blocker name='avx512vl'/> + <blocker name='spec-ctrl'/> + <blocker name='3dnowprefetch'/> + <blocker name='xsavec'/> + </cpu> + <cpu type='tcg' name='Skylake-Server' usable='no'> + <blocker name='fma'/> + <blocker name='pcid'/> + <blocker name='x2apic'/> + <blocker name='tsc-deadline'/> + <blocker name='avx'/> + <blocker name='f16c'/> + <blocker name='rdrand'/> + <blocker name='hle'/> + <blocker name='avx2'/> + <blocker name='invpcid'/> + <blocker name='rtm'/> + <blocker name='avx512f'/> + <blocker name='avx512dq'/> + <blocker name='rdseed'/> + <blocker name='avx512cd'/> + <blocker name='avx512bw'/> + <blocker name='avx512vl'/> + <blocker name='3dnowprefetch'/> + <blocker name='xsavec'/> + </cpu> + <cpu type='tcg' name='Skylake-Client-IBRS' usable='no'> + <blocker name='fma'/> + <blocker name='pcid'/> + <blocker name='x2apic'/> + <blocker name='tsc-deadline'/> + <blocker name='avx'/> + <blocker name='f16c'/> + <blocker name='rdrand'/> + <blocker name='hle'/> + <blocker name='avx2'/> + <blocker name='invpcid'/> + <blocker name='rtm'/> + <blocker name='rdseed'/> + <blocker name='spec-ctrl'/> + <blocker name='3dnowprefetch'/> + <blocker name='xsavec'/> + </cpu> + <cpu type='tcg' name='Skylake-Client' usable='no'> + <blocker name='fma'/> + <blocker name='pcid'/> + <blocker name='x2apic'/> + <blocker name='tsc-deadline'/> + <blocker name='avx'/> + <blocker name='f16c'/> + <blocker name='rdrand'/> + <blocker name='hle'/> + <blocker name='avx2'/> + <blocker name='invpcid'/> + <blocker name='rtm'/> + <blocker name='rdseed'/> + <blocker name='3dnowprefetch'/> + <blocker name='xsavec'/> + </cpu> + <cpu type='tcg' name='SandyBridge-IBRS' usable='no'> + <blocker name='x2apic'/> + <blocker name='tsc-deadline'/> + <blocker name='avx'/> + <blocker name='spec-ctrl'/> + </cpu> + <cpu type='tcg' name='SandyBridge' usable='no'> + <blocker name='x2apic'/> + <blocker name='tsc-deadline'/> + <blocker name='avx'/> + </cpu> + <cpu type='tcg' name='Penryn' usable='yes'/> + <cpu type='tcg' name='Opteron_G5' usable='no'> + <blocker name='fma'/> + <blocker name='avx'/> + <blocker name='f16c'/> + <blocker name='misalignsse'/> + <blocker name='3dnowprefetch'/> + <blocker name='xop'/> + <blocker name='fma4'/> + <blocker name='tbm'/> + </cpu> + <cpu type='tcg' name='Opteron_G4' usable='no'> + <blocker name='avx'/> + <blocker name='misalignsse'/> + <blocker name='3dnowprefetch'/> + <blocker name='xop'/> + <blocker name='fma4'/> + </cpu> + <cpu type='tcg' name='Opteron_G3' usable='no'> + <blocker name='misalignsse'/> + </cpu> + <cpu type='tcg' name='Opteron_G2' usable='yes'/> + <cpu type='tcg' name='Opteron_G1' usable='yes'/> + <cpu type='tcg' name='Nehalem-IBRS' usable='no'> + <blocker name='spec-ctrl'/> + </cpu> + <cpu type='tcg' name='Nehalem' usable='yes'/> + <cpu type='tcg' name='KnightsMill' usable='no'> + <blocker name='fma'/> + <blocker name='x2apic'/> + <blocker name='tsc-deadline'/> + <blocker name='avx'/> + <blocker name='f16c'/> + <blocker name='rdrand'/> + <blocker name='avx2'/> + <blocker name='avx512f'/> + <blocker name='rdseed'/> + <blocker name='avx512pf'/> + <blocker name='avx512er'/> + <blocker name='avx512cd'/> + <blocker name='avx512-vpopcntdq'/> + <blocker name='avx512-4vnniw'/> + <blocker name='avx512-4fmaps'/> + <blocker name='3dnowprefetch'/> + </cpu> + <cpu type='tcg' name='IvyBridge-IBRS' usable='no'> + <blocker name='x2apic'/> + <blocker name='tsc-deadline'/> + <blocker name='avx'/> + <blocker name='f16c'/> + <blocker name='rdrand'/> + <blocker name='spec-ctrl'/> + </cpu> + <cpu type='tcg' name='IvyBridge' usable='no'> + <blocker name='x2apic'/> + <blocker name='tsc-deadline'/> + <blocker name='avx'/> + <blocker name='f16c'/> + <blocker name='rdrand'/> + </cpu> + <cpu type='tcg' name='Icelake-Server' usable='no'> + <blocker name='fma'/> + <blocker name='pcid'/> + <blocker name='x2apic'/> + <blocker name='tsc-deadline'/> + <blocker name='avx'/> + <blocker name='f16c'/> + <blocker name='rdrand'/> + <blocker name='hle'/> + <blocker name='avx2'/> + <blocker name='invpcid'/> + <blocker name='rtm'/> + <blocker name='avx512f'/> + <blocker name='avx512dq'/> + <blocker name='rdseed'/> + <blocker name='intel-pt'/> + <blocker name='avx512cd'/> + <blocker name='avx512bw'/> + <blocker name='avx512vl'/> + <blocker name='avx512vbmi'/> + <blocker name='umip'/> + <blocker name=''/> + <blocker name='avx512vbmi2'/> + <blocker name='gfni'/> + <blocker name='vaes'/> + <blocker name='vpclmulqdq'/> + <blocker name='avx512vnni'/> + <blocker name='avx512bitalg'/> + <blocker name='avx512-vpopcntdq'/> + <blocker name='pconfig'/> + <blocker name='spec-ctrl'/> + <blocker name='ssbd'/> + <blocker name='3dnowprefetch'/> + <blocker name='wbnoinvd'/> + <blocker name='xsavec'/> + </cpu> + <cpu type='tcg' name='Icelake-Client' usable='no'> + <blocker name='fma'/> + <blocker name='pcid'/> + <blocker name='x2apic'/> + <blocker name='tsc-deadline'/> + <blocker name='avx'/> + <blocker name='f16c'/> + <blocker name='rdrand'/> + <blocker name='hle'/> + <blocker name='avx2'/> + <blocker name='invpcid'/> + <blocker name='rtm'/> + <blocker name='rdseed'/> + <blocker name='intel-pt'/> + <blocker name='avx512vbmi'/> + <blocker name='umip'/> + <blocker name=''/> + <blocker name='avx512vbmi2'/> + <blocker name='gfni'/> + <blocker name='vaes'/> + <blocker name='vpclmulqdq'/> + <blocker name='avx512vnni'/> + <blocker name='avx512bitalg'/> + <blocker name='avx512-vpopcntdq'/> + <blocker name='spec-ctrl'/> + <blocker name='ssbd'/> + <blocker name='3dnowprefetch'/> + <blocker name='wbnoinvd'/> + <blocker name='xsavec'/> + </cpu> + <cpu type='tcg' name='Haswell-noTSX-IBRS' usable='no'> + <blocker name='fma'/> + <blocker name='pcid'/> + <blocker name='x2apic'/> + <blocker name='tsc-deadline'/> + <blocker name='avx'/> + <blocker name='f16c'/> + <blocker name='rdrand'/> + <blocker name='avx2'/> + <blocker name='invpcid'/> + <blocker name='spec-ctrl'/> + </cpu> + <cpu type='tcg' name='Haswell-noTSX' usable='no'> + <blocker name='fma'/> + <blocker name='pcid'/> + <blocker name='x2apic'/> + <blocker name='tsc-deadline'/> + <blocker name='avx'/> + <blocker name='f16c'/> + <blocker name='rdrand'/> + <blocker name='avx2'/> + <blocker name='invpcid'/> + </cpu> + <cpu type='tcg' name='Haswell-IBRS' usable='no'> + <blocker name='fma'/> + <blocker name='pcid'/> + <blocker name='x2apic'/> + <blocker name='tsc-deadline'/> + <blocker name='avx'/> + <blocker name='f16c'/> + <blocker name='rdrand'/> + <blocker name='hle'/> + <blocker name='avx2'/> + <blocker name='invpcid'/> + <blocker name='rtm'/> + <blocker name='spec-ctrl'/> + </cpu> + <cpu type='tcg' name='Haswell' usable='no'> + <blocker name='fma'/> + <blocker name='pcid'/> + <blocker name='x2apic'/> + <blocker name='tsc-deadline'/> + <blocker name='avx'/> + <blocker name='f16c'/> + <blocker name='rdrand'/> + <blocker name='hle'/> + <blocker name='avx2'/> + <blocker name='invpcid'/> + <blocker name='rtm'/> + </cpu> + <cpu type='tcg' name='EPYC-IBPB' usable='no'> + <blocker name='fma'/> + <blocker name='avx'/> + <blocker name='f16c'/> + <blocker name='rdrand'/> + <blocker name='avx2'/> + <blocker name='rdseed'/> + <blocker name='sha-ni'/> + <blocker name='fxsr-opt'/> + <blocker name='misalignsse'/> + <blocker name='3dnowprefetch'/> + <blocker name='osvw'/> + <blocker name='topoext'/> + <blocker name='ibpb'/> + <blocker name='xsavec'/> + </cpu> + <cpu type='tcg' name='EPYC' usable='no'> + <blocker name='fma'/> + <blocker name='avx'/> + <blocker name='f16c'/> + <blocker name='rdrand'/> + <blocker name='avx2'/> + <blocker name='rdseed'/> + <blocker name='sha-ni'/> + <blocker name='fxsr-opt'/> + <blocker name='misalignsse'/> + <blocker name='3dnowprefetch'/> + <blocker name='osvw'/> + <blocker name='topoext'/> + <blocker name='xsavec'/> + </cpu> + <cpu type='tcg' name='Conroe' usable='yes'/> + <cpu type='tcg' name='Cascadelake-Server' usable='no'> + <blocker name='fma'/> + <blocker name='pcid'/> + <blocker name='x2apic'/> + <blocker name='tsc-deadline'/> + <blocker name='avx'/> + <blocker name='f16c'/> + <blocker name='rdrand'/> + <blocker name='hle'/> + <blocker name='avx2'/> + <blocker name='invpcid'/> + <blocker name='rtm'/> + <blocker name='avx512f'/> + <blocker name='avx512dq'/> + <blocker name='rdseed'/> + <blocker name='intel-pt'/> + <blocker name='avx512cd'/> + <blocker name='avx512bw'/> + <blocker name='avx512vl'/> + <blocker name=''/> + <blocker name='avx512vnni'/> + <blocker name='spec-ctrl'/> + <blocker name='ssbd'/> + <blocker name='3dnowprefetch'/> + <blocker name='xsavec'/> + </cpu> + <cpu type='tcg' name='Broadwell-noTSX-IBRS' usable='no'> + <blocker name='fma'/> + <blocker name='pcid'/> + <blocker name='x2apic'/> + <blocker name='tsc-deadline'/> + <blocker name='avx'/> + <blocker name='f16c'/> + <blocker name='rdrand'/> + <blocker name='avx2'/> + <blocker name='invpcid'/> + <blocker name='rdseed'/> + <blocker name='spec-ctrl'/> + <blocker name='3dnowprefetch'/> + </cpu> + <cpu type='tcg' name='Broadwell-noTSX' usable='no'> + <blocker name='fma'/> + <blocker name='pcid'/> + <blocker name='x2apic'/> + <blocker name='tsc-deadline'/> + <blocker name='avx'/> + <blocker name='f16c'/> + <blocker name='rdrand'/> + <blocker name='avx2'/> + <blocker name='invpcid'/> + <blocker name='rdseed'/> + <blocker name='3dnowprefetch'/> + </cpu> + <cpu type='tcg' name='Broadwell-IBRS' usable='no'> + <blocker name='fma'/> + <blocker name='pcid'/> + <blocker name='x2apic'/> + <blocker name='tsc-deadline'/> + <blocker name='avx'/> + <blocker name='f16c'/> + <blocker name='rdrand'/> + <blocker name='hle'/> + <blocker name='avx2'/> + <blocker name='invpcid'/> + <blocker name='rtm'/> + <blocker name='rdseed'/> + <blocker name='spec-ctrl'/> + <blocker name='3dnowprefetch'/> + </cpu> + <cpu type='tcg' name='Broadwell' usable='no'> + <blocker name='fma'/> + <blocker name='pcid'/> + <blocker name='x2apic'/> + <blocker name='tsc-deadline'/> + <blocker name='avx'/> + <blocker name='f16c'/> + <blocker name='rdrand'/> + <blocker name='hle'/> + <blocker name='avx2'/> + <blocker name='invpcid'/> + <blocker name='rtm'/> + <blocker name='rdseed'/> + <blocker name='3dnowprefetch'/> + </cpu> + <cpu type='tcg' name='486' usable='yes'/> + <machine name='pc-i440fx-4.0' alias='pc' hotplugCpus='yes' maxCpus='255' default='yes'/> + <machine name='isapc' hotplugCpus='yes' maxCpus='1'/> + <machine name='pc-1.1' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-1.2' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-1.3' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-i440fx-2.8' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-1.0' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-i440fx-2.9' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-i440fx-2.6' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-i440fx-2.7' hotplugCpus='yes' maxCpus='255'/> + <machine name='xenfv' hotplugCpus='yes' maxCpus='128'/> + <machine name='pc-i440fx-2.3' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-i440fx-2.4' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-i440fx-2.5' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-i440fx-2.1' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-i440fx-2.2' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-q35-3.1' hotplugCpus='yes' maxCpus='288'/> + <machine name='pc-i440fx-2.0' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-q35-2.11' hotplugCpus='yes' maxCpus='288'/> + <machine name='pc-q35-2.12' hotplugCpus='yes' maxCpus='288'/> + <machine name='pc-q35-3.0' hotplugCpus='yes' maxCpus='288'/> + <machine name='xenpv' maxCpus='1'/> + <machine name='pc-q35-2.10' hotplugCpus='yes' maxCpus='288'/> + <machine name='pc-i440fx-1.7' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-q35-2.9' hotplugCpus='yes' maxCpus='288'/> + <machine name='pc-0.15' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-i440fx-1.5' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-q35-2.7' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-i440fx-1.6' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-i440fx-2.11' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-q35-2.8' hotplugCpus='yes' maxCpus='288'/> + <machine name='pc-0.13' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-i440fx-2.12' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-0.14' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-i440fx-3.0' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-i440fx-3.1' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-q35-2.4' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-q35-2.5' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-q35-2.6' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-i440fx-1.4' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-i440fx-2.10' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-0.12' hotplugCpus='yes' maxCpus='255'/> + <machine name='pc-q35-4.0' alias='q35' hotplugCpus='yes' maxCpus='288'/> +</qemuCaps> diff --git a/tests/qemucapabilitiestest.c b/tests/qemucapabilitiestest.c index b3a9a4b9fc..00137bb415 100644 --- a/tests/qemucapabilitiestest.c +++ b/tests/qemucapabilitiestest.c @@ -179,6 +179,7 @@ mymain(void) DO_TEST("x86_64", "caps_2.12.0"); DO_TEST("x86_64", "caps_3.0.0"); DO_TEST("x86_64", "caps_3.1.0"); + DO_TEST("x86_64", "caps_4.0.0"); DO_TEST("aarch64", "caps_2.6.0"); DO_TEST("aarch64", "caps_2.10.0"); DO_TEST("aarch64", "caps_2.12.0"); -- 2.20.1

On Sun, 2019-01-13 at 18:12 -0500, Cole Robinson wrote:
The next release of QEMU is going to be 4.0.0. A bit early, but this adds capabilities data for x86_64 from current qemu git 15bede554162dda822cd762c689edb6fa32b6e3b
Signed-off-by: Cole Robinson <crobinso@redhat.com> --- .replies file snipped so mailing list doesn't reject it
That's fine and all, but it would be nice if you still pushed the commit somewhere for people to fetch and test... -- Andrea Bolognani / Red Hat / Virtualization

On 01/15/2019 08:00 AM, Andrea Bolognani wrote:
On Sun, 2019-01-13 at 18:12 -0500, Cole Robinson wrote:
The next release of QEMU is going to be 4.0.0. A bit early, but this adds capabilities data for x86_64 from current qemu git 15bede554162dda822cd762c689edb6fa32b6e3b
Signed-off-by: Cole Robinson <crobinso@redhat.com> --- .replies file snipped so mailing list doesn't reject it
That's fine and all, but it would be nice if you still pushed the commit somewhere for people to fetch and test...
Doh, patches published here: https://github.com/crobinso/libvirt/tree/virtio Thanks, Cole

Signed-off-by: Cole Robinson <crobinso@redhat.com> --- tests/qemuxml2xmltest.c | 57 ++++++++++++++++++++++++++++++----------- 1 file changed, 42 insertions(+), 15 deletions(-) diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 82e2c0ee0f..b686a585e8 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -117,10 +117,10 @@ testInfoClear(struct testInfo *info) static int testInfoSetCommon(struct testInfo *info, - int gic) + int gic, + virQEMUCapsPtr qemuCaps) { - if (!(info->qemuCaps = virQEMUCapsNew())) - goto error; + info->qemuCaps = qemuCaps; if (testQemuCapsSetGIC(info->qemuCaps, gic) < 0) goto error; @@ -140,9 +140,10 @@ static int testInfoSet(struct testInfo *info, const char *name, int when, - int gic) + int gic, + virQEMUCapsPtr qemuCaps) { - if (testInfoSetCommon(info, gic) < 0) + if (testInfoSetCommon(info, gic, qemuCaps) < 0) return -1; if (virAsprintf(&info->inName, "%s/qemuxml2argvdata/%s.xml", @@ -194,9 +195,10 @@ static const char *statusPath = abs_srcdir "/qemustatusxml2xmldata/"; static int testInfoSetStatus(struct testInfo *info, const char *name, - int gic) + int gic, + virQEMUCapsPtr qemuCaps) { - if (testInfoSetCommon(info, gic) < 0) + if (testInfoSetCommon(info, gic, qemuCaps) < 0) return -1; if (virAsprintf(&info->inName, "%s%s-in.xml", statusPath, name) < 0 || @@ -220,6 +222,7 @@ mymain(void) char *fakerootdir; struct testInfo info; virQEMUDriverConfigPtr cfg = NULL; + virQEMUCapsPtr qemuCaps = NULL; if (VIR_STRDUP_QUIET(fakerootdir, FAKEROOTDIRTEMPLATE) < 0) { fprintf(stderr, "Out of memory\n"); @@ -240,14 +243,8 @@ mymain(void) cfg = virQEMUDriverGetConfig(&driver); -# define DO_TEST_FULL(name, when, gic, ...) \ +# define DO_TEST_RUN(name, info) \ do { \ - if (testInfoSet(&info, name, when, gic) < 0) { \ - VIR_TEST_DEBUG("Failed to generate test data for '%s'", name); \ - return -1; \ - } \ - virQEMUCapsSetList(info.qemuCaps, __VA_ARGS__, QEMU_CAPS_LAST); \ - \ if (info.outInactiveName) { \ if (virTestRun("QEMU XML-2-XML-inactive " name, \ testXML2XMLInactive, &info) < 0) \ @@ -262,6 +259,34 @@ mymain(void) testInfoClear(&info); \ } while (0) +# define DO_TEST_FULL(name, when, gic, ...) \ + do { \ + if (!(qemuCaps = virQEMUCapsNew())) \ + return -1; \ + if (testInfoSet(&info, name, when, gic, qemuCaps) < 0) { \ + VIR_TEST_DEBUG("Failed to generate test data for '%s'", name); \ + return -1; \ + } \ + virQEMUCapsSetList(info.qemuCaps, __VA_ARGS__, QEMU_CAPS_LAST); \ + DO_TEST_RUN(name, info); \ + } while (0) + +# define TEST_CAPS_PATH abs_srcdir "/qemucapabilitiesdata/caps_" + +# define DO_TEST_CAPS(name, arch, ver) \ + do { \ + if (!(qemuCaps = qemuTestParseCapabilitiesArch(virArchFromString(arch), \ + TEST_CAPS_PATH ver "." arch ".xml"))) { \ + printf("bad\n"); \ + return -1; \ + } \ + if (testInfoSet(&info, name, WHEN_BOTH, GIC_NONE, qemuCaps) < 0) { \ + VIR_TEST_DEBUG("Failed to generate test data for '%s'", name); \ + return -1; \ + } \ + DO_TEST_RUN(name, info); \ + } while (0) + # define NONE QEMU_CAPS_LAST # define DO_TEST(name, ...) \ @@ -1233,7 +1258,9 @@ mymain(void) # define DO_TEST_STATUS(name) \ do { \ - if (testInfoSetStatus(&info, name, GIC_NONE) < 0) { \ + if (!(qemuCaps = virQEMUCapsNew())) \ + return -1; \ + if (testInfoSetStatus(&info, name, GIC_NONE, qemuCaps) < 0) { \ VIR_TEST_DEBUG("Failed to generate status test data for '%s'", name); \ return -1; \ } \ -- 2.20.1

On Sun, 2019-01-13 at 18:12 -0500, Cole Robinson wrote: [...]
+# define DO_TEST_CAPS(name, arch, ver) \
This is called DO_TEST_CAPS_ARCH_VER() in xml2argv, and we shouldn't deviate from that unless we have a very compelling reason to do so. Ideally, you'd implement DO_TEST_CAPS_LATEST() instead, by lifting all common bits from xml2argv and moving them into testutilsqemu, but I understand if you don't want to spend your time doing that.
+ do { \ + if (!(qemuCaps = qemuTestParseCapabilitiesArch(virArchFromString(arch), \ + TEST_CAPS_PATH ver "." arch ".xml"))) { \ + printf("bad\n"); \
Bad leftover code, bad! :P Looks reasonable otherwise, at least from a quick look. -- Andrea Bolognani / Red Hat / Virtualization

<disk> devices lack the model= attribute which is used by most other device types. bus= mostly acts as one, but it serves other purposes too like determing what target= prefix to use, and for matching against controller type= values. Extending bus= to handle additional virtio transitional devices will complicate apps lives, and it isn't a clean mapping anyways. So let's bite the bullet and add a new <disk model=X/> attribute, and wire up common handling for virtio-{non-}transitional Signed-off-by: Cole Robinson <crobinso@redhat.com> --- docs/formatdomain.html.in | 8 ++++ docs/schemas/domaincommon.rng | 8 ++++ src/conf/domain_conf.c | 28 +++++++++++++ src/conf/domain_conf.h | 10 +++++ src/libvirt_private.syms | 2 + ...virtio-non-transitional.x86_64-latest.args | 34 +++++++++++++++ .../virtio-non-transitional.xml | 26 ++++++++++++ .../virtio-transitional.x86_64-latest.args | 34 +++++++++++++++ .../qemuxml2argvdata/virtio-transitional.xml | 26 ++++++++++++ tests/qemuxml2argvtest.c | 3 ++ .../virtio-non-transitional.xml | 42 +++++++++++++++++++ .../virtio-transitional.xml | 42 +++++++++++++++++++ tests/qemuxml2xmltest.c | 3 ++ 13 files changed, 266 insertions(+) create mode 100644 tests/qemuxml2argvdata/virtio-non-transitional.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/virtio-non-transitional.xml create mode 100644 tests/qemuxml2argvdata/virtio-transitional.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/virtio-transitional.xml create mode 100644 tests/qemuxml2xmloutdata/virtio-non-transitional.xml create mode 100644 tests/qemuxml2xmloutdata/virtio-transitional.xml diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 7f07bb7f55..5220e19417 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -2922,6 +2922,14 @@ <span class="since">Since 0.1.4</span> </p> </dd> + <dt><code>model</code></dt> + <dd> + Indicates the emulated device model of the disk. Typically + this is indicated solely by the <code>bus</code> property but + for <code>bus</code> "virtio" the model can be specified further + with "virtio-transitional" or "virtio-non-transitional" + <span class="since">Since 5.1.0</span> + </dd> <dt><code>rawio</code></dt> <dd> Indicates whether the disk needs rawio capability. Valid diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index aa50eac424..425d7f851a 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -1506,6 +1506,14 @@ </interleave> </group> </choice> + <optional> + <attribute name="model"> + <choice> + <value>virtio-transitional</value> + <value>virtio-non-transitional</value> + </choice> + </attribute> + </optional> <optional> <ref name="snapshot"/> </optional> diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 222bb8c482..f847fb0487 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -889,6 +889,11 @@ VIR_ENUM_IMPL(virDomainDiskDetectZeroes, VIR_DOMAIN_DISK_DETECT_ZEROES_LAST, "on", "unmap") +VIR_ENUM_IMPL(virDomainDiskModel, VIR_DOMAIN_DISK_MODEL_LAST, + "default", + "virtio-transitional", + "virtio-non-transitional") + VIR_ENUM_IMPL(virDomainDiskMirrorState, VIR_DOMAIN_DISK_MIRROR_STATE_LAST, "none", "yes", @@ -5431,6 +5436,16 @@ virDomainDiskDefValidate(const virDomainDiskDef *disk) return -1; } + if (disk->bus != VIR_DOMAIN_DISK_BUS_VIRTIO && + (disk->model == VIR_DOMAIN_DISK_MODEL_VIRTIO_TRANSITIONAL || + disk->model == VIR_DOMAIN_DISK_MODEL_VIRTIO_NON_TRANSITIONAL)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("disk model '%s' only supported for bus '%s'"), + virDomainDiskModelTypeToString(disk->model), + virDomainDiskBusTypeToString(disk->bus)); + return -1; + } + return 0; } @@ -9518,6 +9533,14 @@ virDomainDiskDefParseXML(virDomainXMLOptionPtr xmlopt, } VIR_FREE(tmp); + if ((tmp = virXMLPropString(node, "model")) && + (def->model = virDomainDiskModelTypeFromString(tmp)) < 0) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("unknown disk model '%s'"), tmp); + goto error; + } + VIR_FREE(tmp); + snapshot = virXMLPropString(node, "snapshot"); rawio = virXMLPropString(node, "rawio"); @@ -24311,6 +24334,11 @@ virDomainDiskDefFormat(virBufferPtr buf, virBufferAsprintf(buf, "<disk type='%s' device='%s'", type, device); + if (def->model) { + virBufferAsprintf(buf, " model='%s'", + virDomainDiskModelTypeToString(def->model)); + } + if (def->rawio) { virBufferAsprintf(buf, " rawio='%s'", virTristateBoolTypeToString(def->rawio)); diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index fae130668f..0c1879da0f 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -567,6 +567,14 @@ typedef enum { VIR_DOMAIN_DISK_DETECT_ZEROES_LAST } virDomainDiskDetectZeroes; +typedef enum { + VIR_DOMAIN_DISK_MODEL_DEFAULT = 0, + VIR_DOMAIN_DISK_MODEL_VIRTIO_TRANSITIONAL, + VIR_DOMAIN_DISK_MODEL_VIRTIO_NON_TRANSITIONAL, + + VIR_DOMAIN_DISK_MODEL_LAST +} virDomainDiskModel; + typedef struct _virDomainBlockIoTuneInfo virDomainBlockIoTuneInfo; struct _virDomainBlockIoTuneInfo { unsigned long long total_bytes_sec; @@ -674,6 +682,7 @@ struct _virDomainDiskDef { int detect_zeroes; /* enum virDomainDiskDetectZeroes */ char *domain_name; /* backend domain name */ unsigned int queues; + int model; /* enum virDomainDiskModel */ virDomainVirtioOptionsPtr virtio; }; @@ -3408,6 +3417,7 @@ VIR_ENUM_DECL(virDomainDeviceSGIO) VIR_ENUM_DECL(virDomainDiskTray) VIR_ENUM_DECL(virDomainDiskDiscard) VIR_ENUM_DECL(virDomainDiskDetectZeroes) +VIR_ENUM_DECL(virDomainDiskModel) VIR_ENUM_DECL(virDomainDiskMirrorState) VIR_ENUM_DECL(virDomainController) VIR_ENUM_DECL(virDomainControllerModelPCI) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index c3d6306809..0d6f054cf2 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -343,6 +343,8 @@ virDomainDiskIoTypeFromString; virDomainDiskIoTypeToString; virDomainDiskMirrorStateTypeFromString; virDomainDiskMirrorStateTypeToString; +virDomainDiskModelTypeFromString; +virDomainDiskModelTypeToString; virDomainDiskPathByName; virDomainDiskRemove; virDomainDiskRemoveByName; diff --git a/tests/qemuxml2argvdata/virtio-non-transitional.x86_64-latest.args b/tests/qemuxml2argvdata/virtio-non-transitional.x86_64-latest.args new file mode 100644 index 0000000000..070b4b8334 --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-non-transitional.x86_64-latest.args @@ -0,0 +1,34 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/home/test \ +USER=test \ +LOGNAME=test \ +QEMU_AUDIO_DRV=none \ +/usr/bin/qemu-system-x86_64 \ +-name guest=QEMUGuest1,debug-threads=on \ +-S \ +-object secret,id=masterKey0,format=raw,\ +file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ +-machine q35,accel=tcg,usb=off,dump-guest-core=off \ +-m 214 \ +-realtime mlock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,fd=1729,server,nowait \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-no-acpi \ +-boot strict=on \ +-device pcie-root-port,port=0x8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,\ +addr=0x1 \ +-device pcie-root-port,port=0x9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \ +-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-virtio-disk0 \ +-device virtio-blk-pci,scsi=off,bus=pci.1,addr=0x0,drive=drive-virtio-disk0,\ +id=virtio-disk0,bootindex=1 \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\ +resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/virtio-non-transitional.xml b/tests/qemuxml2argvdata/virtio-non-transitional.xml new file mode 100644 index 0000000000..2b9b82f473 --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-non-transitional.xml @@ -0,0 +1,26 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219136</memory> + <currentMemory unit='KiB'>219136</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='x86_64' machine='q35'>hvm</type> + <boot dev='hd'/> + </os> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <disk type='block' device='disk' model='virtio-non-transitional'> + <driver name='qemu' type='raw'/> + <source dev='/dev/HostVG/QEMUGuest1'/> + <target dev='vda' bus='virtio'/> + </disk> + <controller type='usb' index='0' model='none'/> + <input type='mouse' bus='ps2'/> + <input type='keyboard' bus='ps2'/> + <memballoon model='none'/> + </devices> +</domain> diff --git a/tests/qemuxml2argvdata/virtio-transitional.x86_64-latest.args b/tests/qemuxml2argvdata/virtio-transitional.x86_64-latest.args new file mode 100644 index 0000000000..070b4b8334 --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-transitional.x86_64-latest.args @@ -0,0 +1,34 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/home/test \ +USER=test \ +LOGNAME=test \ +QEMU_AUDIO_DRV=none \ +/usr/bin/qemu-system-x86_64 \ +-name guest=QEMUGuest1,debug-threads=on \ +-S \ +-object secret,id=masterKey0,format=raw,\ +file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ +-machine q35,accel=tcg,usb=off,dump-guest-core=off \ +-m 214 \ +-realtime mlock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,fd=1729,server,nowait \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-no-acpi \ +-boot strict=on \ +-device pcie-root-port,port=0x8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,\ +addr=0x1 \ +-device pcie-root-port,port=0x9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \ +-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-virtio-disk0 \ +-device virtio-blk-pci,scsi=off,bus=pci.1,addr=0x0,drive=drive-virtio-disk0,\ +id=virtio-disk0,bootindex=1 \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\ +resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/virtio-transitional.xml b/tests/qemuxml2argvdata/virtio-transitional.xml new file mode 100644 index 0000000000..c6b3fca760 --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-transitional.xml @@ -0,0 +1,26 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219136</memory> + <currentMemory unit='KiB'>219136</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='x86_64' machine='q35'>hvm</type> + <boot dev='hd'/> + </os> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <disk type='block' device='disk' model='virtio-transitional'> + <driver name='qemu' type='raw'/> + <source dev='/dev/HostVG/QEMUGuest1'/> + <target dev='vda' bus='virtio'/> + </disk> + <controller type='usb' index='0' model='none'/> + <input type='mouse' bus='ps2'/> + <input type='keyboard' bus='ps2'/> + <memballoon model='none'/> + </devices> +</domain> diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 2cb8860d26..b365b89ae9 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -3068,6 +3068,9 @@ mymain(void) DO_TEST("riscv64-virt", QEMU_CAPS_DEVICE_VIRTIO_MMIO); + DO_TEST_CAPS_LATEST("virtio-transitional"); + DO_TEST_CAPS_LATEST("virtio-non-transitional"); + /* Simple headless guests for various architectures */ DO_TEST_CAPS_ARCH_LATEST("aarch64-virt-headless", "aarch64"); DO_TEST_CAPS_ARCH_LATEST("ppc64-pseries-headless", "ppc64"); diff --git a/tests/qemuxml2xmloutdata/virtio-non-transitional.xml b/tests/qemuxml2xmloutdata/virtio-non-transitional.xml new file mode 100644 index 0000000000..1c00365edf --- /dev/null +++ b/tests/qemuxml2xmloutdata/virtio-non-transitional.xml @@ -0,0 +1,42 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219136</memory> + <currentMemory unit='KiB'>219136</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='x86_64' machine='pc-q35-4.0'>hvm</type> + <boot dev='hd'/> + </os> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu-system-x86_64</emulator> + <disk type='block' device='disk' model='virtio-non-transitional'> + <driver name='qemu' type='raw'/> + <source dev='/dev/HostVG/QEMUGuest1'/> + <target dev='vda' bus='virtio'/> + <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/> + </disk> + <controller type='usb' index='0' model='none'/> + <controller type='sata' index='0'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/> + </controller> + <controller type='pci' index='0' model='pcie-root'/> + <controller type='pci' index='1' model='pcie-root-port'> + <model name='pcie-root-port'/> + <target chassis='1' port='0x8'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0' multifunction='on'/> + </controller> + <controller type='pci' index='2' model='pcie-root-port'> + <model name='pcie-root-port'/> + <target chassis='2' port='0x9'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> + </controller> + <input type='mouse' bus='ps2'/> + <input type='keyboard' bus='ps2'/> + <memballoon model='none'/> + </devices> +</domain> diff --git a/tests/qemuxml2xmloutdata/virtio-transitional.xml b/tests/qemuxml2xmloutdata/virtio-transitional.xml new file mode 100644 index 0000000000..87d8ff4a25 --- /dev/null +++ b/tests/qemuxml2xmloutdata/virtio-transitional.xml @@ -0,0 +1,42 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219136</memory> + <currentMemory unit='KiB'>219136</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='x86_64' machine='pc-q35-4.0'>hvm</type> + <boot dev='hd'/> + </os> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu-system-x86_64</emulator> + <disk type='block' device='disk' model='virtio-transitional'> + <driver name='qemu' type='raw'/> + <source dev='/dev/HostVG/QEMUGuest1'/> + <target dev='vda' bus='virtio'/> + <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/> + </disk> + <controller type='usb' index='0' model='none'/> + <controller type='sata' index='0'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/> + </controller> + <controller type='pci' index='0' model='pcie-root'/> + <controller type='pci' index='1' model='pcie-root-port'> + <model name='pcie-root-port'/> + <target chassis='1' port='0x8'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0' multifunction='on'/> + </controller> + <controller type='pci' index='2' model='pcie-root-port'> + <model name='pcie-root-port'/> + <target chassis='2' port='0x9'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> + </controller> + <input type='mouse' bus='ps2'/> + <input type='keyboard' bus='ps2'/> + <memballoon model='none'/> + </devices> +</domain> diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index b686a585e8..febe3df286 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -1292,6 +1292,9 @@ mymain(void) DO_TEST("riscv64-virt", QEMU_CAPS_DEVICE_VIRTIO_MMIO); + DO_TEST_CAPS("virtio-transitional", "x86_64", "4.0.0"); + DO_TEST_CAPS("virtio-non-transitional", "x86_64", "4.0.0"); + if (getenv("LIBVIRT_SKIP_CLEANUP") == NULL) virFileDeleteTree(fakerootdir); -- 2.20.1

On Sun, Jan 13, 2019 at 06:12:05PM -0500, Cole Robinson wrote:
<disk> devices lack the model= attribute which is used by most other device types. bus= mostly acts as one, but it serves other purposes too like determing what target= prefix to use, and for matching against controller type= values.
Extending bus= to handle additional virtio transitional devices will complicate apps lives, and it isn't a clean mapping anyways. So let's bite the bullet and add a new <disk model=X/> attribute, and wire up common handling for virtio-{non-}transitional
Signed-off-by: Cole Robinson <crobinso@redhat.com> --- docs/formatdomain.html.in | 8 ++++ docs/schemas/domaincommon.rng | 8 ++++ src/conf/domain_conf.c | 28 +++++++++++++ src/conf/domain_conf.h | 10 +++++ src/libvirt_private.syms | 2 + ...virtio-non-transitional.x86_64-latest.args | 34 +++++++++++++++ .../virtio-non-transitional.xml | 26 ++++++++++++ .../virtio-transitional.x86_64-latest.args | 34 +++++++++++++++ .../qemuxml2argvdata/virtio-transitional.xml | 26 ++++++++++++ tests/qemuxml2argvtest.c | 3 ++ .../virtio-non-transitional.xml | 42 +++++++++++++++++++ .../virtio-transitional.xml | 42 +++++++++++++++++++ tests/qemuxml2xmltest.c | 3 ++ 13 files changed, 266 insertions(+) create mode 100644 tests/qemuxml2argvdata/virtio-non-transitional.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/virtio-non-transitional.xml create mode 100644 tests/qemuxml2argvdata/virtio-transitional.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/virtio-transitional.xml create mode 100644 tests/qemuxml2xmloutdata/virtio-non-transitional.xml create mode 100644 tests/qemuxml2xmloutdata/virtio-transitional.xml
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 7f07bb7f55..5220e19417 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -2922,6 +2922,14 @@ <span class="since">Since 0.1.4</span> </p> </dd> + <dt><code>model</code></dt> + <dd> + Indicates the emulated device model of the disk. Typically + this is indicated solely by the <code>bus</code> property but + for <code>bus</code> "virtio" the model can be specified further + with "virtio-transitional" or "virtio-non-transitional" + <span class="since">Since 5.1.0</span>
We should note that this is *only* valid when using a <adress type=pci> because the virtio-*ccw and virtio-*mmio don't support these. In fact I wonder if that's good a reason to call them "virtio-pci-transitional" and "virtio-pci-non-transitional" Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|

On Tue, Jan 15, 2019 at 04:51:39PM +0000, Daniel P. Berrangé wrote:
On Sun, Jan 13, 2019 at 06:12:05PM -0500, Cole Robinson wrote:
<disk> devices lack the model= attribute which is used by most other device types. bus= mostly acts as one, but it serves other purposes too like determing what target= prefix to use, and for matching against controller type= values.
Extending bus= to handle additional virtio transitional devices will complicate apps lives, and it isn't a clean mapping anyways. So let's bite the bullet and add a new <disk model=X/> attribute, and wire up common handling for virtio-{non-}transitional
Signed-off-by: Cole Robinson <crobinso@redhat.com> --- docs/formatdomain.html.in | 8 ++++ docs/schemas/domaincommon.rng | 8 ++++ src/conf/domain_conf.c | 28 +++++++++++++ src/conf/domain_conf.h | 10 +++++ src/libvirt_private.syms | 2 + ...virtio-non-transitional.x86_64-latest.args | 34 +++++++++++++++ .../virtio-non-transitional.xml | 26 ++++++++++++ .../virtio-transitional.x86_64-latest.args | 34 +++++++++++++++ .../qemuxml2argvdata/virtio-transitional.xml | 26 ++++++++++++ tests/qemuxml2argvtest.c | 3 ++ .../virtio-non-transitional.xml | 42 +++++++++++++++++++ .../virtio-transitional.xml | 42 +++++++++++++++++++ tests/qemuxml2xmltest.c | 3 ++ 13 files changed, 266 insertions(+) create mode 100644 tests/qemuxml2argvdata/virtio-non-transitional.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/virtio-non-transitional.xml create mode 100644 tests/qemuxml2argvdata/virtio-transitional.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/virtio-transitional.xml create mode 100644 tests/qemuxml2xmloutdata/virtio-non-transitional.xml create mode 100644 tests/qemuxml2xmloutdata/virtio-transitional.xml
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 7f07bb7f55..5220e19417 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -2922,6 +2922,14 @@ <span class="since">Since 0.1.4</span> </p> </dd> + <dt><code>model</code></dt> + <dd> + Indicates the emulated device model of the disk. Typically + this is indicated solely by the <code>bus</code> property but + for <code>bus</code> "virtio" the model can be specified further + with "virtio-transitional" or "virtio-non-transitional" + <span class="since">Since 5.1.0</span>
We should note that this is *only* valid when using a <adress type=pci> because the virtio-*ccw and virtio-*mmio don't support these.
In fact I wonder if that's good a reason to call them
"virtio-pci-transitional" and "virtio-pci-non-transitional"
The patch 6 made me re-consider whether this is good or not, as for other existing devices we generally auto-add -pci -ccw or -mmio as needed. Perhaps just using documentation is sufficient. Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|

On Sun, 2019-01-13 at 18:12 -0500, Cole Robinson wrote: [...]
@@ -5431,6 +5436,16 @@ virDomainDiskDefValidate(const virDomainDiskDef *disk) return -1; }
+ if (disk->bus != VIR_DOMAIN_DISK_BUS_VIRTIO && + (disk->model == VIR_DOMAIN_DISK_MODEL_VIRTIO_TRANSITIONAL || + disk->model == VIR_DOMAIN_DISK_MODEL_VIRTIO_NON_TRANSITIONAL)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("disk model '%s' only supported for bus '%s'"), + virDomainDiskModelTypeToString(disk->model), + virDomainDiskBusTypeToString(disk->bus));
s/only supported/not supported/ I also wonder if more thorough validation would be a good idea: this only ensures that VIR_DOMAIN_DISK_MODEL_VIRTIO_* can't be used with other bus types, but if later on we add more VIR_DOMAIN_DISK_MODEL_* we won't be protected against those being use with VIR_DOMAIN_DISK_BUS_VIRTIO... [...]
+typedef enum { + VIR_DOMAIN_DISK_MODEL_DEFAULT = 0, + VIR_DOMAIN_DISK_MODEL_VIRTIO_TRANSITIONAL, + VIR_DOMAIN_DISK_MODEL_VIRTIO_NON_TRANSITIONAL, + + VIR_DOMAIN_DISK_MODEL_LAST +} virDomainDiskModel;
I think we want to have VIR_DOMAIN_DISK_MODEL_VIRTIO as well, for consistency's sake if nothing else. For all other devices, model='virtio' will be (or already is) a perfectly valid configuration, so not accepting it for disks would violate the principle of least surprise. [...]
+++ b/tests/qemuxml2argvdata/virtio-non-transitional.xml @@ -0,0 +1,26 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219136</memory> + <currentMemory unit='KiB'>219136</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='x86_64' machine='q35'>hvm</type> + <boot dev='hd'/> + </os> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <disk type='block' device='disk' model='virtio-non-transitional'> + <driver name='qemu' type='raw'/> + <source dev='/dev/HostVG/QEMUGuest1'/> + <target dev='vda' bus='virtio'/> + </disk> + <controller type='usb' index='0' model='none'/> + <input type='mouse' bus='ps2'/> + <input type='keyboard' bus='ps2'/> + <memballoon model='none'/> + </devices> +</domain>
You can strip this file further by removing the <currentMemory>, <os><boot>, <clock>, <on_*> and <input> elements at least. -- Andrea Bolognani / Red Hat / Virtualization

Add new <disk> model values for virtio transitional devices. When combined with bus='virtio': * "virtio-transitional" maps to qemu "virtio-blk-pci-transitional" * "virtio-non-transitional" maps to qemu "virtio-blk-pci-non-transitional" Signed-off-by: Cole Robinson <crobinso@redhat.com> --- src/qemu/qemu_command.c | 31 ++++++++++++++++++- src/qemu/qemu_domain_address.c | 2 ++ ...virtio-non-transitional.x86_64-latest.args | 7 +++-- .../virtio-transitional.x86_64-latest.args | 4 +-- .../virtio-non-transitional.xml | 10 ++++-- 5 files changed, 45 insertions(+), 9 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 822d5f8669..ca6abea227 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -443,6 +443,33 @@ qemuBuildVirtioDevStr(virBufferPtr buf, return 0; } +static int +qemuBuildVirtioTransitional(virBufferPtr buf, + const char *baseName, + virDomainDeviceAddressType type, + bool transitional, + bool nontransitional) +{ + if (qemuBuildVirtioDevStr(buf, baseName, type) < 0) + return -1; + + if (type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI && + (transitional || nontransitional)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("virtio transitional models are not supported " + "for address type=%s"), + virDomainDeviceAddressTypeToString(type)); + return -1; + } + + if (transitional) { + virBufferAddLit(buf, "-transitional"); + } else if (nontransitional) { + virBufferAddLit(buf, "-non-transitional"); + } + return 0; +} + static int qemuBuildVirtioOptionsStr(virBufferPtr buf, @@ -2049,7 +2076,9 @@ qemuBuildDiskDeviceStr(const virDomainDef *def, break; case VIR_DOMAIN_DISK_BUS_VIRTIO: - if (qemuBuildVirtioDevStr(&opt, "virtio-blk", disk->info.type) < 0) + if (qemuBuildVirtioTransitional(&opt, "virtio-blk", disk->info.type, + disk->model == VIR_DOMAIN_DISK_MODEL_VIRTIO_TRANSITIONAL, + disk->model == VIR_DOMAIN_DISK_MODEL_VIRTIO_NON_TRANSITIONAL) < 0) goto error; if (disk->iothread) diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c index bd6c4031e0..1a77b74ad1 100644 --- a/src/qemu/qemu_domain_address.c +++ b/src/qemu/qemu_domain_address.c @@ -723,6 +723,8 @@ qemuDomainDeviceCalculatePCIConnectFlags(virDomainDeviceDefPtr dev, case VIR_DOMAIN_DEVICE_DISK: switch ((virDomainDiskBus) dev->data.disk->bus) { case VIR_DOMAIN_DISK_BUS_VIRTIO: + if (dev->data.disk->model == VIR_DOMAIN_DISK_MODEL_VIRTIO_NON_TRANSITIONAL) + return pciFlags; return virtioFlags; /* only virtio disks use PCI */ case VIR_DOMAIN_DISK_BUS_IDE: diff --git a/tests/qemuxml2argvdata/virtio-non-transitional.x86_64-latest.args b/tests/qemuxml2argvdata/virtio-non-transitional.x86_64-latest.args index 070b4b8334..a8f878c99c 100644 --- a/tests/qemuxml2argvdata/virtio-non-transitional.x86_64-latest.args +++ b/tests/qemuxml2argvdata/virtio-non-transitional.x86_64-latest.args @@ -25,10 +25,11 @@ file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ -boot strict=on \ -device pcie-root-port,port=0x8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,\ addr=0x1 \ --device pcie-root-port,port=0x9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \ +-device pcie-pci-bridge,id=pci.2,bus=pci.1,addr=0x0 \ +-device pcie-root-port,port=0x9,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x1 \ -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-virtio-disk0 \ --device virtio-blk-pci,scsi=off,bus=pci.1,addr=0x0,drive=drive-virtio-disk0,\ -id=virtio-disk0,bootindex=1 \ +-device virtio-blk-pci-non-transitional,scsi=off,bus=pci.2,addr=0x1,\ +drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\ resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/virtio-transitional.x86_64-latest.args b/tests/qemuxml2argvdata/virtio-transitional.x86_64-latest.args index 070b4b8334..7730b177e7 100644 --- a/tests/qemuxml2argvdata/virtio-transitional.x86_64-latest.args +++ b/tests/qemuxml2argvdata/virtio-transitional.x86_64-latest.args @@ -27,8 +27,8 @@ file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ addr=0x1 \ -device pcie-root-port,port=0x9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \ -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-virtio-disk0 \ --device virtio-blk-pci,scsi=off,bus=pci.1,addr=0x0,drive=drive-virtio-disk0,\ -id=virtio-disk0,bootindex=1 \ +-device virtio-blk-pci-transitional,scsi=off,bus=pci.1,addr=0x0,\ +drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\ resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2xmloutdata/virtio-non-transitional.xml b/tests/qemuxml2xmloutdata/virtio-non-transitional.xml index 1c00365edf..a64a84d145 100644 --- a/tests/qemuxml2xmloutdata/virtio-non-transitional.xml +++ b/tests/qemuxml2xmloutdata/virtio-non-transitional.xml @@ -18,7 +18,7 @@ <driver name='qemu' type='raw'/> <source dev='/dev/HostVG/QEMUGuest1'/> <target dev='vda' bus='virtio'/> - <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/> + <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0'/> </disk> <controller type='usb' index='0' model='none'/> <controller type='sata' index='0'> @@ -30,9 +30,13 @@ <target chassis='1' port='0x8'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0' multifunction='on'/> </controller> - <controller type='pci' index='2' model='pcie-root-port'> + <controller type='pci' index='2' model='pcie-to-pci-bridge'> + <model name='pcie-pci-bridge'/> + <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/> + </controller> + <controller type='pci' index='3' model='pcie-root-port'> <model name='pcie-root-port'/> - <target chassis='2' port='0x9'/> + <target chassis='3' port='0x9'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> </controller> <input type='mouse' bus='ps2'/> -- 2.20.1

On Sun, Jan 13, 2019 at 06:12:06PM -0500, Cole Robinson wrote:
Add new <disk> model values for virtio transitional devices. When combined with bus='virtio':
* "virtio-transitional" maps to qemu "virtio-blk-pci-transitional" * "virtio-non-transitional" maps to qemu "virtio-blk-pci-non-transitional"
Signed-off-by: Cole Robinson <crobinso@redhat.com> --- src/qemu/qemu_command.c | 31 ++++++++++++++++++- src/qemu/qemu_domain_address.c | 2 ++ ...virtio-non-transitional.x86_64-latest.args | 7 +++-- .../virtio-transitional.x86_64-latest.args | 4 +-- .../virtio-non-transitional.xml | 10 ++++-- 5 files changed, 45 insertions(+), 9 deletions(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 822d5f8669..ca6abea227 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -443,6 +443,33 @@ qemuBuildVirtioDevStr(virBufferPtr buf, return 0; }
+static int +qemuBuildVirtioTransitional(virBufferPtr buf, + const char *baseName, + virDomainDeviceAddressType type, + bool transitional, + bool nontransitional) +{ + if (qemuBuildVirtioDevStr(buf, baseName, type) < 0) + return -1; + + if (type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI && + (transitional || nontransitional)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("virtio transitional models are not supported " + "for address type=%s"), + virDomainDeviceAddressTypeToString(type)); + return -1; + } + + if (transitional) { + virBufferAddLit(buf, "-transitional"); + } else if (nontransitional) { + virBufferAddLit(buf, "-non-transitional"); + } + return 0;
So this only works on QEMU >= 4.0.0 - earlier versions will fail to start. We can, however, make it work correctly with old QEMU. A transitional device is 100% identical to the existing device types, so we can simply not add the "-transitional" suffix for old QEMU. The only difference is the way libvirt does PCI bus placement of the transitional device - we'd never use PCIe. A non-transitional device is identical to the existing device types, but with disable-legacy=true set. QEMU guarantees this compatibility of the different devices, but only for machine types < pc-i440fx-4.0.0 / pc-q35-4.0.0. So we should none the less make sure we use the modern device names for any QEMU which genuinely supports them. Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|

On Tue, 2019-01-15 at 16:56 +0000, Daniel P. Berrangé wrote:
On Sun, Jan 13, 2019 at 06:12:06PM -0500, Cole Robinson wrote:
Add new <disk> model values for virtio transitional devices. When combined with bus='virtio':
* "virtio-transitional" maps to qemu "virtio-blk-pci-transitional" * "virtio-non-transitional" maps to qemu "virtio-blk-pci-non-transitional"
Signed-off-by: Cole Robinson <crobinso@redhat.com> --- src/qemu/qemu_command.c | 31 ++++++++++++++++++- src/qemu/qemu_domain_address.c | 2 ++ ...virtio-non-transitional.x86_64-latest.args | 7 +++-- .../virtio-transitional.x86_64-latest.args | 4 +-- .../virtio-non-transitional.xml | 10 ++++-- 5 files changed, 45 insertions(+), 9 deletions(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 822d5f8669..ca6abea227 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -443,6 +443,33 @@ qemuBuildVirtioDevStr(virBufferPtr buf, return 0; }
+static int +qemuBuildVirtioTransitional(virBufferPtr buf, + const char *baseName, + virDomainDeviceAddressType type, + bool transitional, + bool nontransitional) +{ + if (qemuBuildVirtioDevStr(buf, baseName, type) < 0) + return -1; + + if (type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI && + (transitional || nontransitional)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("virtio transitional models are not supported " + "for address type=%s"), + virDomainDeviceAddressTypeToString(type)); + return -1; + } + + if (transitional) { + virBufferAddLit(buf, "-transitional"); + } else if (nontransitional) { + virBufferAddLit(buf, "-non-transitional"); + } + return 0;
So this only works on QEMU >= 4.0.0 - earlier versions will fail to start.
We can, however, make it work correctly with old QEMU.
A transitional device is 100% identical to the existing device types, so we can simply not add the "-transitional" suffix for old QEMU. The only difference is the way libvirt does PCI bus placement of the transitional device - we'd never use PCIe.
A non-transitional device is identical to the existing device types, but with disable-legacy=true set.
Again, the relationship between existing and new devices is not quite this straighforward because of the reasons I outlined in https://www.redhat.com/archives/libvir-list/2019-January/msg00514.html But the idea of using disable-{legacy,modern} instead of the new virtio-*-{non,}-transitional devices is one I had already suggested in https://bugzilla.redhat.com/show_bug.cgi?id=1614127 so I'm obviously on board with it :)
QEMU guarantees this compatibility of the different devices, but only for machine types < pc-i440fx-4.0.0 / pc-q35-4.0.0. So we should none the less make sure we use the modern device names for any QEMU which genuinely supports them.
As I already mentioned in the bug report linked above, I'm not quite convinced that's the case, and I don't see why we wouldn't just use the options and basically ignore the QEMU-level devices, as the former approach would work on old QEMU releases as well as recent ones with no drawback I can think of. -- Andrea Bolognani / Red Hat / Virtualization

On Wed, Jan 16, 2019 at 12:31:04PM +0100, Andrea Bolognani wrote:
On Tue, 2019-01-15 at 16:56 +0000, Daniel P. Berrangé wrote:
On Sun, Jan 13, 2019 at 06:12:06PM -0500, Cole Robinson wrote:
Add new <disk> model values for virtio transitional devices. When combined with bus='virtio':
* "virtio-transitional" maps to qemu "virtio-blk-pci-transitional" * "virtio-non-transitional" maps to qemu "virtio-blk-pci-non-transitional"
Signed-off-by: Cole Robinson <crobinso@redhat.com> --- src/qemu/qemu_command.c | 31 ++++++++++++++++++- src/qemu/qemu_domain_address.c | 2 ++ ...virtio-non-transitional.x86_64-latest.args | 7 +++-- .../virtio-transitional.x86_64-latest.args | 4 +-- .../virtio-non-transitional.xml | 10 ++++-- 5 files changed, 45 insertions(+), 9 deletions(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 822d5f8669..ca6abea227 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -443,6 +443,33 @@ qemuBuildVirtioDevStr(virBufferPtr buf, return 0; }
+static int +qemuBuildVirtioTransitional(virBufferPtr buf, + const char *baseName, + virDomainDeviceAddressType type, + bool transitional, + bool nontransitional) +{ + if (qemuBuildVirtioDevStr(buf, baseName, type) < 0) + return -1; + + if (type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI && + (transitional || nontransitional)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("virtio transitional models are not supported " + "for address type=%s"), + virDomainDeviceAddressTypeToString(type)); + return -1; + } + + if (transitional) { + virBufferAddLit(buf, "-transitional"); + } else if (nontransitional) { + virBufferAddLit(buf, "-non-transitional"); + } + return 0;
So this only works on QEMU >= 4.0.0 - earlier versions will fail to start.
We can, however, make it work correctly with old QEMU.
A transitional device is 100% identical to the existing device types, so we can simply not add the "-transitional" suffix for old QEMU. The only difference is the way libvirt does PCI bus placement of the transitional device - we'd never use PCIe.
A non-transitional device is identical to the existing device types, but with disable-legacy=true set.
Again, the relationship between existing and new devices is not quite this straighforward because of the reasons I outlined in
https://www.redhat.com/archives/libvir-list/2019-January/msg00514.html
When told to use virtio-transitional for a device, libvirt would only plug it into a PCI slot, never a PCI-X slot. Given this constraint, it is functionally identical / interchangable with the existing device.
But the idea of using disable-{legacy,modern} instead of the new virtio-*-{non,}-transitional devices is one I had already suggested in
https://bugzilla.redhat.com/show_bug.cgi?id=1614127
so I'm obviously on board with it :)
QEMU guarantees this compatibility of the different devices, but only for machine types < pc-i440fx-4.0.0 / pc-q35-4.0.0. So we should none the less make sure we use the modern device names for any QEMU which genuinely supports them.
As I already mentioned in the bug report linked above, I'm not quite convinced that's the case, and I don't see why we wouldn't just use the options and basically ignore the QEMU-level devices, as the former approach would work on old QEMU releases as well as recent ones with no drawback I can think of.
The QEMU maintainers were against the idea of us doing that. In the future they may add properties to, or change the defaults on, the -transitional or -non-transitional devices only, associated with new machine type versions. If libvirt forever uses the old devices, then we loose ability to take advantage of that. Indeed if QEMU maintainers wanted us to use the disable-legacy/modern features long term, there would be no point in them even adding the new device types in the first place. We should only ever use the disable- flags if the new devices do not exist in QEMU. Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|

On Wed, 2019-01-16 at 11:39 +0000, Daniel P. Berrangé wrote:
On Wed, Jan 16, 2019 at 12:31:04PM +0100, Andrea Bolognani wrote:
On Tue, 2019-01-15 at 16:56 +0000, Daniel P. Berrangé wrote:
A transitional device is 100% identical to the existing device types, so we can simply not add the "-transitional" suffix for old QEMU. The only difference is the way libvirt does PCI bus placement of the transitional device - we'd never use PCIe.
A non-transitional device is identical to the existing device types, but with disable-legacy=true set.
Again, the relationship between existing and new devices is not quite this straighforward because of the reasons I outlined in
https://www.redhat.com/archives/libvir-list/2019-January/msg00514.html
When told to use virtio-transitional for a device, libvirt would only plug it into a PCI slot, never a PCI-X slot. Given this constraint, it is functionally identical / interchangable with the existing device.
Right, but you didn't spell out the constraint the first time around, thus making your (broader) statement that a "transitional device is 100% identical to the existing device" incorrect :)
But the idea of using disable-{legacy,modern} instead of the new virtio-*-{non,}-transitional devices is one I had already suggested in
https://bugzilla.redhat.com/show_bug.cgi?id=1614127
so I'm obviously on board with it :)
QEMU guarantees this compatibility of the different devices, but only for machine types < pc-i440fx-4.0.0 / pc-q35-4.0.0. So we should none the less make sure we use the modern device names for any QEMU which genuinely supports them.
As I already mentioned in the bug report linked above, I'm not quite convinced that's the case, and I don't see why we wouldn't just use the options and basically ignore the QEMU-level devices, as the former approach would work on old QEMU releases as well as recent ones with no drawback I can think of.
The QEMU maintainers were against the idea of us doing that.
I don't recall any QEMU developer specifically saying that, but that might be just a case of my memory sucking :) CC'ing Eduardo so he can weigh in.
In the future they may add properties to, or change the defaults on, the -transitional or -non-transitional devices only, associated with new machine type versions. If libvirt forever uses the old devices, then we loose ability to take advantage of that.
Regardless of what libvirt ends up doing, from the QEMU user point of view I think it would be very surprising if eg. virtio-blk-pci plugged into a PCIe slot behaved differently from virtio-blk-pci-non-transitional plugged into the very same slot, or if virtio-net-pci,disable-legacy=false,disable-modern=false behaved differently from virtio-net-pci-transitional regardless of the slot it's plugged into, so moving away from that consistency should be a non-goal IMHO.
Indeed if QEMU maintainers wanted us to use the disable-legacy/modern features long term, there would be no point in them even adding the new device types in the first place.
Yeah, after commenting on the bug report mentioned above I indeed started thinking that we could have gotten away with not adding those devices. They might still be useful to people running QEMU directly, though.
We should only ever use the disable- flags if the new devices do not exist in QEMU.
Wouldn't that potentially cause issues when migrating from QEMU < 4.0.0, where we'd use disable-*, to QEMU >= 4.0.0, where we'd use *-{,non}transitional instead? I guess not if the changes in device behavior are gated by the machine type version. -- Andrea Bolognani / Red Hat / Virtualization

On Wed, Jan 16, 2019 at 01:29:13PM +0100, Andrea Bolognani wrote:
On Wed, 2019-01-16 at 11:39 +0000, Daniel P. Berrangé wrote:
On Wed, Jan 16, 2019 at 12:31:04PM +0100, Andrea Bolognani wrote:
On Tue, 2019-01-15 at 16:56 +0000, Daniel P. Berrangé wrote:
A transitional device is 100% identical to the existing device types, so we can simply not add the "-transitional" suffix for old QEMU. The only difference is the way libvirt does PCI bus placement of the transitional device - we'd never use PCIe.
A non-transitional device is identical to the existing device types, but with disable-legacy=true set.
Again, the relationship between existing and new devices is not quite this straighforward because of the reasons I outlined in
https://www.redhat.com/archives/libvir-list/2019-January/msg00514.html
When told to use virtio-transitional for a device, libvirt would only plug it into a PCI slot, never a PCI-X slot. Given this constraint, it is functionally identical / interchangable with the existing device.
Right, but you didn't spell out the constraint the first time around, thus making your (broader) statement that a "transitional device is 100% identical to the existing device" incorrect :)
But the idea of using disable-{legacy,modern} instead of the new virtio-*-{non,}-transitional devices is one I had already suggested in
https://bugzilla.redhat.com/show_bug.cgi?id=1614127
so I'm obviously on board with it :)
QEMU guarantees this compatibility of the different devices, but only for machine types < pc-i440fx-4.0.0 / pc-q35-4.0.0. So we should none the less make sure we use the modern device names for any QEMU which genuinely supports them.
As I already mentioned in the bug report linked above, I'm not quite convinced that's the case, and I don't see why we wouldn't just use the options and basically ignore the QEMU-level devices, as the former approach would work on old QEMU releases as well as recent ones with no drawback I can think of.
The QEMU maintainers were against the idea of us doing that.
I don't recall any QEMU developer specifically saying that, but that might be just a case of my memory sucking :) CC'ing Eduardo so he can weigh in.
It was somewhere in one of the many mail threads, but I'm not finding the archive link right now.
In the future they may add properties to, or change the defaults on, the -transitional or -non-transitional devices only, associated with new machine type versions. If libvirt forever uses the old devices, then we loose ability to take advantage of that.
Regardless of what libvirt ends up doing, from the QEMU user point of view I think it would be very surprising if eg. virtio-blk-pci plugged into a PCIe slot behaved differently from virtio-blk-pci-non-transitional plugged into the very same slot, or if virtio-net-pci,disable-legacy=false,disable-modern=false behaved differently from virtio-net-pci-transitional regardless of the slot it's plugged into, so moving away from that consistency should be a non-goal IMHO.
Indeed if QEMU maintainers wanted us to use the disable-legacy/modern features long term, there would be no point in them even adding the new device types in the first place.
Yeah, after commenting on the bug report mentioned above I indeed started thinking that we could have gotten away with not adding those devices. They might still be useful to people running QEMU directly, though.
We should only ever use the disable- flags if the new devices do not exist in QEMU.
Wouldn't that potentially cause issues when migrating from QEMU < 4.0.0, where we'd use disable-*, to QEMU >= 4.0.0, where we'd use *-{,non}transitional instead? I guess not if the changes in device behavior are gated by the machine type version.
In this message Eduardo said virtio-blk-pci,disable-legacy and virtio-blk-pci-non-transitional are only compatible with the pc-4.0 machine types and earlier. There's no compat guarantee of compat for future machine types: https://lists.gnu.org/archive/html/qemu-devel/2018-11/msg03762.html If we didn't use the new QEMU device models right now, we could end up trapped forever. The safe futureproof approach is to always use the new devices models if available, and use disable-legacy for old QEMU versions only, which we know will have old machine types for which the compat guarantee is available. Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|

On Wed, 2019-01-16 at 12:44 +0000, Daniel P. Berrangé wrote:
On Wed, Jan 16, 2019 at 01:29:13PM +0100, Andrea Bolognani wrote:
On Wed, 2019-01-16 at 11:39 +0000, Daniel P. Berrangé wrote:
In the future they may add properties to, or change the defaults on, the -transitional or -non-transitional devices only, associated with new machine type versions. If libvirt forever uses the old devices, then we loose ability to take advantage of that.
Regardless of what libvirt ends up doing, from the QEMU user point of view I think it would be very surprising if eg. virtio-blk-pci plugged into a PCIe slot behaved differently from virtio-blk-pci-non-transitional plugged into the very same slot, or if virtio-net-pci,disable-legacy=false,disable-modern=false behaved differently from virtio-net-pci-transitional regardless of the slot it's plugged into, so moving away from that consistency should be a non-goal IMHO.
[...]
In this message Eduardo said virtio-blk-pci,disable-legacy and virtio-blk-pci-non-transitional are only compatible with the pc-4.0 machine types and earlier. There's no compat guarantee of compat for future machine types:
https://lists.gnu.org/archive/html/qemu-devel/2018-11/msg03762.html
If we didn't use the new QEMU device models right now, we could end up trapped forever. The safe futureproof approach is to always use the new devices models if available, and use disable-legacy for old QEMU versions only, which we know will have old machine types for which the compat guarantee is available.
Well, let's see if Eduardo is willing to reconsider the policy on compatibility between virtio-*-pci-{,non-}transitional and plain virtio-*-pci going forward based on the principle-of-least-surprise rationale outlined above :) -- Andrea Bolognani / Red Hat / Virtualization

On Wed, Jan 16, 2019 at 03:31:49PM +0100, Andrea Bolognani wrote:
On Wed, 2019-01-16 at 12:44 +0000, Daniel P. Berrangé wrote:
On Wed, Jan 16, 2019 at 01:29:13PM +0100, Andrea Bolognani wrote:
On Wed, 2019-01-16 at 11:39 +0000, Daniel P. Berrangé wrote:
In the future they may add properties to, or change the defaults on, the -transitional or -non-transitional devices only, associated with new machine type versions. If libvirt forever uses the old devices, then we loose ability to take advantage of that.
Regardless of what libvirt ends up doing, from the QEMU user point of view I think it would be very surprising if eg. virtio-blk-pci plugged into a PCIe slot behaved differently from virtio-blk-pci-non-transitional plugged into the very same slot, or if virtio-net-pci,disable-legacy=false,disable-modern=false behaved differently from virtio-net-pci-transitional regardless of the slot it's plugged into, so moving away from that consistency should be a non-goal IMHO.
[...]
In this message Eduardo said virtio-blk-pci,disable-legacy and virtio-blk-pci-non-transitional are only compatible with the pc-4.0 machine types and earlier. There's no compat guarantee of compat for future machine types:
https://lists.gnu.org/archive/html/qemu-devel/2018-11/msg03762.html
If we didn't use the new QEMU device models right now, we could end up trapped forever. The safe futureproof approach is to always use the new devices models if available, and use disable-legacy for old QEMU versions only, which we know will have old machine types for which the compat guarantee is available.
Well, let's see if Eduardo is willing to reconsider the policy on compatibility between virtio-*-pci-{,non-}transitional and plain virtio-*-pci going forward based on the principle-of-least-surprise rationale outlined above :)
I think we should use the new devices no matter what. Libvirt generally always strives to follow the latest QEMU best practice, even when new & old way of doing something are functionally identical. Eventually we would drop support for QEU < 4.0 and the old way would go away entirely. Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|

On Wed, Jan 16, 2019 at 02:37:22PM +0000, Daniel P. Berrangé wrote:
On Wed, Jan 16, 2019 at 03:31:49PM +0100, Andrea Bolognani wrote:
On Wed, 2019-01-16 at 12:44 +0000, Daniel P. Berrangé wrote:
On Wed, Jan 16, 2019 at 01:29:13PM +0100, Andrea Bolognani wrote:
On Wed, 2019-01-16 at 11:39 +0000, Daniel P. Berrangé wrote:
In the future they may add properties to, or change the defaults on, the -transitional or -non-transitional devices only, associated with new machine type versions. If libvirt forever uses the old devices, then we loose ability to take advantage of that.
Regardless of what libvirt ends up doing, from the QEMU user point of view I think it would be very surprising if eg. virtio-blk-pci plugged into a PCIe slot behaved differently from virtio-blk-pci-non-transitional plugged into the very same slot, or if virtio-net-pci,disable-legacy=false,disable-modern=false behaved differently from virtio-net-pci-transitional regardless of the slot it's plugged into, so moving away from that consistency should be a non-goal IMHO.
[...]
In this message Eduardo said virtio-blk-pci,disable-legacy and virtio-blk-pci-non-transitional are only compatible with the pc-4.0 machine types and earlier. There's no compat guarantee of compat for future machine types:
https://lists.gnu.org/archive/html/qemu-devel/2018-11/msg03762.html
If we didn't use the new QEMU device models right now, we could end up trapped forever. The safe futureproof approach is to always use the new devices models if available, and use disable-legacy for old QEMU versions only, which we know will have old machine types for which the compat guarantee is available.
Well, let's see if Eduardo is willing to reconsider the policy on compatibility between virtio-*-pci-{,non-}transitional and plain virtio-*-pci going forward based on the principle-of-least-surprise rationale outlined above :)
I think we should use the new devices no matter what. Libvirt generally always strives to follow the latest QEMU best practice, even when new & old way of doing something are functionally identical. Eventually we would drop support for QEU < 4.0 and the old way would go away entirely.
It would also allow us to deprecate the old devices, which would be welcome. Always using the new devices when available would be my recommendation. But I don't want to create unnecessary obstacles for libvirt, so if there's a real benefit in promising compatibility between both device types, we can still promise that on the QEMU side. Breaking compatibility on purpose is very unlikely, and the most likely accidents could be detected by tests/acceptance/virtio_version.py. -- Eduardo

On Wed, Jan 16, 2019 at 12:45:43PM -0200, Eduardo Habkost wrote:
On Wed, Jan 16, 2019 at 02:37:22PM +0000, Daniel P. Berrangé wrote:
On Wed, Jan 16, 2019 at 03:31:49PM +0100, Andrea Bolognani wrote:
On Wed, 2019-01-16 at 12:44 +0000, Daniel P. Berrangé wrote:
On Wed, Jan 16, 2019 at 01:29:13PM +0100, Andrea Bolognani wrote:
On Wed, 2019-01-16 at 11:39 +0000, Daniel P. Berrangé wrote:
In the future they may add properties to, or change the defaults on, the -transitional or -non-transitional devices only, associated with new machine type versions. If libvirt forever uses the old devices, then we loose ability to take advantage of that.
Regardless of what libvirt ends up doing, from the QEMU user point of view I think it would be very surprising if eg. virtio-blk-pci plugged into a PCIe slot behaved differently from virtio-blk-pci-non-transitional plugged into the very same slot, or if virtio-net-pci,disable-legacy=false,disable-modern=false behaved differently from virtio-net-pci-transitional regardless of the slot it's plugged into, so moving away from that consistency should be a non-goal IMHO.
[...]
In this message Eduardo said virtio-blk-pci,disable-legacy and virtio-blk-pci-non-transitional are only compatible with the pc-4.0 machine types and earlier. There's no compat guarantee of compat for future machine types:
https://lists.gnu.org/archive/html/qemu-devel/2018-11/msg03762.html
If we didn't use the new QEMU device models right now, we could end up trapped forever. The safe futureproof approach is to always use the new devices models if available, and use disable-legacy for old QEMU versions only, which we know will have old machine types for which the compat guarantee is available.
Well, let's see if Eduardo is willing to reconsider the policy on compatibility between virtio-*-pci-{,non-}transitional and plain virtio-*-pci going forward based on the principle-of-least-surprise rationale outlined above :)
I think we should use the new devices no matter what. Libvirt generally always strives to follow the latest QEMU best practice, even when new & old way of doing something are functionally identical. Eventually we would drop support for QEU < 4.0 and the old way would go away entirely.
It would also allow us to deprecate the old devices, which would be welcome. Always using the new devices when available would be my recommendation.
I don't really see QEMU upstream deprecating the old devices any time. There is sooooo much documentation that refers to them that will never be fixed. 99% of users won't get any benefit from using the new devices either, so there's no compelling reason to update their existing configs or docs. They're not going to be a huge maint burden to QEMU devs either given its just a toggle of a few props. I might see a downstream distro deprecating them at some point though, since they have a much tighter controlled usage scenario than upstream.
But I don't want to create unnecessary obstacles for libvirt, so if there's a real benefit in promising compatibility between both device types, we can still promise that on the QEMU side.
I don't think there's an obstacle for libvirt, as I don't see any compelling reason to avoid the new devices when we have QEMU >= 4.0.
Breaking compatibility on purpose is very unlikely, and the most likely accidents could be detected by tests/acceptance/virtio_version.py.
Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|

On Wed, 2019-01-16 at 15:40 +0000, Daniel P. Berrangé wrote:
On Wed, Jan 16, 2019 at 12:45:43PM -0200, Eduardo Habkost wrote:
But I don't want to create unnecessary obstacles for libvirt, so if there's a real benefit in promising compatibility between both device types, we can still promise that on the QEMU side.
I don't think there's an obstacle for libvirt, as I don't see any compelling reason to avoid the new devices when we have QEMU >= 4.0.
Alright, let's do it that way then. I still think it's important to maintain the relationship between old and new devices consistent going forward, because not doing so will certainly result in confusion for those using QEMU directly. -- Andrea Bolognani / Red Hat / Virtualization

On Wed, Jan 16, 2019 at 05:24:02PM +0100, Andrea Bolognani wrote:
On Wed, 2019-01-16 at 15:40 +0000, Daniel P. Berrangé wrote:
On Wed, Jan 16, 2019 at 12:45:43PM -0200, Eduardo Habkost wrote:
But I don't want to create unnecessary obstacles for libvirt, so if there's a real benefit in promising compatibility between both device types, we can still promise that on the QEMU side.
I don't think there's an obstacle for libvirt, as I don't see any compelling reason to avoid the new devices when we have QEMU >= 4.0.
Alright, let's do it that way then.
I still think it's important to maintain the relationship between old and new devices consistent going forward, because not doing so will certainly result in confusion for those using QEMU directly.
Agreed that it's a good thing to have. I will extend the existing virtio_version.py test case to be more strict and try to catch mistakes that would break compatibility between the two device types in the future. -- Eduardo

This generates new XML like: <disk> <enum name='model'> <value>virtio-transitional</value> <value>virtio-non-transitional</value> </enum> </disk> Signed-off-by: Cole Robinson <crobinso@redhat.com> --- src/conf/domain_capabilities.c | 1 + src/conf/domain_capabilities.h | 1 + src/qemu/qemu_capabilities.c | 11 ++ src/qemu/qemu_capabilities.h | 2 + .../bhyve_basic.x86_64.xml | 1 + .../bhyve_fbuf.x86_64.xml | 1 + .../bhyve_uefi.x86_64.xml | 1 + tests/domaincapsschemadata/full.xml | 5 + .../domaincapsschemadata/libxl-xenfv-usb.xml | 1 + .../domaincapsschemadata/libxl-xenpv-usb.xml | 1 + .../qemu_1.7.0.x86_64.xml | 1 + .../qemu_2.12.0-virt.aarch64.xml | 1 + .../qemu_2.12.0.ppc64.xml | 1 + .../qemu_2.12.0.s390x.xml | 1 + .../qemu_2.12.0.x86_64.xml | 1 + .../qemu_2.6.0-virt.aarch64.xml | 1 + .../qemu_2.6.0.aarch64.xml | 1 + .../domaincapsschemadata/qemu_2.6.0.ppc64.xml | 1 + .../qemu_2.6.0.x86_64.xml | 1 + .../domaincapsschemadata/qemu_2.7.0.s390x.xml | 1 + .../qemu_2.8.0-tcg.x86_64.xml | 1 + .../domaincapsschemadata/qemu_2.8.0.s390x.xml | 1 + .../qemu_2.8.0.x86_64.xml | 1 + .../qemu_2.9.0-q35.x86_64.xml | 1 + .../qemu_2.9.0-tcg.x86_64.xml | 1 + .../qemu_2.9.0.x86_64.xml | 1 + .../domaincapsschemadata/qemu_3.0.0.s390x.xml | 1 + .../qemu_4.0.0.x86_64.xml | 153 ++++++++++++++++++ tests/domaincapstest.c | 4 + .../caps_4.0.0.x86_64.xml | 2 + 30 files changed, 201 insertions(+) create mode 100644 tests/domaincapsschemadata/qemu_4.0.0.x86_64.xml diff --git a/src/conf/domain_capabilities.c b/src/conf/domain_capabilities.c index ba2b6ba70f..4ed255d328 100644 --- a/src/conf/domain_capabilities.c +++ b/src/conf/domain_capabilities.c @@ -481,6 +481,7 @@ virDomainCapsDeviceDiskFormat(virBufferPtr buf, ENUM_PROCESS(disk, diskDevice, virDomainDiskDeviceTypeToString); ENUM_PROCESS(disk, bus, virDomainDiskBusTypeToString); + ENUM_PROCESS(disk, model, virDomainDiskModelTypeToString); FORMAT_EPILOGUE(disk); } diff --git a/src/conf/domain_capabilities.h b/src/conf/domain_capabilities.h index 15e065359b..4a9a717539 100644 --- a/src/conf/domain_capabilities.h +++ b/src/conf/domain_capabilities.h @@ -65,6 +65,7 @@ struct _virDomainCapsDeviceDisk { bool supported; virDomainCapsEnum diskDevice; /* Info about virDomainDiskDevice enum values */ virDomainCapsEnum bus; /* Info about virDomainDiskBus enum values */ + virDomainCapsEnum model; /* Info about virDomainDiskModel enum values */ /* add new fields here */ }; diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index f504db7d05..24031579cd 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -520,6 +520,8 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST, /* 325 */ "memory-backend-file.pmem", "nvdimm.unarmed", + "virtio-blk-pci-transitional", + "virtio-blk-pci-non-transitional", ); @@ -1108,6 +1110,8 @@ struct virQEMUCapsStringFlags virQEMUCapsObjectTypes[] = { { "vfio-ap", QEMU_CAPS_DEVICE_VFIO_AP }, { "zpci", QEMU_CAPS_DEVICE_ZPCI }, { "memory-backend-memfd", QEMU_CAPS_OBJECT_MEMORY_MEMFD }, + {"virtio-blk-pci-transitional", QEMU_CAPS_DEVICE_VIRTIO_BLK_TRANSITIONAL}, + {"virtio-blk-pci-non-transitional", QEMU_CAPS_DEVICE_VIRTIO_BLK_NON_TRANSITIONAL}, }; static struct virQEMUCapsStringFlags virQEMUCapsDevicePropsVirtioBalloon[] = { @@ -5238,6 +5242,13 @@ virQEMUCapsFillDomainDeviceDiskCaps(virQEMUCapsPtr qemuCaps, if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_ICH9_AHCI)) VIR_DOMAIN_CAPS_ENUM_SET(disk->bus, VIR_DOMAIN_DISK_BUS_SATA); + if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VIRTIO_BLK_TRANSITIONAL)) + VIR_DOMAIN_CAPS_ENUM_SET(disk->model, + VIR_DOMAIN_DISK_MODEL_VIRTIO_TRANSITIONAL); + if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VIRTIO_BLK_NON_TRANSITIONAL)) + VIR_DOMAIN_CAPS_ENUM_SET(disk->model, + VIR_DOMAIN_DISK_MODEL_VIRTIO_NON_TRANSITIONAL); + return 0; } diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index 6d5ed8a3cc..34265d7cc0 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -504,6 +504,8 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */ /* 325 */ QEMU_CAPS_OBJECT_MEMORY_FILE_PMEM, /* -object memory-backend-file,pmem= */ QEMU_CAPS_DEVICE_NVDIMM_UNARMED, /* -device nvdimm,unarmed= */ + QEMU_CAPS_DEVICE_VIRTIO_BLK_TRANSITIONAL, /* -device virtio-blk-pci-transitional */ + QEMU_CAPS_DEVICE_VIRTIO_BLK_NON_TRANSITIONAL, /* -device virtio-blk-pci-non-transitional */ QEMU_CAPS_LAST /* this must always be the last item */ } virQEMUCapsFlags; diff --git a/tests/domaincapsschemadata/bhyve_basic.x86_64.xml b/tests/domaincapsschemadata/bhyve_basic.x86_64.xml index d6ecf061d0..bdf2c4eee8 100644 --- a/tests/domaincapsschemadata/bhyve_basic.x86_64.xml +++ b/tests/domaincapsschemadata/bhyve_basic.x86_64.xml @@ -21,6 +21,7 @@ <value>virtio</value> <value>sata</value> </enum> + <enum name='model'/> </disk> <graphics supported='no'/> <video supported='no'/> diff --git a/tests/domaincapsschemadata/bhyve_fbuf.x86_64.xml b/tests/domaincapsschemadata/bhyve_fbuf.x86_64.xml index 1a5aad7bce..f998c457c1 100644 --- a/tests/domaincapsschemadata/bhyve_fbuf.x86_64.xml +++ b/tests/domaincapsschemadata/bhyve_fbuf.x86_64.xml @@ -30,6 +30,7 @@ <value>virtio</value> <value>sata</value> </enum> + <enum name='model'/> </disk> <graphics supported='yes'> <enum name='type'> diff --git a/tests/domaincapsschemadata/bhyve_uefi.x86_64.xml b/tests/domaincapsschemadata/bhyve_uefi.x86_64.xml index b624fd0799..18f90023d5 100644 --- a/tests/domaincapsschemadata/bhyve_uefi.x86_64.xml +++ b/tests/domaincapsschemadata/bhyve_uefi.x86_64.xml @@ -30,6 +30,7 @@ <value>virtio</value> <value>sata</value> </enum> + <enum name='model'/> </disk> <graphics supported='no'/> <video supported='no'/> diff --git a/tests/domaincapsschemadata/full.xml b/tests/domaincapsschemadata/full.xml index eafba1ae5b..40b3bd6d8d 100644 --- a/tests/domaincapsschemadata/full.xml +++ b/tests/domaincapsschemadata/full.xml @@ -51,6 +51,11 @@ <value>sata</value> <value>sd</value> </enum> + <enum name='model'> + <value>default</value> + <value>virtio-transitional</value> + <value>virtio-non-transitional</value> + </enum> </disk> <graphics supported='yes'> <enum name='type'> diff --git a/tests/domaincapsschemadata/libxl-xenfv-usb.xml b/tests/domaincapsschemadata/libxl-xenfv-usb.xml index 29fe1f9aa3..4efc137c97 100644 --- a/tests/domaincapsschemadata/libxl-xenfv-usb.xml +++ b/tests/domaincapsschemadata/libxl-xenfv-usb.xml @@ -34,6 +34,7 @@ <value>scsi</value> <value>xen</value> </enum> + <enum name='model'/> </disk> <graphics supported='yes'> <enum name='type'> diff --git a/tests/domaincapsschemadata/libxl-xenpv-usb.xml b/tests/domaincapsschemadata/libxl-xenpv-usb.xml index b9f3ca736b..70e598fe9e 100644 --- a/tests/domaincapsschemadata/libxl-xenpv-usb.xml +++ b/tests/domaincapsschemadata/libxl-xenpv-usb.xml @@ -24,6 +24,7 @@ <value>scsi</value> <value>xen</value> </enum> + <enum name='model'/> </disk> <graphics supported='yes'> <enum name='type'> diff --git a/tests/domaincapsschemadata/qemu_1.7.0.x86_64.xml b/tests/domaincapsschemadata/qemu_1.7.0.x86_64.xml index 3d73133919..a26cff6b1d 100644 --- a/tests/domaincapsschemadata/qemu_1.7.0.x86_64.xml +++ b/tests/domaincapsschemadata/qemu_1.7.0.x86_64.xml @@ -68,6 +68,7 @@ <value>usb</value> <value>sata</value> </enum> + <enum name='model'/> </disk> <graphics supported='yes'> <enum name='type'> diff --git a/tests/domaincapsschemadata/qemu_2.12.0-virt.aarch64.xml b/tests/domaincapsschemadata/qemu_2.12.0-virt.aarch64.xml index 56e403c4c7..9dddca6652 100644 --- a/tests/domaincapsschemadata/qemu_2.12.0-virt.aarch64.xml +++ b/tests/domaincapsschemadata/qemu_2.12.0-virt.aarch64.xml @@ -74,6 +74,7 @@ <value>usb</value> <value>sata</value> </enum> + <enum name='model'/> </disk> <graphics supported='yes'> <enum name='type'> diff --git a/tests/domaincapsschemadata/qemu_2.12.0.ppc64.xml b/tests/domaincapsschemadata/qemu_2.12.0.ppc64.xml index d0b9c3fdef..f75655452a 100644 --- a/tests/domaincapsschemadata/qemu_2.12.0.ppc64.xml +++ b/tests/domaincapsschemadata/qemu_2.12.0.ppc64.xml @@ -40,6 +40,7 @@ <value>usb</value> <value>sata</value> </enum> + <enum name='model'/> </disk> <graphics supported='yes'> <enum name='type'> diff --git a/tests/domaincapsschemadata/qemu_2.12.0.s390x.xml b/tests/domaincapsschemadata/qemu_2.12.0.s390x.xml index 8742dce530..891fa89616 100644 --- a/tests/domaincapsschemadata/qemu_2.12.0.s390x.xml +++ b/tests/domaincapsschemadata/qemu_2.12.0.s390x.xml @@ -133,6 +133,7 @@ <value>scsi</value> <value>virtio</value> </enum> + <enum name='model'/> </disk> <graphics supported='yes'> <enum name='type'> diff --git a/tests/domaincapsschemadata/qemu_2.12.0.x86_64.xml b/tests/domaincapsschemadata/qemu_2.12.0.x86_64.xml index a8d6a4d629..3fc54b3d64 100644 --- a/tests/domaincapsschemadata/qemu_2.12.0.x86_64.xml +++ b/tests/domaincapsschemadata/qemu_2.12.0.x86_64.xml @@ -98,6 +98,7 @@ <value>usb</value> <value>sata</value> </enum> + <enum name='model'/> </disk> <graphics supported='yes'> <enum name='type'> diff --git a/tests/domaincapsschemadata/qemu_2.6.0-virt.aarch64.xml b/tests/domaincapsschemadata/qemu_2.6.0-virt.aarch64.xml index b3e85de1d3..88d471258b 100644 --- a/tests/domaincapsschemadata/qemu_2.6.0-virt.aarch64.xml +++ b/tests/domaincapsschemadata/qemu_2.6.0-virt.aarch64.xml @@ -71,6 +71,7 @@ <value>usb</value> <value>sata</value> </enum> + <enum name='model'/> </disk> <graphics supported='yes'> <enum name='type'> diff --git a/tests/domaincapsschemadata/qemu_2.6.0.aarch64.xml b/tests/domaincapsschemadata/qemu_2.6.0.aarch64.xml index 0fcc715940..155fd04c90 100644 --- a/tests/domaincapsschemadata/qemu_2.6.0.aarch64.xml +++ b/tests/domaincapsschemadata/qemu_2.6.0.aarch64.xml @@ -71,6 +71,7 @@ <value>usb</value> <value>sata</value> </enum> + <enum name='model'/> </disk> <graphics supported='yes'> <enum name='type'> diff --git a/tests/domaincapsschemadata/qemu_2.6.0.ppc64.xml b/tests/domaincapsschemadata/qemu_2.6.0.ppc64.xml index f2dff05ff8..0aefab3320 100644 --- a/tests/domaincapsschemadata/qemu_2.6.0.ppc64.xml +++ b/tests/domaincapsschemadata/qemu_2.6.0.ppc64.xml @@ -44,6 +44,7 @@ <value>usb</value> <value>sata</value> </enum> + <enum name='model'/> </disk> <graphics supported='yes'> <enum name='type'> diff --git a/tests/domaincapsschemadata/qemu_2.6.0.x86_64.xml b/tests/domaincapsschemadata/qemu_2.6.0.x86_64.xml index c6d9fd8b37..326772c715 100644 --- a/tests/domaincapsschemadata/qemu_2.6.0.x86_64.xml +++ b/tests/domaincapsschemadata/qemu_2.6.0.x86_64.xml @@ -72,6 +72,7 @@ <value>usb</value> <value>sata</value> </enum> + <enum name='model'/> </disk> <graphics supported='yes'> <enum name='type'> diff --git a/tests/domaincapsschemadata/qemu_2.7.0.s390x.xml b/tests/domaincapsschemadata/qemu_2.7.0.s390x.xml index 0c48bd6c75..c2d741a57f 100644 --- a/tests/domaincapsschemadata/qemu_2.7.0.s390x.xml +++ b/tests/domaincapsschemadata/qemu_2.7.0.s390x.xml @@ -38,6 +38,7 @@ <value>scsi</value> <value>virtio</value> </enum> + <enum name='model'/> </disk> <graphics supported='yes'> <enum name='type'> diff --git a/tests/domaincapsschemadata/qemu_2.8.0-tcg.x86_64.xml b/tests/domaincapsschemadata/qemu_2.8.0-tcg.x86_64.xml index 1cb843d5d1..a67223f422 100644 --- a/tests/domaincapsschemadata/qemu_2.8.0-tcg.x86_64.xml +++ b/tests/domaincapsschemadata/qemu_2.8.0-tcg.x86_64.xml @@ -73,6 +73,7 @@ <value>usb</value> <value>sata</value> </enum> + <enum name='model'/> </disk> <graphics supported='yes'> <enum name='type'> diff --git a/tests/domaincapsschemadata/qemu_2.8.0.s390x.xml b/tests/domaincapsschemadata/qemu_2.8.0.s390x.xml index 7293d89ae7..8e2282d2c6 100644 --- a/tests/domaincapsschemadata/qemu_2.8.0.s390x.xml +++ b/tests/domaincapsschemadata/qemu_2.8.0.s390x.xml @@ -119,6 +119,7 @@ <value>scsi</value> <value>virtio</value> </enum> + <enum name='model'/> </disk> <graphics supported='yes'> <enum name='type'> diff --git a/tests/domaincapsschemadata/qemu_2.8.0.x86_64.xml b/tests/domaincapsschemadata/qemu_2.8.0.x86_64.xml index 8391603a3b..3f6feefc2b 100644 --- a/tests/domaincapsschemadata/qemu_2.8.0.x86_64.xml +++ b/tests/domaincapsschemadata/qemu_2.8.0.x86_64.xml @@ -73,6 +73,7 @@ <value>usb</value> <value>sata</value> </enum> + <enum name='model'/> </disk> <graphics supported='yes'> <enum name='type'> diff --git a/tests/domaincapsschemadata/qemu_2.9.0-q35.x86_64.xml b/tests/domaincapsschemadata/qemu_2.9.0-q35.x86_64.xml index c341de3ce2..81401f9b5c 100644 --- a/tests/domaincapsschemadata/qemu_2.9.0-q35.x86_64.xml +++ b/tests/domaincapsschemadata/qemu_2.9.0-q35.x86_64.xml @@ -81,6 +81,7 @@ <value>usb</value> <value>sata</value> </enum> + <enum name='model'/> </disk> <graphics supported='yes'> <enum name='type'> diff --git a/tests/domaincapsschemadata/qemu_2.9.0-tcg.x86_64.xml b/tests/domaincapsschemadata/qemu_2.9.0-tcg.x86_64.xml index 4336e65dc8..624ccbdb9a 100644 --- a/tests/domaincapsschemadata/qemu_2.9.0-tcg.x86_64.xml +++ b/tests/domaincapsschemadata/qemu_2.9.0-tcg.x86_64.xml @@ -105,6 +105,7 @@ <value>usb</value> <value>sata</value> </enum> + <enum name='model'/> </disk> <graphics supported='yes'> <enum name='type'> diff --git a/tests/domaincapsschemadata/qemu_2.9.0.x86_64.xml b/tests/domaincapsschemadata/qemu_2.9.0.x86_64.xml index 8e842b89fd..5ad54aff81 100644 --- a/tests/domaincapsschemadata/qemu_2.9.0.x86_64.xml +++ b/tests/domaincapsschemadata/qemu_2.9.0.x86_64.xml @@ -82,6 +82,7 @@ <value>usb</value> <value>sata</value> </enum> + <enum name='model'/> </disk> <graphics supported='yes'> <enum name='type'> diff --git a/tests/domaincapsschemadata/qemu_3.0.0.s390x.xml b/tests/domaincapsschemadata/qemu_3.0.0.s390x.xml index 97231e044f..7f5ea8e463 100644 --- a/tests/domaincapsschemadata/qemu_3.0.0.s390x.xml +++ b/tests/domaincapsschemadata/qemu_3.0.0.s390x.xml @@ -139,6 +139,7 @@ <value>scsi</value> <value>virtio</value> </enum> + <enum name='model'/> </disk> <graphics supported='yes'> <enum name='type'> diff --git a/tests/domaincapsschemadata/qemu_4.0.0.x86_64.xml b/tests/domaincapsschemadata/qemu_4.0.0.x86_64.xml new file mode 100644 index 0000000000..38a075aa00 --- /dev/null +++ b/tests/domaincapsschemadata/qemu_4.0.0.x86_64.xml @@ -0,0 +1,153 @@ +<domainCapabilities> + <path>/usr/bin/qemu-system-x86_64</path> + <domain>kvm</domain> + <machine>pc-i440fx-4.0</machine> + <arch>x86_64</arch> + <vcpu max='255'/> + <iothreads supported='yes'/> + <os supported='yes'> + <loader supported='yes'> + <value>/usr/share/AAVMF/AAVMF_CODE.fd</value> + <value>/usr/share/AAVMF/AAVMF32_CODE.fd</value> + <value>/usr/share/OVMF/OVMF_CODE.fd</value> + <enum name='type'> + <value>rom</value> + <value>pflash</value> + </enum> + <enum name='readonly'> + <value>yes</value> + <value>no</value> + </enum> + </loader> + </os> + <cpu> + <mode name='host-passthrough' supported='yes'/> + <mode name='host-model' supported='yes'> + <model fallback='forbid'>Skylake-Client-IBRS</model> + <vendor>Intel</vendor> + <feature policy='require' name='ss'/> + <feature policy='require' name='vmx'/> + <feature policy='require' name='hypervisor'/> + <feature policy='require' name='tsc_adjust'/> + <feature policy='require' name='clflushopt'/> + <feature policy='require' name='umip'/> + <feature policy='require' name='arch-capabilities'/> + <feature policy='require' name='ssbd'/> + <feature policy='require' name='xsaves'/> + <feature policy='require' name='pdpe1gb'/> + <feature policy='require' name='invtsc'/> + </mode> + <mode name='custom' supported='yes'> + <model usable='yes'>qemu64</model> + <model usable='yes'>qemu32</model> + <model usable='no'>phenom</model> + <model usable='yes'>pentium3</model> + <model usable='yes'>pentium2</model> + <model usable='yes'>pentium</model> + <model usable='yes'>n270</model> + <model usable='yes'>kvm64</model> + <model usable='yes'>kvm32</model> + <model usable='yes'>coreduo</model> + <model usable='yes'>core2duo</model> + <model usable='no'>athlon</model> + <model usable='yes'>Westmere-IBRS</model> + <model usable='yes'>Westmere</model> + <model usable='no'>Skylake-Server-IBRS</model> + <model usable='no'>Skylake-Server</model> + <model usable='yes'>Skylake-Client-IBRS</model> + <model usable='yes'>Skylake-Client</model> + <model usable='yes'>SandyBridge-IBRS</model> + <model usable='yes'>SandyBridge</model> + <model usable='yes'>Penryn</model> + <model usable='no'>Opteron_G5</model> + <model usable='no'>Opteron_G4</model> + <model usable='no'>Opteron_G3</model> + <model usable='yes'>Opteron_G2</model> + <model usable='yes'>Opteron_G1</model> + <model usable='yes'>Nehalem-IBRS</model> + <model usable='yes'>Nehalem</model> + <model usable='yes'>IvyBridge-IBRS</model> + <model usable='yes'>IvyBridge</model> + <model usable='no'>Icelake-Server</model> + <model usable='no'>Icelake-Client</model> + <model usable='yes'>Haswell-noTSX-IBRS</model> + <model usable='yes'>Haswell-noTSX</model> + <model usable='yes'>Haswell-IBRS</model> + <model usable='yes'>Haswell</model> + <model usable='no'>EPYC-IBPB</model> + <model usable='no'>EPYC</model> + <model usable='yes'>Conroe</model> + <model usable='yes'>Broadwell-noTSX-IBRS</model> + <model usable='yes'>Broadwell-noTSX</model> + <model usable='yes'>Broadwell-IBRS</model> + <model usable='yes'>Broadwell</model> + <model usable='yes'>486</model> + </mode> + </cpu> + <devices> + <disk supported='yes'> + <enum name='diskDevice'> + <value>disk</value> + <value>cdrom</value> + <value>floppy</value> + <value>lun</value> + </enum> + <enum name='bus'> + <value>ide</value> + <value>fdc</value> + <value>scsi</value> + <value>virtio</value> + <value>usb</value> + <value>sata</value> + </enum> + <enum name='model'> + <value>virtio-transitional</value> + <value>virtio-non-transitional</value> + </enum> + </disk> + <graphics supported='yes'> + <enum name='type'> + <value>sdl</value> + <value>vnc</value> + <value>spice</value> + </enum> + </graphics> + <video supported='yes'> + <enum name='modelType'> + <value>vga</value> + <value>cirrus</value> + <value>vmvga</value> + <value>qxl</value> + <value>virtio</value> + </enum> + </video> + <hostdev supported='yes'> + <enum name='mode'> + <value>subsystem</value> + </enum> + <enum name='startupPolicy'> + <value>default</value> + <value>mandatory</value> + <value>requisite</value> + <value>optional</value> + </enum> + <enum name='subsysType'> + <value>usb</value> + <value>pci</value> + <value>scsi</value> + </enum> + <enum name='capsType'/> + <enum name='pciBackend'> + <value>default</value> + <value>kvm</value> + <value>vfio</value> + </enum> + </hostdev> + </devices> + <features> + <gic supported='no'/> + <vmcoreinfo supported='yes'/> + <genid supported='yes'/> + <sev supported='no'/> + </features> +</domainCapabilities> diff --git a/tests/domaincapstest.c b/tests/domaincapstest.c index 7f52058bad..4ec2dc72b6 100644 --- a/tests/domaincapstest.c +++ b/tests/domaincapstest.c @@ -94,6 +94,7 @@ fillAllCaps(virDomainCapsPtr domCaps) disk->supported = true; SET_ALL_BITS(disk->diskDevice); SET_ALL_BITS(disk->bus); + SET_ALL_BITS(disk->model); graphics->supported = true; SET_ALL_BITS(graphics->type); @@ -502,6 +503,9 @@ mymain(void) "/usr/bin/qemu-system-s390x", NULL, "s390x", VIR_DOMAIN_VIRT_KVM); + DO_TEST_QEMU("4.0.0", "caps_4.0.0", + "/usr/bin/qemu-system-x86_64", NULL, + "x86_64", VIR_DOMAIN_VIRT_KVM); virObjectUnref(cfg); #endif /* WITH_QEMU */ diff --git a/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml index c2db392e83..8cf9083035 100644 --- a/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml @@ -212,6 +212,8 @@ <flag name='memory-backend-file.align'/> <flag name='memory-backend-file.pmem'/> <flag name='nvdimm.unarmed'/> + <flag name='virtio-blk-pci-transitional'/> + <flag name='virtio-blk-pci-non-transitional'/> <version>3001050</version> <kvmVersion>0</kvmVersion> <microcodeVersion>446361</microcodeVersion> -- 2.20.1

On Sun, Jan 13, 2019 at 06:12:07PM -0500, Cole Robinson wrote:
This generates new XML like:
<disk> <enum name='model'> <value>virtio-transitional</value> <value>virtio-non-transitional</value>
Same comment as earlier patch about including -pci in the names.
</enum> </disk>
Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|

Add new <rng> model values for virtio transitional devices * "virtio-transitional" maps to qemu "virtio-rng-pci-transitional" * "virtio-non-transitional" maps to qemu "virtio-rng-pci-non-transitional" Signed-off-by: Cole Robinson <crobinso@redhat.com> --- docs/formatdomain.html.in | 2 ++ docs/schemas/domaincommon.rng | 6 +++++- src/conf/domain_conf.c | 4 +++- src/conf/domain_conf.h | 2 ++ src/qemu/qemu_capabilities.c | 6 ++++++ src/qemu/qemu_capabilities.h | 4 ++++ src/qemu/qemu_command.c | 12 +++++++++--- src/qemu/qemu_domain_address.c | 6 ++++-- tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml | 2 ++ .../virtio-non-transitional.x86_64-latest.args | 2 ++ tests/qemuxml2argvdata/virtio-non-transitional.xml | 3 +++ .../virtio-transitional.x86_64-latest.args | 3 +++ tests/qemuxml2argvdata/virtio-transitional.xml | 3 +++ tests/qemuxml2xmloutdata/virtio-non-transitional.xml | 4 ++++ tests/qemuxml2xmloutdata/virtio-transitional.xml | 9 +++++++++ 15 files changed, 61 insertions(+), 7 deletions(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 5220e19417..5765f31048 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -7966,6 +7966,8 @@ qemu-kvm -net nic,model=? /dev/null </p> <ul> <li>'virtio' - supported by qemu and virtio-rng kernel module</li> + <li>'virtio-transitional' <span class='since'>Since 5.1.0</span></li> + <li>'virtio-non-transitional' <span class='since'>Since 5.1.0</span></li> </ul> </dd> <dt><code>rate</code></dt> diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index 425d7f851a..d247170aeb 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -5442,7 +5442,11 @@ <define name="rng"> <element name="rng"> <attribute name="model"> - <value>virtio</value> + <choice> + <value>virtio</value> + <value>virtio-transitional</value> + <value>virtio-non-transitional</value> + </choice> </attribute> <interleave> <ref name="rng-backend"/> diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index f847fb0487..ec3cb226c1 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -851,7 +851,9 @@ VIR_ENUM_IMPL(virDomainDiskTray, VIR_DOMAIN_DISK_TRAY_LAST, VIR_ENUM_IMPL(virDomainRNGModel, VIR_DOMAIN_RNG_MODEL_LAST, - "virtio"); + "virtio", + "virtio-transitional", + "virtio-non-transitional"); VIR_ENUM_IMPL(virDomainRNGBackend, VIR_DOMAIN_RNG_BACKEND_LAST, diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 0c1879da0f..0b8b49ec30 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -2112,6 +2112,8 @@ struct _virBlkioDevice { typedef enum { VIR_DOMAIN_RNG_MODEL_VIRTIO, + VIR_DOMAIN_RNG_MODEL_VIRTIO_TRANSITIONAL, + VIR_DOMAIN_RNG_MODEL_VIRTIO_NON_TRANSITIONAL, VIR_DOMAIN_RNG_MODEL_LAST } virDomainRNGModel; diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 24031579cd..84e8bc7863 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -522,6 +522,10 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST, "nvdimm.unarmed", "virtio-blk-pci-transitional", "virtio-blk-pci-non-transitional", + "virtio-rng-pci-transitional", + + /* 330 */ + "virtio-rng-pci-non-transitional", ); @@ -1112,6 +1116,8 @@ struct virQEMUCapsStringFlags virQEMUCapsObjectTypes[] = { { "memory-backend-memfd", QEMU_CAPS_OBJECT_MEMORY_MEMFD }, {"virtio-blk-pci-transitional", QEMU_CAPS_DEVICE_VIRTIO_BLK_TRANSITIONAL}, {"virtio-blk-pci-non-transitional", QEMU_CAPS_DEVICE_VIRTIO_BLK_NON_TRANSITIONAL}, + {"virtio-rng-pci-transitional", QEMU_CAPS_DEVICE_VIRTIO_RNG_TRANSITIONAL}, + {"virtio-rng-pci-non-transitional", QEMU_CAPS_DEVICE_VIRTIO_RNG_NON_TRANSITIONAL}, }; static struct virQEMUCapsStringFlags virQEMUCapsDevicePropsVirtioBalloon[] = { diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index 34265d7cc0..86be890beb 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -506,6 +506,10 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */ QEMU_CAPS_DEVICE_NVDIMM_UNARMED, /* -device nvdimm,unarmed= */ QEMU_CAPS_DEVICE_VIRTIO_BLK_TRANSITIONAL, /* -device virtio-blk-pci-transitional */ QEMU_CAPS_DEVICE_VIRTIO_BLK_NON_TRANSITIONAL, /* -device virtio-blk-pci-non-transitional */ + QEMU_CAPS_DEVICE_VIRTIO_RNG_TRANSITIONAL, /* -device virtio-blk-rng-transitional */ + + /* 330 */ + QEMU_CAPS_DEVICE_VIRTIO_RNG_NON_TRANSITIONAL, /* -device virtio-rng-pci-non-transitional */ QEMU_CAPS_LAST /* this must always be the last item */ } virQEMUCapsFlags; diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index ca6abea227..3f6f63f33d 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -5916,8 +5916,12 @@ qemuBuildRNGDevStr(const virDomainDef *def, { virBuffer buf = VIR_BUFFER_INITIALIZER; - if (dev->model != VIR_DOMAIN_RNG_MODEL_VIRTIO || - !virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VIRTIO_RNG)) { + if (!((dev->model == VIR_DOMAIN_RNG_MODEL_VIRTIO && + virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VIRTIO_RNG)) || + (dev->model == VIR_DOMAIN_RNG_MODEL_VIRTIO_TRANSITIONAL && + virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VIRTIO_RNG_TRANSITIONAL)) || + (dev->model == VIR_DOMAIN_RNG_MODEL_VIRTIO_NON_TRANSITIONAL && + virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VIRTIO_RNG_NON_TRANSITIONAL)))) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("this qemu doesn't support RNG device type '%s'"), virDomainRNGModelTypeToString(dev->model)); @@ -5928,7 +5932,9 @@ qemuBuildRNGDevStr(const virDomainDef *def, dev->source.file)) goto error; - if (qemuBuildVirtioDevStr(&buf, "virtio-rng", dev->info.type) < 0) + if (qemuBuildVirtioTransitional(&buf, "virtio-rng", dev->info.type, + dev->model == VIR_DOMAIN_RNG_MODEL_VIRTIO_TRANSITIONAL, + dev->model == VIR_DOMAIN_RNG_MODEL_VIRTIO_NON_TRANSITIONAL) < 0) goto error; virBufferAsprintf(&buf, ",rng=obj%s,id=%s", diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c index 1a77b74ad1..cbf7a0556b 100644 --- a/src/qemu/qemu_domain_address.c +++ b/src/qemu/qemu_domain_address.c @@ -856,7 +856,10 @@ qemuDomainDeviceCalculatePCIConnectFlags(virDomainDeviceDefPtr dev, case VIR_DOMAIN_DEVICE_RNG: switch ((virDomainRNGModel) dev->data.rng->model) { case VIR_DOMAIN_RNG_MODEL_VIRTIO: + case VIR_DOMAIN_RNG_MODEL_VIRTIO_TRANSITIONAL: return virtioFlags; + case VIR_DOMAIN_RNG_MODEL_VIRTIO_NON_TRANSITIONAL: + return pciFlags; case VIR_DOMAIN_RNG_MODEL_LAST: return 0; @@ -2285,8 +2288,7 @@ qemuDomainAssignDevicePCISlots(virDomainDefPtr def, /* VirtIO RNG */ for (i = 0; i < def->nrngs; i++) { - if (def->rngs[i]->model != VIR_DOMAIN_RNG_MODEL_VIRTIO || - !virDeviceInfoPCIAddressIsWanted(&def->rngs[i]->info)) + if (!virDeviceInfoPCIAddressIsWanted(&def->rngs[i]->info)) continue; if (qemuDomainPCIAddressReserveNextAddr(addrs, &def->rngs[i]->info) < 0) diff --git a/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml index 8cf9083035..35cb40c24c 100644 --- a/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml @@ -214,6 +214,8 @@ <flag name='nvdimm.unarmed'/> <flag name='virtio-blk-pci-transitional'/> <flag name='virtio-blk-pci-non-transitional'/> + <flag name='virtio-rng-pci-transitional'/> + <flag name='virtio-rng-pci-non-transitional'/> <version>3001050</version> <kvmVersion>0</kvmVersion> <microcodeVersion>446361</microcodeVersion> diff --git a/tests/qemuxml2argvdata/virtio-non-transitional.x86_64-latest.args b/tests/qemuxml2argvdata/virtio-non-transitional.x86_64-latest.args index a8f878c99c..805b564ee2 100644 --- a/tests/qemuxml2argvdata/virtio-non-transitional.x86_64-latest.args +++ b/tests/qemuxml2argvdata/virtio-non-transitional.x86_64-latest.args @@ -30,6 +30,8 @@ addr=0x1 \ -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-virtio-disk0 \ -device virtio-blk-pci-non-transitional,scsi=off,bus=pci.2,addr=0x1,\ drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \ +-object rng-random,id=objrng0,filename=/dev/urandom \ +-device virtio-rng-pci-non-transitional,rng=objrng0,id=rng0,bus=pci.2,addr=0x2 \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\ resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/virtio-non-transitional.xml b/tests/qemuxml2argvdata/virtio-non-transitional.xml index 2b9b82f473..1d131a6255 100644 --- a/tests/qemuxml2argvdata/virtio-non-transitional.xml +++ b/tests/qemuxml2argvdata/virtio-non-transitional.xml @@ -19,6 +19,9 @@ <target dev='vda' bus='virtio'/> </disk> <controller type='usb' index='0' model='none'/> + <rng model='virtio-non-transitional'> + <backend model='random'>/dev/urandom</backend> + </rng> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <memballoon model='none'/> diff --git a/tests/qemuxml2argvdata/virtio-transitional.x86_64-latest.args b/tests/qemuxml2argvdata/virtio-transitional.x86_64-latest.args index 7730b177e7..803b4042ca 100644 --- a/tests/qemuxml2argvdata/virtio-transitional.x86_64-latest.args +++ b/tests/qemuxml2argvdata/virtio-transitional.x86_64-latest.args @@ -26,9 +26,12 @@ file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ -device pcie-root-port,port=0x8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,\ addr=0x1 \ -device pcie-root-port,port=0x9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \ +-device pcie-root-port,port=0xa,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x2 \ -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-virtio-disk0 \ -device virtio-blk-pci-transitional,scsi=off,bus=pci.1,addr=0x0,\ drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \ +-object rng-random,id=objrng0,filename=/dev/urandom \ +-device virtio-rng-pci-transitional,rng=objrng0,id=rng0,bus=pci.2,addr=0x0 \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\ resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/virtio-transitional.xml b/tests/qemuxml2argvdata/virtio-transitional.xml index c6b3fca760..aca4f9f8fa 100644 --- a/tests/qemuxml2argvdata/virtio-transitional.xml +++ b/tests/qemuxml2argvdata/virtio-transitional.xml @@ -19,6 +19,9 @@ <target dev='vda' bus='virtio'/> </disk> <controller type='usb' index='0' model='none'/> + <rng model='virtio-transitional'> + <backend model='random'>/dev/urandom</backend> + </rng> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <memballoon model='none'/> diff --git a/tests/qemuxml2xmloutdata/virtio-non-transitional.xml b/tests/qemuxml2xmloutdata/virtio-non-transitional.xml index a64a84d145..47ed1a65a6 100644 --- a/tests/qemuxml2xmloutdata/virtio-non-transitional.xml +++ b/tests/qemuxml2xmloutdata/virtio-non-transitional.xml @@ -42,5 +42,9 @@ <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <memballoon model='none'/> + <rng model='virtio-non-transitional'> + <backend model='random'>/dev/urandom</backend> + <address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x0'/> + </rng> </devices> </domain> diff --git a/tests/qemuxml2xmloutdata/virtio-transitional.xml b/tests/qemuxml2xmloutdata/virtio-transitional.xml index 87d8ff4a25..4f84f09ccc 100644 --- a/tests/qemuxml2xmloutdata/virtio-transitional.xml +++ b/tests/qemuxml2xmloutdata/virtio-transitional.xml @@ -35,8 +35,17 @@ <target chassis='2' port='0x9'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> </controller> + <controller type='pci' index='3' model='pcie-root-port'> + <model name='pcie-root-port'/> + <target chassis='3' port='0xa'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> + </controller> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <memballoon model='none'/> + <rng model='virtio-transitional'> + <backend model='random'>/dev/urandom</backend> + <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/> + </rng> </devices> </domain> -- 2.20.1

On Sun, Jan 13, 2019 at 06:12:08PM -0500, Cole Robinson wrote:
Add new <rng> model values for virtio transitional devices
* "virtio-transitional" maps to qemu "virtio-rng-pci-transitional" * "virtio-non-transitional" maps to qemu "virtio-rng-pci-non-transitional"
I wonder if we should include "pci" in the names again to make it clear these are not valid for mmio/ccw ? Then again, when users request "virtio" we currently magically turn that into virtio-XX-pci or virtio-XX-ccw as needed, so from that POV adding 'pci' is redundant. Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|

On Sun, 2019-01-13 at 18:12 -0500, Cole Robinson wrote: [...]
The main RFC bits here are:
* The disk approach. danpb and I briefly discussed on IRC adding new bus= values vs a new model= attribute. We decided model= is the lesser of two evils, since bus= handling in apps is tied with target= generation, so adding new virtio-X bus= values will cause more work for apps. These patches add a <disk model=X/> attribute
This sounds fairly reasonable, but I reserve the right to change my mind after looking at the code and thinking about it a bit more :)
* The XML and naming. Previous discussions seemed to favor adding new model-style values rather than a 'transitional' attribute or similar. So these patches add model='virtio-transitional' and model='virtio-non-transitional'
Yeah, that's what I recall the consensus being.
* The PCI address handling. I just mapped virtio-non-transitional to imply plain PCI addressing. I think that's all we need but I'm not positive so I'd appreciate a review of that approach.
I don't think that's right. Let me fish up a message I wrote a while ago summing up interactions between VirtIO devices and PCI (Express) slots: http://lists.nongnu.org/archive/html/qemu-devel/2018-11/msg03133.html Basically VirtIO 0.9 requires IO space to be available, and 1.0 did away with that requirement because PCI Express, unlike conventional PCI, allows devices *not* to have IO space. So transitional devices, which must work with both 0.9 and 1.0, can depend on IO space being available and as such will only work when plugged into conventional PCI slots, whereas non-transitional devices don't need IO space and can thus be plugged into either conventional PCI and PCI Express slots. Ultimately, then, transitional (rather than non-transitional) devices are the ones that must be forced into conventional PCI slots. -- Andrea Bolognani / Red Hat / Virtualization

On 01/15/2019 08:30 AM, Andrea Bolognani wrote:
On Sun, 2019-01-13 at 18:12 -0500, Cole Robinson wrote: [...]
The main RFC bits here are: ...
* The PCI address handling. I just mapped virtio-non-transitional to imply plain PCI addressing. I think that's all we need but I'm not positive so I'd appreciate a review of that approach.
I don't think that's right. Let me fish up a message I wrote a while ago summing up interactions between VirtIO devices and PCI (Express) slots:
http://lists.nongnu.org/archive/html/qemu-devel/2018-11/msg03133.html
Basically VirtIO 0.9 requires IO space to be available, and 1.0 did away with that requirement because PCI Express, unlike conventional PCI, allows devices *not* to have IO space.
So transitional devices, which must work with both 0.9 and 1.0, can depend on IO space being available and as such will only work when plugged into conventional PCI slots, whereas non-transitional devices don't need IO space and can thus be plugged into either conventional PCI and PCI Express slots.
Ultimately, then, transitional (rather than non-transitional) devices are the ones that must be forced into conventional PCI slots.
Okay thanks for the correction, so that sounds like for NON_TRANSITIONAL we should also be forcing pcieFlags. I've made those changes and updated the branch here: https://github.com/crobinso/libvirt/tree/virtio Thanks, Cole

On Tue, 2019-01-15 at 10:23 -0500, Cole Robinson wrote:
On 01/15/2019 08:30 AM, Andrea Bolognani wrote: [...]
Basically VirtIO 0.9 requires IO space to be available, and 1.0 did away with that requirement because PCI Express, unlike conventional PCI, allows devices *not* to have IO space.
So transitional devices, which must work with both 0.9 and 1.0, can depend on IO space being available and as such will only work when plugged into conventional PCI slots, whereas non-transitional devices don't need IO space and can thus be plugged into either conventional PCI and PCI Express slots.
Ultimately, then, transitional (rather than non-transitional) devices are the ones that must be forced into conventional PCI slots.
Okay thanks for the correction, so that sounds like for NON_TRANSITIONAL we should also be forcing pcieFlags.
Not really. As explained above, non-transitional VirtIO devices work when plugged into both conventional PCI and PCI Express slots, so virtioFlags sounds more appropriate: by using pcieFlags you'd limit non-transitional devices to q35 guests, while they can work just fine on i440fx too.
I've made those changes and updated the branch here: https://github.com/crobinso/libvirt/tree/virtio
I'm only gonna cherry-pick commit 1/6 from the GitHub branch to avoid any ambiguity when there's a divergence between what you posted on the mailing list and what you pushed on GitHub: more specifically, I'm gonna be reviewing the former. -- Andrea Bolognani / Red Hat / Virtualization

On Tue, Jan 15, 2019 at 02:30:14PM +0100, Andrea Bolognani wrote:
On Sun, 2019-01-13 at 18:12 -0500, Cole Robinson wrote: [...]
The main RFC bits here are:
* The disk approach. danpb and I briefly discussed on IRC adding new bus= values vs a new model= attribute. We decided model= is the lesser of two evils, since bus= handling in apps is tied with target= generation, so adding new virtio-X bus= values will cause more work for apps. These patches add a <disk model=X/> attribute
This sounds fairly reasonable, but I reserve the right to change my mind after looking at the code and thinking about it a bit more :)
* The XML and naming. Previous discussions seemed to favor adding new model-style values rather than a 'transitional' attribute or similar. So these patches add model='virtio-transitional' and model='virtio-non-transitional'
Yeah, that's what I recall the consensus being.
* The PCI address handling. I just mapped virtio-non-transitional to imply plain PCI addressing. I think that's all we need but I'm not positive so I'd appreciate a review of that approach.
I don't think that's right. Let me fish up a message I wrote a while ago summing up interactions between VirtIO devices and PCI (Express) slots:
http://lists.nongnu.org/archive/html/qemu-devel/2018-11/msg03133.html
Basically VirtIO 0.9 requires IO space to be available, and 1.0 did away with that requirement because PCI Express, unlike conventional PCI, allows devices *not* to have IO space.
So transitional devices, which must work with both 0.9 and 1.0, can depend on IO space being available and as such will only work when plugged into conventional PCI slots, whereas non-transitional devices don't need IO space and can thus be plugged into either conventional PCI and PCI Express slots.
Ultimately, then, transitional (rather than non-transitional) devices are the ones that must be forced into conventional PCI slots.
Yes, the existing devices fail when placed in a PCI-X slot with certain guest OS. The -transitional devices are functionally identical to the existing devices. They serve as a hint to libvirt that it should never place them in a PCI-X slot. Non-transitional (aka 1.0) devices work correctly in either slot type Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|

On Tue, 2019-01-15 at 17:02 +0000, Daniel P. Berrangé wrote:
On Tue, Jan 15, 2019 at 02:30:14PM +0100, Andrea Bolognani wrote:
Basically VirtIO 0.9 requires IO space to be available, and 1.0 did away with that requirement because PCI Express, unlike conventional PCI, allows devices *not* to have IO space.
So transitional devices, which must work with both 0.9 and 1.0, can depend on IO space being available and as such will only work when plugged into conventional PCI slots, whereas non-transitional devices don't need IO space and can thus be plugged into either conventional PCI and PCI Express slots.
Ultimately, then, transitional (rather than non-transitional) devices are the ones that must be forced into conventional PCI slots.
Yes, the existing devices fail when placed in a PCI-X slot with certain guest OS. The -transitional devices are functionally identical to the existing devices. They serve as a hint to libvirt that it should never place them in a PCI-X slot.
Not quite: existing devices (virtio-*-pci) will change their behavior based on the slot they're plugged into, so they will show up as non-transitional when connected to a PCI Express slot and as transitional otherwise. If that wasn't the case, there wouldn't have been a way to use VirtIO devices on x86/q35 or aarch64/virt without throwing pcie-to-pci-bridge into the mix until now, and we would also need to change the behavior for existing devices, neither of which is true :) Whether or not the guest OS supports VirtIO 1.0 and can thus drive a non-transitional device is a separate matter, which adding support for these new devices to libvirt and libosinfo will address. -- Andrea Bolognani / Red Hat / Virtualization

On Wed, Jan 16, 2019 at 10:41:59AM +0100, Andrea Bolognani wrote:
On Tue, 2019-01-15 at 17:02 +0000, Daniel P. Berrangé wrote:
On Tue, Jan 15, 2019 at 02:30:14PM +0100, Andrea Bolognani wrote:
Basically VirtIO 0.9 requires IO space to be available, and 1.0 did away with that requirement because PCI Express, unlike conventional PCI, allows devices *not* to have IO space.
So transitional devices, which must work with both 0.9 and 1.0, can depend on IO space being available and as such will only work when plugged into conventional PCI slots, whereas non-transitional devices don't need IO space and can thus be plugged into either conventional PCI and PCI Express slots.
Ultimately, then, transitional (rather than non-transitional) devices are the ones that must be forced into conventional PCI slots.
Yes, the existing devices fail when placed in a PCI-X slot with certain guest OS. The -transitional devices are functionally identical to the existing devices. They serve as a hint to libvirt that it should never place them in a PCI-X slot.
Not quite: existing devices (virtio-*-pci) will change their behavior based on the slot they're plugged into, so they will show up as non-transitional when connected to a PCI Express slot and as transitional otherwise.
We're only ever going to plug -transitional devices into PCI slots, not PCI-X slots. So the magic behaviour of the existing devices won't come into effect in libvirt's usage, when the XML has request a transitional device. Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|

On Sun, Jan 13, 2019 at 06:12:02PM -0500, Cole Robinson wrote:
This series adds the beginnings of support for virtio-transitional and virtio-non-transitional qemu devices.
qemu patches, queued for qemu 4.0.0: https://lists.gnu.org/archive/html/qemu-devel/2018-12/msg00923.html Previous libvirt discussion around this: https://www.redhat.com/archives/libvir-list/2018-August/msg01073.html
Long story short we need to expose these options so apps have a usable way to support rhel6 + virtio + q35.
This series only covers exposing the associated device models for disk and rng devices to make sure I'm on the right track. serial, net, scsi, input-host, balloon 9p, vsock, vhost-scsi still need to be implemented. Those should follow the rng example, except vhost-scsi may need to be a different approach.
virDomainNetDef is a mess because it *still* doesn't use a enum for the device model :-( We really must fix that rather than blindly allowing arbitrary passthrough of hypervisor specific names. I recall Laine had patches for this some 4/5 years ago, but can't remember why we never merged them.
The main RFC bits here are:
* The disk approach. danpb and I briefly discussed on IRC adding new bus= values vs a new model= attribute. We decided model= is the lesser of two evils, since bus= handling in apps is tied with target= generation, so adding new virtio-X bus= values will cause more work for apps. These patches add a <disk model=X/> attribute
Yes, using 'bus' will have a very painful ripple effect on mgmt apps we should avoid at all costs.
* The XML and naming. Previous discussions seemed to favor adding new model-style values rather than a 'transitional' attribute or similar. So these patches add model='virtio-transitional' and model='virtio-non-transitional'
Yep.
* The PCI address handling. I just mapped virtio-non-transitional to imply plain PCI addressing. I think that's all we need but I'm not positive so I'd appreciate a review of that approach.
This was inverted, as Andrea already clarified Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|

On Tue, 2019-01-15 at 17:06 +0000, Daniel P. Berrangé wrote:
virDomainNetDef is a mess because it *still* doesn't use a enum for the device model :-( We really must fix that rather than blindly allowing arbitrary passthrough of hypervisor specific names.
I recall Laine had patches for this some 4/5 years ago, but can't remember why we never merged them.
Based on what I can recall from my own, more recent, attempt at fixing the mess, the main blocker was that in order to keep accepting all existing configurations you'd basically have to still store the model as a string and only at a later time convert it to an enum. So you'd end up making the code more complicated rather than simpler which, needless to say, makes the idea way less attractive :( -- Andrea Bolognani / Red Hat / Virtualization

On Wed, Jan 16, 2019 at 12:01:00PM +0100, Andrea Bolognani wrote:
On Tue, 2019-01-15 at 17:06 +0000, Daniel P. Berrangé wrote:
virDomainNetDef is a mess because it *still* doesn't use a enum for the device model :-( We really must fix that rather than blindly allowing arbitrary passthrough of hypervisor specific names.
I recall Laine had patches for this some 4/5 years ago, but can't remember why we never merged them.
Based on what I can recall from my own, more recent, attempt at fixing the mess, the main blocker was that in order to keep accepting all existing configurations you'd basically have to still store the model as a string and only at a later time convert it to an enum.
The enum should cover all existing reasonably expected configs. Sure I imagine we might miss a few, especially for obscure architectures or hypervisors, but that would just be bugs to be fixed
So you'd end up making the code more complicated rather than simpler which, needless to say, makes the idea way less attractive :(
The key point of using an enum is to ensure that our esx/qemu/parallels drivers all guaranteed to use the same model names, which a core benefit that libvirt is supposed to be adding for applications. Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|

On Wed, 2019-01-16 at 11:13 +0000, Daniel P. Berrangé wrote:
On Wed, Jan 16, 2019 at 12:01:00PM +0100, Andrea Bolognani wrote:
Based on what I can recall from my own, more recent, attempt at fixing the mess, the main blocker was that in order to keep accepting all existing configurations you'd basically have to still store the model as a string and only at a later time convert it to an enum.
The enum should cover all existing reasonably expected configs. Sure I imagine we might miss a few, especially for obscure architectures or hypervisors, but that would just be bugs to be fixed
Until we've fixed said bugs, guests using such models would just disappear though, wouldn't they? That doesn't sound acceptable. And defining even the incomplete enum would require someone to be familiar with all drivers in order to know which models are commonly used, or at all available. -- Andrea Bolognani / Red Hat / Virtualization

On Wed, Jan 16, 2019 at 03:07:07PM +0100, Andrea Bolognani wrote:
On Wed, 2019-01-16 at 11:13 +0000, Daniel P. Berrangé wrote:
On Wed, Jan 16, 2019 at 12:01:00PM +0100, Andrea Bolognani wrote:
Based on what I can recall from my own, more recent, attempt at fixing the mess, the main blocker was that in order to keep accepting all existing configurations you'd basically have to still store the model as a string and only at a later time convert it to an enum.
The enum should cover all existing reasonably expected configs. Sure I imagine we might miss a few, especially for obscure architectures or hypervisors, but that would just be bugs to be fixed
Until we've fixed said bugs, guests using such models would just disappear though, wouldn't they? That doesn't sound acceptable.
We could do a multi-step conversion. First define an enum and report all known enum values in the domain capabilities. Taint any guest using a nic with doesn't match. A year or so later, then finally enforce the enum usage.
And defining even the incomplete enum would require someone to be familiar with all drivers in order to know which models are commonly used, or at all available.
It isn't as bad as it seems. VMWare has whitelisted names, Hyperv doesn't report models at all, Xen is a small finite set. QEMU is the only hard one given the huge set of system emulators. Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|

On Wed, 2019-01-16 at 14:19 +0000, Daniel P. Berrangé wrote:
On Wed, Jan 16, 2019 at 03:07:07PM +0100, Andrea Bolognani wrote:
On Wed, 2019-01-16 at 11:13 +0000, Daniel P. Berrangé wrote:
The enum should cover all existing reasonably expected configs. Sure I imagine we might miss a few, especially for obscure architectures or hypervisors, but that would just be bugs to be fixed
Until we've fixed said bugs, guests using such models would just disappear though, wouldn't they? That doesn't sound acceptable.
We could do a multi-step conversion. First define an enum and report all known enum values in the domain capabilities. Taint any guest using a nic with doesn't match. A year or so later, then finally enforce the enum usage.
That will still result in guests disappearing at some point, which is not something that we're generally okay with. Why would it be any different this time around?
And defining even the incomplete enum would require someone to be familiar with all drivers in order to know which models are commonly used, or at all available.
It isn't as bad as it seems. VMWare has whitelisted names, Hyperv doesn't report models at all, Xen is a small finite set. QEMU is the only hard one given the huge set of system emulators.
If we're willing to leave some theoretical users of impractical network devices in the dust, then coming up with a reasonably small list for QEMU is not too difficult either... But see above :) -- Andrea Bolognani / Red Hat / Virtualization

On Wed, Jan 16, 2019 at 03:46:12PM +0100, Andrea Bolognani wrote:
On Wed, 2019-01-16 at 14:19 +0000, Daniel P. Berrangé wrote:
On Wed, Jan 16, 2019 at 03:07:07PM +0100, Andrea Bolognani wrote:
On Wed, 2019-01-16 at 11:13 +0000, Daniel P. Berrangé wrote:
The enum should cover all existing reasonably expected configs. Sure I imagine we might miss a few, especially for obscure architectures or hypervisors, but that would just be bugs to be fixed
Until we've fixed said bugs, guests using such models would just disappear though, wouldn't they? That doesn't sound acceptable.
We could do a multi-step conversion. First define an enum and report all known enum values in the domain capabilities. Taint any guest using a nic with doesn't match. A year or so later, then finally enforce the enum usage.
That will still result in guests disappearing at some point, which is not something that we're generally okay with. Why would it be any different this time around?
No change we make is perfectly risk free. We would want to have reasonable confidence that the initial enum is a good as we can practically make it. The tainting check & log is a way to identify if we made some mistakes - hopefully we won't have. If users do report it though, we'll be able to fix it. If we get no reports for a reasonable period of time (minimum 12 months), it is OK to assume we've not broken anything that we believe has users.
And defining even the incomplete enum would require someone to be familiar with all drivers in order to know which models are commonly used, or at all available.
It isn't as bad as it seems. VMWare has whitelisted names, Hyperv doesn't report models at all, Xen is a small finite set. QEMU is the only hard one given the huge set of system emulators.
If we're willing to leave some theoretical users of impractical network devices in the dust, then coming up with a reasonably small list for QEMU is not too difficult either... But see above :)
The QEMU list won't be small - it'll be large given all archs ! Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|

On Wed, Jan 16, 2019 at 15:36:29 +0000, Daniel Berrange wrote:
On Wed, Jan 16, 2019 at 03:46:12PM +0100, Andrea Bolognani wrote:
On Wed, 2019-01-16 at 14:19 +0000, Daniel P. Berrangé wrote:
On Wed, Jan 16, 2019 at 03:07:07PM +0100, Andrea Bolognani wrote:
On Wed, 2019-01-16 at 11:13 +0000, Daniel P. Berrangé wrote:
The enum should cover all existing reasonably expected configs. Sure I imagine we might miss a few, especially for obscure architectures or hypervisors, but that would just be bugs to be fixed
Until we've fixed said bugs, guests using such models would just disappear though, wouldn't they? That doesn't sound acceptable.
We could do a multi-step conversion. First define an enum and report all known enum values in the domain capabilities. Taint any guest using a nic with doesn't match. A year or so later, then finally enforce the enum usage.
That will still result in guests disappearing at some point, which is not something that we're generally okay with. Why would it be any different this time around?
No change we make is perfectly risk free. We would want to have reasonable confidence that the initial enum is a good as we can practically make it. The tainting check & log is a way to identify if we made some mistakes - hopefully we won't have. If users do report it though, we'll be able to fix it. If we get no reports for a reasonable period of time (minimum 12 months), it is OK to assume we've not broken anything that we believe has users.
You can introduce yet another intermediate stage where the Validation machinery will reject to start and define VMs with invalid names. That way you get a way stronger level of user warning than taints are with the benefit of not losing guests at that point.
participants (5)
-
Andrea Bolognani
-
Cole Robinson
-
Daniel P. Berrangé
-
Eduardo Habkost
-
Peter Krempa