qemu: Support scsi controller model=virtio-{non-}transitional

Add <controller type='scsi' model handling for virtio transitional
devices. Ex:

  <controller type='scsi' model='virtio-transitional'/>

* "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 <abologna@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
Cole Robinson 2019-01-17 12:52:43 -05:00
parent 47f94f4591
commit 448a094717
18 changed files with 100 additions and 47 deletions

View File

@ -4195,8 +4195,11 @@
<dt><code>scsi</code></dt>
<dd>A <code>scsi</code> controller has an optional attribute
<code>model</code>, which is one of 'auto', 'buslogic', 'ibmvscsi',
'lsilogic', 'lsisas1068', 'lsisas1078', 'virtio-scsi' or
'vmpvscsi'.</dd>
'lsilogic', 'lsisas1068', 'lsisas1078', 'virtio-scsi',
'vmpvscsi', 'virtio-transitional', 'virtio-non-transitional'. See
<a href="#elementsVirtioTransitional">Virtio transitional devices</a>
for more details.
</dd>
<dt><code>usb</code></dt>
<dd>A <code>usb</code> controller has an optional attribute
<code>model</code>, which is one of "piix3-uhci", "piix4-uhci",

View File

@ -2156,6 +2156,8 @@
<value>ibmvscsi</value>
<value>virtio-scsi</value>
<value>lsisas1078</value>
<value>virtio-transitional</value>
<value>virtio-non-transitional</value>
</choice>
</attribute>
</optional>

View File

@ -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;
}

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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:

View File

@ -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 "

View File

@ -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",
);
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

View File

@ -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

View File

@ -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

View File

@ -29,6 +29,7 @@
<source evdev='/dev/input/event1234'/>
</input>
<controller type='virtio-serial' model='virtio-non-transitional'/>
<controller type='scsi' model='virtio-non-transitional'/>
<controller type='usb' model='none'/>
<memballoon model='virtio-non-transitional'/>
<vsock model='virtio-non-transitional'>

View File

@ -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

View File

@ -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

View File

@ -29,6 +29,7 @@
<source evdev='/dev/input/event1234'/>
</input>
<controller type='virtio-serial' model='virtio-transitional'/>
<controller type='scsi' model='virtio-transitional'/>
<controller type='usb' model='none'/>
<memballoon model='virtio-transitional'/>
<vsock model='virtio-transitional'>

View File

@ -18,11 +18,14 @@
<driver name='qemu' type='raw'/>
<source dev='/dev/HostVG/QEMUGuest1'/>
<target dev='vda' bus='virtio'/>
<address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
<address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>
</disk>
<controller type='virtio-serial' index='0' model='virtio-non-transitional'>
<address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
</controller>
<controller type='scsi' index='0' model='virtio-non-transitional'>
<address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
</controller>
<controller type='usb' index='0' model='none'/>
<controller type='sata' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
@ -78,6 +81,11 @@
<target chassis='10' port='0x11'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x1'/>
</controller>
<controller type='pci' index='11' model='pcie-root-port'>
<model name='pcie-root-port'/>
<target chassis='11' port='0x12'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x2'/>
</controller>
<filesystem type='mount' accessmode='passthrough' model='virtio-non-transitional'>
<source dir='/export/fs1'/>
<target dir='fs1'/>
@ -90,24 +98,24 @@
</interface>
<input type='passthrough' bus='virtio' model='virtio-non-transitional'>
<source evdev='/dev/input/event1234'/>
<address type='pci' domain='0x0000' bus='0x08' slot='0x00' function='0x0'/>
<address type='pci' domain='0x0000' bus='0x09' slot='0x00' function='0x0'/>
</input>
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<hostdev mode='subsystem' type='scsi_host' managed='no' model='virtio-non-transitional'>
<source protocol='vhost' wwpn='naa.5123456789abcde0'/>
<address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>
<address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x0'/>
</hostdev>
<memballoon model='virtio-non-transitional'>
<address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x0'/>
<address type='pci' domain='0x0000' bus='0x07' slot='0x00' function='0x0'/>
</memballoon>
<rng model='virtio-non-transitional'>
<backend model='random'>/dev/urandom</backend>
<address type='pci' domain='0x0000' bus='0x07' slot='0x00' function='0x0'/>
<address type='pci' domain='0x0000' bus='0x08' slot='0x00' function='0x0'/>
</rng>
<vsock model='virtio-non-transitional'>
<cid auto='no' address='4'/>
<address type='pci' domain='0x0000' bus='0x09' slot='0x00' function='0x0'/>
<address type='pci' domain='0x0000' bus='0x0a' slot='0x00' function='0x0'/>
</vsock>
</devices>
</domain>

View File

@ -18,11 +18,14 @@
<driver name='qemu' type='raw'/>
<source dev='/dev/HostVG/QEMUGuest1'/>
<target dev='vda' bus='virtio'/>
<address type='pci' domain='0x0000' bus='0x02' slot='0x04' function='0x0'/>
<address type='pci' domain='0x0000' bus='0x02' slot='0x05' function='0x0'/>
</disk>
<controller type='virtio-serial' index='0' model='virtio-transitional'>
<address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x0'/>
</controller>
<controller type='scsi' index='0' model='virtio-transitional'>
<address type='pci' domain='0x0000' bus='0x02' slot='0x04' function='0x0'/>
</controller>
<controller type='usb' index='0' model='none'/>
<controller type='sata' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
@ -54,24 +57,24 @@
</interface>
<input type='passthrough' bus='virtio' model='virtio-transitional'>
<source evdev='/dev/input/event1234'/>
<address type='pci' domain='0x0000' bus='0x02' slot='0x08' function='0x0'/>
<address type='pci' domain='0x0000' bus='0x02' slot='0x09' function='0x0'/>
</input>
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<hostdev mode='subsystem' type='scsi_host' managed='no' model='virtio-transitional'>
<source protocol='vhost' wwpn='naa.5123456789abcde0'/>
<address type='pci' domain='0x0000' bus='0x02' slot='0x05' function='0x0'/>
<address type='pci' domain='0x0000' bus='0x02' slot='0x06' function='0x0'/>
</hostdev>
<memballoon model='virtio-transitional'>
<address type='pci' domain='0x0000' bus='0x02' slot='0x06' function='0x0'/>
<address type='pci' domain='0x0000' bus='0x02' slot='0x07' function='0x0'/>
</memballoon>
<rng model='virtio-transitional'>
<backend model='random'>/dev/urandom</backend>
<address type='pci' domain='0x0000' bus='0x02' slot='0x07' function='0x0'/>
<address type='pci' domain='0x0000' bus='0x02' slot='0x08' function='0x0'/>
</rng>
<vsock model='virtio-transitional'>
<cid auto='no' address='4'/>
<address type='pci' domain='0x0000' bus='0x02' slot='0x09' function='0x0'/>
<address type='pci' domain='0x0000' bus='0x02' slot='0x0a' function='0x0'/>
</vsock>
</devices>
</domain>

View File

@ -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);