From patchwork Wed Jan 23 21:32:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 156421 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp1202419jaa; Wed, 23 Jan 2019 13:34:32 -0800 (PST) X-Google-Smtp-Source: ALg8bN4xDG1KHsDLuIfy/aq/917hBvxjsFT/UKNj353vSYk8SP1Z0WDMMyfOy0lZKIhU3BNHbLFc X-Received: by 2002:aed:2f82:: with SMTP id m2mr4260401qtd.4.1548279272609; Wed, 23 Jan 2019 13:34:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548279272; cv=none; d=google.com; s=arc-20160816; b=PQEhNYqcHybUuoZm9/TTs137gyt0vAlE0VuMHfTrH9QVhE6QZIN8jY4VtRKPKZp4R0 /8DLPrSqHcybRCzxNNe4kiSyPNuPz84xGjR016Qhs6S9QejLWyvqBPN9NFHTHMZO0Dwp Bh3QUZ75lA61tlCRT3NDU8qOqWA31Dfac/a+U3RchJaCLR03UflimdFMW+xkbM2pCCMY IQ7/9c01fhW9oxPglSVh8M5dzi5D5Ynt4x8SBh5RrO951C5SjVBTyEOR9OL38awwUwbw 9smP+iL2EnuHHpFRfy5NhnenmP4vM8I4MGUFcVkg20wXrD/J5DyOvXQ6LaUHh/LnL8xY XywA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :delivered-to; bh=Of0L5rnNefb3VZR84L2H2KHkM96WrkIAZ6ol64z+POg=; b=kN6NOHrlLgdHm+06kMdrOXO7dScg3/GsN/T/cnZPV4UAUk4gJ20ppRnDImLCtrTYY4 GoyXTxQXCkKqqIdsi1uXVdkYA5Q6zaomsdbwe80gPj1sHJPY5AQ4CK+Ei5NAGDt460KQ 8+K5+uK0pogw243CNdPd8dcXC/WBIHpJvhMF8rdJgU0LYSgxQPy0rp5IKoxo6bD2sBP0 shuILWt7k9kaN2vgReo79BhVvw25GqGigUzY3UH1e3spfcWPfD6100CsaXzns32gzZeb ne5YTi8PkGIZMpx6x4QOBv7vTzA3ruHcrjU3XtHIiH0OQqtgjary+P6G0uPz+qRjfvZ1 sY5A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com. [209.132.183.28]) by mx.google.com with ESMTPS id u15si5436926qki.238.2019.01.23.13.34.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 23 Jan 2019 13:34:32 -0800 (PST) Received-SPF: pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; Authentication-Results: mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com 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 AF68A7E9CC; Wed, 23 Jan 2019 21:34:30 +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 52B5968866; Wed, 23 Jan 2019 21:34:30 +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 F3BA23F60F; Wed, 23 Jan 2019 21:34:28 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x0NLYHXO032705 for ; Wed, 23 Jan 2019 16:34:17 -0500 Received: by smtp.corp.redhat.com (Postfix) id B4578BA8B; Wed, 23 Jan 2019 21:34:17 +0000 (UTC) Delivered-To: libvirt-list@redhat.com Received: from worklaptop.redhat.com (ovpn-120-34.rdu2.redhat.com [10.10.120.34]) by smtp.corp.redhat.com (Postfix) with ESMTP id E7AEB13ABE; Wed, 23 Jan 2019 21:34:16 +0000 (UTC) From: Cole Robinson To: libvirt-list@redhat.com Date: Wed, 23 Jan 2019 16:32:52 -0500 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 24/25] qemu: Support scsi controller model=virtio-{non-}transitional 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: , 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]); Wed, 23 Jan 2019 21:34:31 +0000 (UTC) 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. Signed-off-by: Cole Robinson --- docs/formatdomain.html.in | 4 ++-- docs/schemas/domaincommon.rng | 2 ++ src/conf/domain_conf.c | 14 ++++++++----- src/conf/domain_conf.h | 2 ++ src/qemu/qemu_command.c | 7 +++++++ 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 | 13 ++++++------ .../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, 98 insertions(+), 47 deletions(-) -- 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index b820adbc8a..3c0a30cc35 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -4141,8 +4141,8 @@
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'
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 1c83281ad2..b875b11789 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -2153,6 +2153,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 4518f426b2..8ade2022ed 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -359,7 +359,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", @@ -4859,11 +4862,12 @@ virDomainDeviceDefPostParseCommon(virDomainDeviceDefPtr dev, virDomainControllerDefPtr cdev = dev->data.controller; 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 804e6900e9..cb1d18df8f 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 ea40494143..b07e0fbbba 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -531,6 +531,11 @@ qemuBuildVirtioDevStr(virBufferPtr buf, has_ntmodel = device.data.controller->model == VIR_DOMAIN_CONTROLLER_MODEL_VIRTIO_SERIAL_VIRTIO_NON_TRANSITIONAL; tmodel_cap = QEMU_CAPS_DEVICE_VIRTIO_SERIAL_PCI_TRANSITIONAL; ntmodel_cap = QEMU_CAPS_DEVICE_VIRTIO_SERIAL_PCI_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; + tmodel_cap = QEMU_CAPS_DEVICE_VIRTIO_SCSI_PCI_TRANSITIONAL; + ntmodel_cap = QEMU_CAPS_DEVICE_VIRTIO_SCSI_PCI_NON_TRANSITIONAL; } else { return 0; } @@ -2997,6 +3002,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 0634ed6f39..8991d4c804 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -5091,7 +5091,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")); @@ -5145,6 +5147,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 " @@ -5260,6 +5264,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 6ecbb6defc..22312cfd53 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 664650f217..00d43d9a83 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 92601291fd..6b16d74c1d 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 a873821e4a..c5a4fc1eef 100644 --- a/tests/qemuxml2argvdata/virtio-non-transitional.xml +++ b/tests/qemuxml2argvdata/virtio-non-transitional.xml @@ -30,6 +30,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 5b58af88df..71402f70f1 100644 --- a/tests/qemuxml2argvdata/virtio-transitional.x86_64-3.1.0.args +++ b/tests/qemuxml2argvdata/virtio-transitional.x86_64-3.1.0.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,id=scsi0,bus=pci.2,addr=0x4 \ -device virtio-serial-pci,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,scsi=off,bus=pci.2,addr=0x4,drive=drive-virtio-disk0,\ +-device virtio-blk-pci,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,id=fs0,fsdev=fsdev-fs0,mount_tag=fs1,bus=pci.2,addr=0x1 \ @@ -37,13 +38,13 @@ id=virtio-disk0,bootindex=1 \ -device virtio-net-pci,netdev=hostnet0,id=net0,mac=00:11:22:33:44:55,bus=pci.2,\ addr=0x2 \ -device virtio-input-host-pci,id=input0,evdev=/dev/input/event1234,bus=pci.2,\ -addr=0x8 \ +addr=0x9 \ -device vhost-scsi-pci,wwpn=naa.5123456789abcde0,vhostfd=3,id=hostdev0,\ -bus=pci.2,addr=0x5 \ --device virtio-balloon-pci,id=balloon0,bus=pci.2,addr=0x6 \ +bus=pci.2,addr=0x6 \ +-device virtio-balloon-pci,id=balloon0,bus=pci.2,addr=0x7 \ -object rng-random,id=objrng0,filename=/dev/urandom \ --device virtio-rng-pci,rng=objrng0,id=rng0,bus=pci.2,addr=0x7 \ +-device virtio-rng-pci,rng=objrng0,id=rng0,bus=pci.2,addr=0x8 \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\ resourcecontrol=deny \ --device vhost-vsock-pci,id=vsock0,guest-cid=4,vhostfd=6789,bus=pci.2,addr=0x9 \ +-device vhost-vsock-pci,id=vsock0,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 fa1cccce64..4ca21977eb 100644 --- a/tests/qemuxml2argvdata/virtio-transitional.xml +++ b/tests/qemuxml2argvdata/virtio-transitional.xml @@ -30,6 +30,7 @@ + diff --git a/tests/qemuxml2xmloutdata/virtio-non-transitional.xml b/tests/qemuxml2xmloutdata/virtio-non-transitional.xml index 11496d872d..11e1420733 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 c8edb4723c..e9c910d06c 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 be8ef921ee..b2eee794de 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -1274,14 +1274,16 @@ mymain(void) QEMU_CAPS_DEVICE_PCIE_ROOT_PORT, 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, QEMU_CAPS_DEVICE_PCIE_ROOT_PORT, 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);