From nobody Sun Feb 8 14:31:39 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1549663947984600.8190896091279; Fri, 8 Feb 2019 14:12:27 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D8F9C85A03; Fri, 8 Feb 2019 22:12:25 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 323D95C6A5; Fri, 8 Feb 2019 22:12:25 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 894A93F7D5; Fri, 8 Feb 2019 22:12:23 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x18MCKeq008396 for ; Fri, 8 Feb 2019 17:12:20 -0500 Received: by smtp.corp.redhat.com (Postfix) id DB93F5C6A5; Fri, 8 Feb 2019 22:12:20 +0000 (UTC) Received: from worklaptop.redhat.com (ovpn-123-115.rdu2.redhat.com [10.10.123.115]) by smtp.corp.redhat.com (Postfix) with ESMTP id 54D675C557; Fri, 8 Feb 2019 22:12:20 +0000 (UTC) From: Cole Robinson To: libvirt-list@redhat.com Date: Fri, 8 Feb 2019 17:11:54 -0500 Message-Id: <1c1384ef9b7c80c9e9c254d555e9dfd049d965c3.1549663396.git.crobinso@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v3 03/17] conf: Add X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Fri, 08 Feb 2019 22:12:26 +0000 (UTC) Content-Type: text/plain; charset="utf-8" devices lack the model=3D attribute which is used by most other device types. bus=3D mostly acts as one, but it serves other purposes too like determing what target=3D prefix to use, and for matching against controller type=3D values. Extending bus=3D 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 attribute, and wire up common handling for virtio and virtio-{non-}transitional Signed-off-by: Cole Robinson Reviewed-by: Andrea Bolognani --- docs/formatdomain.html.in | 45 +++++++++++++++++++ docs/schemas/domaincommon.rng | 9 ++++ src/conf/domain_conf.c | 40 +++++++++++++++++ src/conf/domain_conf.h | 11 +++++ src/libvirt_private.syms | 2 + .../virtio-non-transitional.x86_64-3.1.0.args | 34 ++++++++++++++ ...virtio-non-transitional.x86_64-latest.args | 34 ++++++++++++++ .../virtio-non-transitional.xml | 17 +++++++ .../virtio-transitional.x86_64-3.1.0.args | 34 ++++++++++++++ .../virtio-transitional.x86_64-latest.args | 34 ++++++++++++++ .../qemuxml2argvdata/virtio-transitional.xml | 17 +++++++ tests/qemuxml2argvtest.c | 6 +++ .../virtio-non-transitional.xml | 42 +++++++++++++++++ .../virtio-transitional.xml | 42 +++++++++++++++++ tests/qemuxml2xmltest.c | 11 +++++ 15 files changed, 378 insertions(+) create mode 100644 tests/qemuxml2argvdata/virtio-non-transitional.x86_64-3= .1.0.args create mode 100644 tests/qemuxml2argvdata/virtio-non-transitional.x86_64-l= atest.args create mode 100644 tests/qemuxml2argvdata/virtio-non-transitional.xml create mode 100644 tests/qemuxml2argvdata/virtio-transitional.x86_64-3.1.0= .args create mode 100644 tests/qemuxml2argvdata/virtio-transitional.x86_64-lates= t.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 2ae5006849..85bc6a9d0b 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -2922,6 +2922,17 @@ Since 0.1.4

+
model
+
+ Indicates the emulated device model of the disk. Typically + this is indicated solely by the bus property but + for bus "virtio" the model can be specified furth= er + with "virtio-transitional", "virtio-non-transitional", or + "virtio", see + Virtio transitional de= vices + for more details. + Since 5.1.0 +
rawio
Indicates whether the disk needs rawio capability. Valid @@ -4074,6 +4085,40 @@ Since 3.5.0

=20 +

Virtio transitional devices

+ +

+ Since 5.1.0, some of QEMU's virtio devi= ces, + when used with PCI/PCIe machine types, accept the following + model values: +

+ +
+
virtio-transitional
+
This instructs libvirt to always place the device in a conventio= nal + PCI slot. The device can work with a virtio 0.9 or virtio 1.0 + guest driver. +
+
virtio-non-transitional
+
+ The device can only work with a virtio 1.0 guest driver. +
+
virtio
+
If the device is plugged into a PCIe slot, it acts as a + virtio-non-transitional device. If plugged into a conventional PCI s= lot, + it will function as a virtio-transitional device. This logic only + applies to devices that support the transitional models; for other + devices, virtio behavior will be different. +
+
+ +

+ For more details see the + qemu patch posting and the + virtio-1.0 spec. +

+ +

Controllers

=20

diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index ba80440c72..8811cf7e45 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -1509,6 +1509,15 @@ + + + + virtio + virtio-transitional + virtio-non-transitional + + + diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 6772c327ed..3768143b2c 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -985,6 +985,13 @@ VIR_ENUM_IMPL(virDomainDiskDetectZeroes, VIR_DOMAIN_DI= SK_DETECT_ZEROES_LAST, "unmap", ); =20 +VIR_ENUM_IMPL(virDomainDiskModel, VIR_DOMAIN_DISK_MODEL_LAST, + "default", + "virtio", + "virtio-transitional", + "virtio-non-transitional", +); + VIR_ENUM_IMPL(virDomainDiskMirrorState, VIR_DOMAIN_DISK_MIRROR_STATE_LAST, "none", "yes", @@ -5633,6 +5640,17 @@ virDomainDiskDefValidate(const virDomainDiskDef *dis= k) return -1; } =20 + if (disk->bus !=3D VIR_DOMAIN_DISK_BUS_VIRTIO && + (disk->model =3D=3D VIR_DOMAIN_DISK_MODEL_VIRTIO || + disk->model =3D=3D VIR_DOMAIN_DISK_MODEL_VIRTIO_TRANSITIONAL || + disk->model =3D=3D VIR_DOMAIN_DISK_MODEL_VIRTIO_NON_TRANSITIONAL)= ) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("disk model '%s' not supported for bus '%s'"), + virDomainDiskModelTypeToString(disk->model), + virDomainDiskBusTypeToString(disk->bus)); + return -1; + } + return 0; } =20 @@ -9719,6 +9737,14 @@ virDomainDiskDefParseXML(virDomainXMLOptionPtr xmlop= t, } VIR_FREE(tmp); =20 + if ((tmp =3D virXMLPropString(node, "model")) && + (def->model =3D virDomainDiskModelTypeFromString(tmp)) < 0) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("unknown disk model '%s'"), tmp); + goto error; + } + VIR_FREE(tmp); + snapshot =3D virXMLPropString(node, "snapshot"); =20 rawio =3D virXMLPropString(node, "rawio"); @@ -21960,6 +21986,14 @@ virDomainDiskDefCheckABIStability(virDomainDiskDef= Ptr src, return false; } =20 + if (src->model !=3D dst->model) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("Target disk model %s does not match source %s"), + virDomainDiskModelTypeToString(dst->model), + virDomainDiskModelTypeToString(src->model)); + return false; + } + if (src->virtio && dst->virtio && !virDomainVirtioOptionsCheckABIStability(src->virtio, dst->virtio)) return false; @@ -24517,6 +24551,12 @@ virDomainDiskDefFormat(virBufferPtr buf, virBufferAsprintf(buf, "model) { + virBufferAsprintf(buf, " model=3D'%s'", + virDomainDiskModelTypeToString(def->model)); + } + if (def->rawio) { virBufferAsprintf(buf, " rawio=3D'%s'", virTristateBoolTypeToString(def->rawio)); diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 2bc3f879f7..ecf8b06c2e 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -567,6 +567,15 @@ typedef enum { VIR_DOMAIN_DISK_DETECT_ZEROES_LAST } virDomainDiskDetectZeroes; =20 +typedef enum { + VIR_DOMAIN_DISK_MODEL_DEFAULT =3D 0, + VIR_DOMAIN_DISK_MODEL_VIRTIO, + 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 +683,7 @@ struct _virDomainDiskDef { int detect_zeroes; /* enum virDomainDiskDetectZeroes */ char *domain_name; /* backend domain name */ unsigned int queues; + int model; /* enum virDomainDiskModel */ virDomainVirtioOptionsPtr virtio; }; =20 @@ -3416,6 +3426,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 67579742fd..aeedb1834c 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -344,6 +344,8 @@ virDomainDiskIoTypeFromString; virDomainDiskIoTypeToString; virDomainDiskMirrorStateTypeFromString; virDomainDiskMirrorStateTypeToString; +virDomainDiskModelTypeFromString; +virDomainDiskModelTypeToString; virDomainDiskPathByName; virDomainDiskRemove; virDomainDiskRemoveByName; diff --git a/tests/qemuxml2argvdata/virtio-non-transitional.x86_64-3.1.0.ar= gs b/tests/qemuxml2argvdata/virtio-non-transitional.x86_64-3.1.0.args new file mode 100644 index 0000000000..9e11e900da --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-non-transitional.x86_64-3.1.0.args @@ -0,0 +1,34 @@ +LC_ALL=3DC \ +PATH=3D/bin \ +HOME=3D/home/test \ +USER=3Dtest \ +LOGNAME=3Dtest \ +QEMU_AUDIO_DRV=3Dnone \ +/usr/bin/qemu-system-x86_64 \ +-name guest=3DQEMUGuest1,debug-threads=3Don \ +-S \ +-object secret,id=3DmasterKey0,format=3Draw,\ +file=3D/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ +-machine pc-q35-3.1,accel=3Dtcg,usb=3Doff,dump-guest-core=3Doff \ +-m 214 \ +-realtime mlock=3Doff \ +-smp 1,sockets=3D1,cores=3D1,threads=3D1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=3Dcharmonitor,fd=3D1729,server,nowait \ +-mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol \ +-rtc base=3Dutc \ +-no-shutdown \ +-no-acpi \ +-boot strict=3Don \ +-device pcie-root-port,port=3D0x8,chassis=3D1,id=3Dpci.1,bus=3Dpcie.0,mult= ifunction=3Don,\ +addr=3D0x1 \ +-device pcie-root-port,port=3D0x9,chassis=3D2,id=3Dpci.2,bus=3Dpcie.0,addr= =3D0x1.0x1 \ +-drive file=3D/dev/HostVG/QEMUGuest1,format=3Draw,if=3Dnone,id=3Ddrive-vir= tio-disk0 \ +-device virtio-blk-pci,scsi=3Doff,bus=3Dpci.1,addr=3D0x0,drive=3Ddrive-vir= tio-disk0,\ +id=3Dvirtio-disk0,bootindex=3D1 \ +-sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,\ +resourcecontrol=3Ddeny \ +-msg timestamp=3Don diff --git a/tests/qemuxml2argvdata/virtio-non-transitional.x86_64-latest.a= rgs 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=3DC \ +PATH=3D/bin \ +HOME=3D/home/test \ +USER=3Dtest \ +LOGNAME=3Dtest \ +QEMU_AUDIO_DRV=3Dnone \ +/usr/bin/qemu-system-x86_64 \ +-name guest=3DQEMUGuest1,debug-threads=3Don \ +-S \ +-object secret,id=3DmasterKey0,format=3Draw,\ +file=3D/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ +-machine q35,accel=3Dtcg,usb=3Doff,dump-guest-core=3Doff \ +-m 214 \ +-realtime mlock=3Doff \ +-smp 1,sockets=3D1,cores=3D1,threads=3D1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=3Dcharmonitor,fd=3D1729,server,nowait \ +-mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol \ +-rtc base=3Dutc \ +-no-shutdown \ +-no-acpi \ +-boot strict=3Don \ +-device pcie-root-port,port=3D0x8,chassis=3D1,id=3Dpci.1,bus=3Dpcie.0,mult= ifunction=3Don,\ +addr=3D0x1 \ +-device pcie-root-port,port=3D0x9,chassis=3D2,id=3Dpci.2,bus=3Dpcie.0,addr= =3D0x1.0x1 \ +-drive file=3D/dev/HostVG/QEMUGuest1,format=3Draw,if=3Dnone,id=3Ddrive-vir= tio-disk0 \ +-device virtio-blk-pci,scsi=3Doff,bus=3Dpci.1,addr=3D0x0,drive=3Ddrive-vir= tio-disk0,\ +id=3Dvirtio-disk0,bootindex=3D1 \ +-sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,\ +resourcecontrol=3Ddeny \ +-msg timestamp=3Don diff --git a/tests/qemuxml2argvdata/virtio-non-transitional.xml b/tests/qem= uxml2argvdata/virtio-non-transitional.xml new file mode 100644 index 0000000000..115ae48737 --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-non-transitional.xml @@ -0,0 +1,17 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219136 + + hvm + + + + + + + + + + + diff --git a/tests/qemuxml2argvdata/virtio-transitional.x86_64-3.1.0.args b= /tests/qemuxml2argvdata/virtio-transitional.x86_64-3.1.0.args new file mode 100644 index 0000000000..9e11e900da --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-transitional.x86_64-3.1.0.args @@ -0,0 +1,34 @@ +LC_ALL=3DC \ +PATH=3D/bin \ +HOME=3D/home/test \ +USER=3Dtest \ +LOGNAME=3Dtest \ +QEMU_AUDIO_DRV=3Dnone \ +/usr/bin/qemu-system-x86_64 \ +-name guest=3DQEMUGuest1,debug-threads=3Don \ +-S \ +-object secret,id=3DmasterKey0,format=3Draw,\ +file=3D/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ +-machine pc-q35-3.1,accel=3Dtcg,usb=3Doff,dump-guest-core=3Doff \ +-m 214 \ +-realtime mlock=3Doff \ +-smp 1,sockets=3D1,cores=3D1,threads=3D1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=3Dcharmonitor,fd=3D1729,server,nowait \ +-mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol \ +-rtc base=3Dutc \ +-no-shutdown \ +-no-acpi \ +-boot strict=3Don \ +-device pcie-root-port,port=3D0x8,chassis=3D1,id=3Dpci.1,bus=3Dpcie.0,mult= ifunction=3Don,\ +addr=3D0x1 \ +-device pcie-root-port,port=3D0x9,chassis=3D2,id=3Dpci.2,bus=3Dpcie.0,addr= =3D0x1.0x1 \ +-drive file=3D/dev/HostVG/QEMUGuest1,format=3Draw,if=3Dnone,id=3Ddrive-vir= tio-disk0 \ +-device virtio-blk-pci,scsi=3Doff,bus=3Dpci.1,addr=3D0x0,drive=3Ddrive-vir= tio-disk0,\ +id=3Dvirtio-disk0,bootindex=3D1 \ +-sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,\ +resourcecontrol=3Ddeny \ +-msg timestamp=3Don 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=3DC \ +PATH=3D/bin \ +HOME=3D/home/test \ +USER=3Dtest \ +LOGNAME=3Dtest \ +QEMU_AUDIO_DRV=3Dnone \ +/usr/bin/qemu-system-x86_64 \ +-name guest=3DQEMUGuest1,debug-threads=3Don \ +-S \ +-object secret,id=3DmasterKey0,format=3Draw,\ +file=3D/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ +-machine q35,accel=3Dtcg,usb=3Doff,dump-guest-core=3Doff \ +-m 214 \ +-realtime mlock=3Doff \ +-smp 1,sockets=3D1,cores=3D1,threads=3D1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=3Dcharmonitor,fd=3D1729,server,nowait \ +-mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol \ +-rtc base=3Dutc \ +-no-shutdown \ +-no-acpi \ +-boot strict=3Don \ +-device pcie-root-port,port=3D0x8,chassis=3D1,id=3Dpci.1,bus=3Dpcie.0,mult= ifunction=3Don,\ +addr=3D0x1 \ +-device pcie-root-port,port=3D0x9,chassis=3D2,id=3Dpci.2,bus=3Dpcie.0,addr= =3D0x1.0x1 \ +-drive file=3D/dev/HostVG/QEMUGuest1,format=3Draw,if=3Dnone,id=3Ddrive-vir= tio-disk0 \ +-device virtio-blk-pci,scsi=3Doff,bus=3Dpci.1,addr=3D0x0,drive=3Ddrive-vir= tio-disk0,\ +id=3Dvirtio-disk0,bootindex=3D1 \ +-sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,\ +resourcecontrol=3Ddeny \ +-msg timestamp=3Don diff --git a/tests/qemuxml2argvdata/virtio-transitional.xml b/tests/qemuxml= 2argvdata/virtio-transitional.xml new file mode 100644 index 0000000000..8febfc8423 --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-transitional.xml @@ -0,0 +1,17 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219136 + + hvm + + + + + + + + + + + diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index dd4f73a5fb..de9eb6abdb 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2996,6 +2996,12 @@ mymain(void) DO_TEST("riscv64-virt-pci", QEMU_CAPS_OBJECT_GPEX); =20 + /* Older version checks disable-legacy usage */ + DO_TEST_CAPS_VER("virtio-transitional", "3.1.0"); + DO_TEST_CAPS_VER("virtio-non-transitional", "3.1.0"); + 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/q= emuxml2xmloutdata/virtio-non-transitional.xml new file mode 100644 index 0000000000..7e4aa16b32 --- /dev/null +++ b/tests/qemuxml2xmloutdata/virtio-non-transitional.xml @@ -0,0 +1,42 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219136 + 219136 + 1 + + hvm + + + + destroy + restart + destroy + + /usr/bin/qemu-system-x86_64 + + + + +

+ + + +
+ + + + + +
+ + + + +
+ + + + + + diff --git a/tests/qemuxml2xmloutdata/virtio-transitional.xml b/tests/qemux= ml2xmloutdata/virtio-transitional.xml new file mode 100644 index 0000000000..1d28af9abb --- /dev/null +++ b/tests/qemuxml2xmloutdata/virtio-transitional.xml @@ -0,0 +1,42 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219136 + 219136 + 1 + + hvm + + + + destroy + restart + destroy + + /usr/bin/qemu-system-x86_64 + + + + +
+ + + +
+ + + + + +
+ + + + +
+ + + + + + diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index b38cbd6994..15f0ccffb1 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -1254,6 +1254,17 @@ mymain(void) DO_TEST("riscv64-virt-pci", QEMU_CAPS_OBJECT_GPEX); =20 + DO_TEST("virtio-transitional", + QEMU_CAPS_DEVICE_VIDEO_PRIMARY, + QEMU_CAPS_DEVICE_PCIE_PCI_BRIDGE, + QEMU_CAPS_DEVICE_PCIE_ROOT_PORT, + QEMU_CAPS_VIRTIO_PCI_DISABLE_LEGACY); + DO_TEST("virtio-non-transitional", + QEMU_CAPS_DEVICE_VIDEO_PRIMARY, + QEMU_CAPS_DEVICE_PCIE_PCI_BRIDGE, + QEMU_CAPS_DEVICE_PCIE_ROOT_PORT, + QEMU_CAPS_VIRTIO_PCI_DISABLE_LEGACY); + if (getenv("LIBVIRT_SKIP_CLEANUP") =3D=3D NULL) virFileDeleteTree(fakerootdir); =20 --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list