From 448a0947174ffcc3047bb2ad2d3709d02c894257 Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Thu, 17 Jan 2019 12:52:43 -0500 Subject: [PATCH] qemu: Support scsi controller model=virtio-{non-}transitional Add * "virtio-transitional" maps to qemu "virtio-scsi-pci-transitional" * "virtio-non-transitional" maps to qemu "virtio-scsi-non-transitional" The naming here doesn't match the pre-existing model=virtio-scsi. The prescence of '-scsi' there seems kind of redundant as we have type='scsi' already, so I decided to follow the pattern of other patches and use virtio-transitional etc. Reviewed-by: Andrea Bolognani Signed-off-by: Cole Robinson --- docs/formatdomain.html.in | 7 +++++-- docs/schemas/domaincommon.rng | 2 ++ src/conf/domain_conf.c | 14 ++++++++----- src/conf/domain_conf.h | 2 ++ src/qemu/qemu_command.c | 5 +++++ src/qemu/qemu_domain.c | 8 +++++++- src/qemu/qemu_domain_address.c | 3 +++ src/vbox/vbox_common.c | 2 ++ src/vmx/vmx.c | 5 ++++- .../virtio-non-transitional.x86_64-3.1.0.args | 15 ++++++++------ ...virtio-non-transitional.x86_64-latest.args | 14 +++++++------ .../virtio-non-transitional.xml | 1 + .../virtio-transitional.x86_64-3.1.0.args | 14 +++++++------ .../virtio-transitional.x86_64-latest.args | 13 ++++++------ .../qemuxml2argvdata/virtio-transitional.xml | 1 + .../virtio-non-transitional.xml | 20 +++++++++++++------ .../virtio-transitional.xml | 15 ++++++++------ tests/qemuxml2xmltest.c | 6 ++++-- 18 files changed, 100 insertions(+), 47 deletions(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index a853c2d258..f9574f0b24 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -4195,8 +4195,11 @@
scsi
A scsi controller has an optional attribute model, which is one of 'auto', 'buslogic', 'ibmvscsi', - 'lsilogic', 'lsisas1068', 'lsisas1078', 'virtio-scsi' or - 'vmpvscsi'.
+ 'lsilogic', 'lsisas1068', 'lsisas1078', 'virtio-scsi', + 'vmpvscsi', 'virtio-transitional', 'virtio-non-transitional'. See + Virtio transitional devices + for more details. +
usb
A usb controller has an optional attribute model, which is one of "piix3-uhci", "piix4-uhci", diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index 3a3f46086c..80f9f84f70 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -2156,6 +2156,8 @@ ibmvscsi virtio-scsi lsisas1078 + virtio-transitional + virtio-non-transitional diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index cbe780f0e9..bfafac407e 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -385,7 +385,10 @@ VIR_ENUM_IMPL(virDomainControllerModelSCSI, VIR_DOMAIN_CONTROLLER_MODEL_SCSI_LAS "vmpvscsi", "ibmvscsi", "virtio-scsi", - "lsisas1078"); + "lsisas1078", + "virtio-transitional", + "virtio-non-transitional", +); VIR_ENUM_IMPL(virDomainControllerModelUSB, VIR_DOMAIN_CONTROLLER_MODEL_USB_LAST, "piix3-uhci", @@ -4935,11 +4938,12 @@ static int virDomainControllerDefPostParse(virDomainControllerDefPtr cdev) { if (cdev->iothread && - cdev->model != VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VIRTIO_SCSI) { - virReportError(VIR_ERR_XML_ERROR, + cdev->model != VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VIRTIO_SCSI && + cdev->model != VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VIRTIO_TRANSITIONAL && + cdev->model != VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VIRTIO_NON_TRANSITIONAL) { + virReportError(VIR_ERR_XML_ERROR, "%s", _("'iothread' attribute only supported for " - "controller model '%s'"), - virDomainControllerModelSCSITypeToString(VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VIRTIO_SCSI)); + "virtio scsi controllers")); return -1; } diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index fddf8edbf8..c2dcc87ba1 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -756,6 +756,8 @@ typedef enum { VIR_DOMAIN_CONTROLLER_MODEL_SCSI_IBMVSCSI, VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VIRTIO_SCSI, VIR_DOMAIN_CONTROLLER_MODEL_SCSI_LSISAS1078, + VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VIRTIO_TRANSITIONAL, + VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VIRTIO_NON_TRANSITIONAL, VIR_DOMAIN_CONTROLLER_MODEL_SCSI_LAST } virDomainControllerModelSCSI; diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index a6f869dbd4..853b0932b0 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -523,6 +523,9 @@ qemuBuildVirtioDevStr(virBufferPtr buf, if (device.data.controller->type == VIR_DOMAIN_CONTROLLER_TYPE_VIRTIO_SERIAL) { has_tmodel = device.data.controller->model == VIR_DOMAIN_CONTROLLER_MODEL_VIRTIO_SERIAL_VIRTIO_TRANSITIONAL; has_ntmodel = device.data.controller->model == VIR_DOMAIN_CONTROLLER_MODEL_VIRTIO_SERIAL_VIRTIO_NON_TRANSITIONAL; + } else if (device.data.controller->type == VIR_DOMAIN_CONTROLLER_TYPE_SCSI) { + has_tmodel = device.data.controller->model == VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VIRTIO_TRANSITIONAL; + has_ntmodel = device.data.controller->model == VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VIRTIO_NON_TRANSITIONAL; } else { return 0; } @@ -2997,6 +3000,8 @@ qemuBuildControllerDevStr(const virDomainDef *domainDef, case VIR_DOMAIN_CONTROLLER_TYPE_SCSI: switch ((virDomainControllerModelSCSI) def->model) { case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VIRTIO_SCSI: + case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VIRTIO_TRANSITIONAL: + case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VIRTIO_NON_TRANSITIONAL: if (qemuBuildVirtioDevStr(&buf, "virtio-scsi", qemuCaps, VIR_DOMAIN_DEVICE_CONTROLLER, def) < 0) { goto error; diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 11d7b0e3f5..1487268a89 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -5087,7 +5087,9 @@ static int qemuDomainDeviceDefValidateControllerAttributes(const virDomainControllerDef *controller) { if (!(controller->type == VIR_DOMAIN_CONTROLLER_TYPE_SCSI && - controller->model == VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VIRTIO_SCSI)) { + (controller->model == VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VIRTIO_SCSI || + controller->model == VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VIRTIO_TRANSITIONAL || + controller->model == VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VIRTIO_NON_TRANSITIONAL))) { if (controller->queues) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("'queues' is only supported by virtio-scsi controller")); @@ -5141,6 +5143,8 @@ qemuDomainCheckSCSIControllerModel(virQEMUCapsPtr qemuCaps, } break; case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VIRTIO_SCSI: + case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VIRTIO_TRANSITIONAL: + case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VIRTIO_NON_TRANSITIONAL: if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_SCSI)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("This QEMU doesn't support " @@ -5256,6 +5260,8 @@ qemuDomainDeviceDefValidateControllerSCSI(const virDomainControllerDef *controll { switch ((virDomainControllerModelSCSI) controller->model) { case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VIRTIO_SCSI: + case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VIRTIO_TRANSITIONAL: + case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VIRTIO_NON_TRANSITIONAL: if (!qemuDomainCheckSCSIControllerIOThreads(controller, def)) return -1; break; diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c index 1bee7cf3e1..4740536d82 100644 --- a/src/qemu/qemu_domain_address.c +++ b/src/qemu/qemu_domain_address.c @@ -648,8 +648,11 @@ qemuDomainDeviceCalculatePCIConnectFlags(virDomainDeviceDefPtr dev, return 0; case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VIRTIO_SCSI: + case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VIRTIO_NON_TRANSITIONAL: return virtioFlags; + /* Transitional devices only work in conventional PCI slots */ + case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VIRTIO_TRANSITIONAL: case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_AUTO: case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_BUSLOGIC: case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_LSILOGIC: diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c index d95fe7c7ae..0a27deeaf8 100644 --- a/src/vbox/vbox_common.c +++ b/src/vbox/vbox_common.c @@ -406,6 +406,8 @@ vboxSetStorageController(virDomainControllerDefPtr controller, case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VMPVSCSI: case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_IBMVSCSI: case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VIRTIO_SCSI: + case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VIRTIO_TRANSITIONAL: + case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VIRTIO_NON_TRANSITIONAL: case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_LSISAS1078: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("The vbox driver does not support %s SCSI " diff --git a/src/vmx/vmx.c b/src/vmx/vmx.c index d525f187e9..75cdea9067 100644 --- a/src/vmx/vmx.c +++ b/src/vmx/vmx.c @@ -517,7 +517,10 @@ VIR_ENUM_IMPL(virVMXControllerModelSCSI, VIR_DOMAIN_CONTROLLER_MODEL_SCSI_LAST, "pvscsi", "UNUSED ibmvscsi", "UNUSED virtio-scsi", - "UNUSED lsisas1078"); + "UNUSED lsisas1078", + "UNUSED virtio-transitional", + "UNUSED virtio-non-transitional", +); /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * diff --git a/tests/qemuxml2argvdata/virtio-non-transitional.x86_64-3.1.0.args b/tests/qemuxml2argvdata/virtio-non-transitional.x86_64-3.1.0.args index 7543a225cb..52f0855611 100644 --- a/tests/qemuxml2argvdata/virtio-non-transitional.x86_64-3.1.0.args +++ b/tests/qemuxml2argvdata/virtio-non-transitional.x86_64-3.1.0.args @@ -35,10 +35,13 @@ addr=0x1 \ -device pcie-root-port,port=0x10,chassis=9,id=pci.9,bus=pcie.0,\ multifunction=on,addr=0x2 \ -device pcie-root-port,port=0x11,chassis=10,id=pci.10,bus=pcie.0,addr=0x2.0x1 \ +-device pcie-root-port,port=0x12,chassis=11,id=pci.11,bus=pcie.0,addr=0x2.0x2 \ +-device virtio-scsi-pci,disable-legacy=on,disable-modern=off,id=scsi0,\ +bus=pci.4,addr=0x0 \ -device virtio-serial-pci,disable-legacy=on,disable-modern=off,\ id=virtio-serial0,bus=pci.3,addr=0x0 \ -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-virtio-disk0 \ --device virtio-blk-pci,disable-legacy=on,disable-modern=off,scsi=off,bus=pci.4,\ +-device virtio-blk-pci,disable-legacy=on,disable-modern=off,scsi=off,bus=pci.5,\ addr=0x0,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \ -fsdev local,security_model=passthrough,id=fsdev-fs0,path=/export/fs1 \ -device virtio-9p-pci,disable-legacy=on,disable-modern=off,id=fs0,\ @@ -47,16 +50,16 @@ fsdev=fsdev-fs0,mount_tag=fs1,bus=pci.1,addr=0x0 \ -device virtio-net-pci,disable-legacy=on,disable-modern=off,netdev=hostnet0,\ id=net0,mac=00:11:22:33:44:55,bus=pci.2,addr=0x0 \ -device virtio-input-host-pci,disable-legacy=on,disable-modern=off,id=input0,\ -evdev=/dev/input/event1234,bus=pci.8,addr=0x0 \ +evdev=/dev/input/event1234,bus=pci.9,addr=0x0 \ -device vhost-scsi-pci,disable-legacy=on,disable-modern=off,\ -wwpn=naa.5123456789abcde0,vhostfd=3,id=hostdev0,bus=pci.5,addr=0x0 \ +wwpn=naa.5123456789abcde0,vhostfd=3,id=hostdev0,bus=pci.6,addr=0x0 \ -device virtio-balloon-pci,disable-legacy=on,disable-modern=off,id=balloon0,\ -bus=pci.6,addr=0x0 \ +bus=pci.7,addr=0x0 \ -object rng-random,id=objrng0,filename=/dev/urandom \ -device virtio-rng-pci,disable-legacy=on,disable-modern=off,rng=objrng0,\ -id=rng0,bus=pci.7,addr=0x0 \ +id=rng0,bus=pci.8,addr=0x0 \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\ resourcecontrol=deny \ -device vhost-vsock-pci,disable-legacy=on,disable-modern=off,id=vsock0,\ -guest-cid=4,vhostfd=6789,bus=pci.9,addr=0x0 \ +guest-cid=4,vhostfd=6789,bus=pci.10,addr=0x0 \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/virtio-non-transitional.x86_64-latest.args b/tests/qemuxml2argvdata/virtio-non-transitional.x86_64-latest.args index 514db3ee7f..54125d2102 100644 --- a/tests/qemuxml2argvdata/virtio-non-transitional.x86_64-latest.args +++ b/tests/qemuxml2argvdata/virtio-non-transitional.x86_64-latest.args @@ -35,10 +35,12 @@ addr=0x1 \ -device pcie-root-port,port=0x10,chassis=9,id=pci.9,bus=pcie.0,\ multifunction=on,addr=0x2 \ -device pcie-root-port,port=0x11,chassis=10,id=pci.10,bus=pcie.0,addr=0x2.0x1 \ +-device pcie-root-port,port=0x12,chassis=11,id=pci.11,bus=pcie.0,addr=0x2.0x2 \ +-device virtio-scsi-pci-non-transitional,id=scsi0,bus=pci.4,addr=0x0 \ -device virtio-serial-pci-non-transitional,id=virtio-serial0,bus=pci.3,\ addr=0x0 \ -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-virtio-disk0 \ --device virtio-blk-pci-non-transitional,scsi=off,bus=pci.4,addr=0x0,\ +-device virtio-blk-pci-non-transitional,scsi=off,bus=pci.5,addr=0x0,\ drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \ -fsdev local,security_model=passthrough,id=fsdev-fs0,path=/export/fs1 \ -device virtio-9p-pci-non-transitional,id=fs0,fsdev=fsdev-fs0,mount_tag=fs1,\ @@ -47,14 +49,14 @@ bus=pci.1,addr=0x0 \ -device virtio-net-pci-non-transitional,netdev=hostnet0,id=net0,\ mac=00:11:22:33:44:55,bus=pci.2,addr=0x0 \ -device virtio-input-host-pci-non-transitional,id=input0,\ -evdev=/dev/input/event1234,bus=pci.8,addr=0x0 \ +evdev=/dev/input/event1234,bus=pci.9,addr=0x0 \ -device vhost-scsi-pci-non-transitional,wwpn=naa.5123456789abcde0,vhostfd=3,\ -id=hostdev0,bus=pci.5,addr=0x0 \ --device virtio-balloon-pci-non-transitional,id=balloon0,bus=pci.6,addr=0x0 \ +id=hostdev0,bus=pci.6,addr=0x0 \ +-device virtio-balloon-pci-non-transitional,id=balloon0,bus=pci.7,addr=0x0 \ -object rng-random,id=objrng0,filename=/dev/urandom \ --device virtio-rng-pci-non-transitional,rng=objrng0,id=rng0,bus=pci.7,addr=0x0 \ +-device virtio-rng-pci-non-transitional,rng=objrng0,id=rng0,bus=pci.8,addr=0x0 \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\ resourcecontrol=deny \ -device vhost-vsock-pci-non-transitional,id=vsock0,guest-cid=4,vhostfd=6789,\ -bus=pci.9,addr=0x0 \ +bus=pci.10,addr=0x0 \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/virtio-non-transitional.xml b/tests/qemuxml2argvdata/virtio-non-transitional.xml index dd71847ff3..1d7ee6bfe6 100644 --- a/tests/qemuxml2argvdata/virtio-non-transitional.xml +++ b/tests/qemuxml2argvdata/virtio-non-transitional.xml @@ -29,6 +29,7 @@ + diff --git a/tests/qemuxml2argvdata/virtio-transitional.x86_64-3.1.0.args b/tests/qemuxml2argvdata/virtio-transitional.x86_64-3.1.0.args index b07f77511f..4f8958f336 100644 --- a/tests/qemuxml2argvdata/virtio-transitional.x86_64-3.1.0.args +++ b/tests/qemuxml2argvdata/virtio-transitional.x86_64-3.1.0.args @@ -27,11 +27,13 @@ file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ addr=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 \ +-device virtio-scsi-pci,disable-legacy=off,disable-modern=off,id=scsi0,\ +bus=pci.2,addr=0x4 \ -device virtio-serial-pci,disable-legacy=off,disable-modern=off,\ id=virtio-serial0,bus=pci.2,addr=0x3 \ -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-virtio-disk0 \ -device virtio-blk-pci,disable-legacy=off,disable-modern=off,scsi=off,\ -bus=pci.2,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \ +bus=pci.2,addr=0x5,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \ -fsdev local,security_model=passthrough,id=fsdev-fs0,path=/export/fs1 \ -device virtio-9p-pci,disable-legacy=off,disable-modern=off,id=fs0,\ fsdev=fsdev-fs0,mount_tag=fs1,bus=pci.2,addr=0x1 \ @@ -39,16 +41,16 @@ fsdev=fsdev-fs0,mount_tag=fs1,bus=pci.2,addr=0x1 \ -device virtio-net-pci,disable-legacy=off,disable-modern=off,netdev=hostnet0,\ id=net0,mac=00:11:22:33:44:55,bus=pci.2,addr=0x2 \ -device virtio-input-host-pci,disable-legacy=off,disable-modern=off,id=input0,\ -evdev=/dev/input/event1234,bus=pci.2,addr=0x8 \ +evdev=/dev/input/event1234,bus=pci.2,addr=0x9 \ -device vhost-scsi-pci,disable-legacy=off,disable-modern=off,\ -wwpn=naa.5123456789abcde0,vhostfd=3,id=hostdev0,bus=pci.2,addr=0x5 \ +wwpn=naa.5123456789abcde0,vhostfd=3,id=hostdev0,bus=pci.2,addr=0x6 \ -device virtio-balloon-pci,disable-legacy=off,disable-modern=off,id=balloon0,\ -bus=pci.2,addr=0x6 \ +bus=pci.2,addr=0x7 \ -object rng-random,id=objrng0,filename=/dev/urandom \ -device virtio-rng-pci,disable-legacy=off,disable-modern=off,rng=objrng0,\ -id=rng0,bus=pci.2,addr=0x7 \ +id=rng0,bus=pci.2,addr=0x8 \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\ resourcecontrol=deny \ -device vhost-vsock-pci,disable-legacy=off,disable-modern=off,id=vsock0,\ -guest-cid=4,vhostfd=6789,bus=pci.2,addr=0x9 \ +guest-cid=4,vhostfd=6789,bus=pci.2,addr=0xa \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/virtio-transitional.x86_64-latest.args b/tests/qemuxml2argvdata/virtio-transitional.x86_64-latest.args index 6c697eba83..49cfd12b92 100644 --- a/tests/qemuxml2argvdata/virtio-transitional.x86_64-latest.args +++ b/tests/qemuxml2argvdata/virtio-transitional.x86_64-latest.args @@ -27,9 +27,10 @@ file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ addr=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 \ +-device virtio-scsi-pci-transitional,id=scsi0,bus=pci.2,addr=0x4 \ -device virtio-serial-pci-transitional,id=virtio-serial0,bus=pci.2,addr=0x3 \ -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-virtio-disk0 \ --device virtio-blk-pci-transitional,scsi=off,bus=pci.2,addr=0x4,\ +-device virtio-blk-pci-transitional,scsi=off,bus=pci.2,addr=0x5,\ drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \ -fsdev local,security_model=passthrough,id=fsdev-fs0,path=/export/fs1 \ -device virtio-9p-pci-transitional,id=fs0,fsdev=fsdev-fs0,mount_tag=fs1,\ @@ -38,14 +39,14 @@ bus=pci.2,addr=0x1 \ -device virtio-net-pci-transitional,netdev=hostnet0,id=net0,\ mac=00:11:22:33:44:55,bus=pci.2,addr=0x2 \ -device virtio-input-host-pci-transitional,id=input0,\ -evdev=/dev/input/event1234,bus=pci.2,addr=0x8 \ +evdev=/dev/input/event1234,bus=pci.2,addr=0x9 \ -device vhost-scsi-pci-transitional,wwpn=naa.5123456789abcde0,vhostfd=3,\ -id=hostdev0,bus=pci.2,addr=0x5 \ --device virtio-balloon-pci-transitional,id=balloon0,bus=pci.2,addr=0x6 \ +id=hostdev0,bus=pci.2,addr=0x6 \ +-device virtio-balloon-pci-transitional,id=balloon0,bus=pci.2,addr=0x7 \ -object rng-random,id=objrng0,filename=/dev/urandom \ --device virtio-rng-pci-transitional,rng=objrng0,id=rng0,bus=pci.2,addr=0x7 \ +-device virtio-rng-pci-transitional,rng=objrng0,id=rng0,bus=pci.2,addr=0x8 \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\ resourcecontrol=deny \ -device vhost-vsock-pci-transitional,id=vsock0,guest-cid=4,vhostfd=6789,\ -bus=pci.2,addr=0x9 \ +bus=pci.2,addr=0xa \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/virtio-transitional.xml b/tests/qemuxml2argvdata/virtio-transitional.xml index 96646ed5b3..31551ab69f 100644 --- a/tests/qemuxml2argvdata/virtio-transitional.xml +++ b/tests/qemuxml2argvdata/virtio-transitional.xml @@ -29,6 +29,7 @@ + diff --git a/tests/qemuxml2xmloutdata/virtio-non-transitional.xml b/tests/qemuxml2xmloutdata/virtio-non-transitional.xml index 7ef2d09c11..4e7d1ee3b1 100644 --- a/tests/qemuxml2xmloutdata/virtio-non-transitional.xml +++ b/tests/qemuxml2xmloutdata/virtio-non-transitional.xml @@ -18,11 +18,14 @@ -
+
+ +
+
@@ -78,6 +81,11 @@
+ + + +
+ @@ -90,24 +98,24 @@ -
+
-
+
-
+
/dev/urandom -
+
-
+
diff --git a/tests/qemuxml2xmloutdata/virtio-transitional.xml b/tests/qemuxml2xmloutdata/virtio-transitional.xml index da4fbbcdc5..2293e5be3e 100644 --- a/tests/qemuxml2xmloutdata/virtio-transitional.xml +++ b/tests/qemuxml2xmloutdata/virtio-transitional.xml @@ -18,11 +18,14 @@ -
+
+ +
+
@@ -54,24 +57,24 @@ -
+
-
+
-
+
/dev/urandom -
+
-
+
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index ac8e88448d..fc76bac08e 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -1261,7 +1261,8 @@ mymain(void) QEMU_CAPS_DEVICE_VIRTIO_RNG, QEMU_CAPS_VIRTIO_PCI_DISABLE_LEGACY, QEMU_CAPS_DEVICE_VHOST_VSOCK, - QEMU_CAPS_VIRTIO_INPUT_HOST); + QEMU_CAPS_VIRTIO_INPUT_HOST, + QEMU_CAPS_VIRTIO_SCSI); DO_TEST("virtio-non-transitional", QEMU_CAPS_DEVICE_VIDEO_PRIMARY, QEMU_CAPS_DEVICE_PCIE_PCI_BRIDGE, @@ -1269,7 +1270,8 @@ mymain(void) QEMU_CAPS_DEVICE_VIRTIO_RNG, QEMU_CAPS_VIRTIO_PCI_DISABLE_LEGACY, QEMU_CAPS_DEVICE_VHOST_VSOCK, - QEMU_CAPS_VIRTIO_INPUT_HOST); + QEMU_CAPS_VIRTIO_INPUT_HOST, + QEMU_CAPS_VIRTIO_SCSI); if (getenv("LIBVIRT_SKIP_CLEANUP") == NULL) virFileDeleteTree(fakerootdir); -- GitLab