From patchwork Thu Jan 17 17:52:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 155876 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp2258096jaa; Thu, 17 Jan 2019 09:53:52 -0800 (PST) X-Google-Smtp-Source: ALg8bN4y1abFenj3QoQwuaNsIiobHb6/uSnV5qPprjgkzgr38fkrDL1yBBwjKw/MGl73ANP4cG9/ X-Received: by 2002:a0c:e905:: with SMTP id a5mr11922813qvo.181.1547747632876; Thu, 17 Jan 2019 09:53:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547747632; cv=none; d=google.com; s=arc-20160816; b=fpNHwiCWoWepkdLuet4++we2qVa7SvyMIW6w4man+W+W06pXlgzgYnGYJDbisBEsQD 0axA/qCkVQeoqjCrEsG7By9jGYElFlpcyQI2uoWKZEenJ5feZJ6DHZshJGVcHbpdfIj+ DQrGN7CKpGDIK4wKijL0kKmSXwim1u9vVyoKbXryy94J1yshgMZJg2uEPqt2zOswxwxO z9WkfUNfnIfpgCCeAESMnKGPKCPWvacpC3/0858NUpfwI6fBaG7wPbt1/vJqHi8LsLc8 aBY3ZNlxCq01JpZ0dhZrog57IS2+m1CdGkzfrtzXOY2pP1IcGsQifozbQBscyyicuxou Iv7Q== 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=IuWZXAAU5e/ojYw3k4F8xdbjH3j3jKH4YtvW78iJm6I=; b=AVqY7eUGLwqEtx1qPVrvEuVJrK5xTexdI8vXIDzsEWWgq+RhCtU5NnumVGxAWuKKLX ka0+8LzNbCeBC+3h0cAFNpQ5gqUxgVQ+3rSmRR3ddrPtG49V/uqtxdAX2Xeqh7zlruMq TPb1h75hy6bBn2lw4IC7Vc4mmucTNnhPTzfw56oP+DdYoVo+h9Du1iWIovaJgSrGyq5f l95B95usHz0Oa4JZM9oofMB64vFo3mrqezDboxLC629Ae4GmHfEsP4TpEcFAvemQPIq3 38GwLIhs+wgCBFrjo/Z6Pd2P25F77ry7fgCzqQHhbq7srwGvyu1jH0+y3kh0yxp8lIOh mFZg== 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 k3si6413953qvo.122.2019.01.17.09.53.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Jan 2019 09:53:52 -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-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 41EE0C0C6C28; Thu, 17 Jan 2019 17:53:50 +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 F1653261AC; Thu, 17 Jan 2019 17:53:49 +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 A6EBD3F616; Thu, 17 Jan 2019 17:53:49 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x0HHrKJG005615 for ; Thu, 17 Jan 2019 12:53:20 -0500 Received: by smtp.corp.redhat.com (Postfix) id C8538600D7; Thu, 17 Jan 2019 17:53:20 +0000 (UTC) Delivered-To: libvirt-list@redhat.com Received: from worklaptop.redhat.com (ovpn-122-144.rdu2.redhat.com [10.10.122.144]) by smtp.corp.redhat.com (Postfix) with ESMTP id 519E7600CC; Thu, 17 Jan 2019 17:53:16 +0000 (UTC) From: Cole Robinson To: libvirt-list@redhat.com Date: Thu, 17 Jan 2019 12:52:43 -0500 Message-Id: <4d8c3b45d1e5a667908ab2596b59ef1881625449.1547746868.git.crobinso@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 16/18] 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.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Thu, 17 Jan 2019 17:53:52 +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 | 4 +++- src/conf/domain_conf.h | 2 ++ src/qemu/qemu_capabilities.c | 4 ++++ src/qemu/qemu_capabilities.h | 2 ++ src/qemu/qemu_command.c | 18 +++++++++++++-- src/qemu/qemu_domain.c | 8 ++++++- src/qemu/qemu_domain_address.c | 2 ++ src/vbox/vbox_common.c | 2 ++ src/vmx/vmx.c | 4 +++- .../caps_4.0.0.x86_64.xml | 2 ++ .../virtio-non-transitional.x86_64-3.1.0.args | 17 ++++++++------ ...virtio-non-transitional.x86_64-latest.args | 17 ++++++++------ .../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 | 22 +++++++++++++------ .../virtio-transitional.xml | 15 ++++++++----- tests/qemuxml2xmltest.c | 6 +++-- 21 files changed, 111 insertions(+), 48 deletions(-) -- 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list Signed-off-by: Cole Robinson Signed-off-by: Cole Robinson diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 63bdf2c86b..bdf533ba3e 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -4139,8 +4139,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 58c449ca80..242f237360 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -2152,6 +2152,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 cbba02929c..76955b6d78 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -359,7 +359,9 @@ 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", diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index ded84f52d5..9771b0b3d7 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_capabilities.c b/src/qemu/qemu_capabilities.c index f5b9bc6937..0838f2a406 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -542,6 +542,8 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST, "vhost-vsock-pci-non-transitional", "virtio-input-host-pci-transitional", "virtio-input-host-pci-non-transitional", + "virtio-scsi-pci-transitional", + "virtio-scsi-pci-non-transitional", ); @@ -1146,6 +1148,8 @@ struct virQEMUCapsStringFlags virQEMUCapsObjectTypes[] = { {"vhost-vsock-pci-non-transitional", QEMU_CAPS_DEVICE_VHOST_VSOCK_NON_TRANSITIONAL}, {"virtio-input-host-pci-transitional", QEMU_CAPS_DEVICE_VIRTIO_INPUT_HOST_TRANSITIONAL}, {"virtio-input-host-pci-non-transitional", QEMU_CAPS_DEVICE_VIRTIO_INPUT_HOST_NON_TRANSITIONAL}, + {"virtio-scsi-pci-transitional", QEMU_CAPS_DEVICE_VIRTIO_SCSI_TRANSITIONAL}, + {"virtio-scsi-pci-non-transitional", QEMU_CAPS_DEVICE_VIRTIO_SCSI_NON_TRANSITIONAL}, }; static struct virQEMUCapsStringFlags virQEMUCapsDevicePropsVirtioBalloon[] = { diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index 91aae8df5b..d23bd251f2 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -526,6 +526,8 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */ QEMU_CAPS_DEVICE_VHOST_VSOCK_NON_TRANSITIONAL, /* -device vhost-vsock-pci-non-transitional */ QEMU_CAPS_DEVICE_VIRTIO_INPUT_HOST_TRANSITIONAL, /* -device virtio-input-host-pci-transitional */ QEMU_CAPS_DEVICE_VIRTIO_INPUT_HOST_NON_TRANSITIONAL, /* -device virtio-input-host-pci-non-transitional */ + QEMU_CAPS_DEVICE_VIRTIO_SCSI_TRANSITIONAL, /* -device virtio-scsi-pci-transitional */ + QEMU_CAPS_DEVICE_VIRTIO_SCSI_NON_TRANSITIONAL, /* -device virtio-scsi-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 4d14ac9e5d..50042b2919 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -507,12 +507,20 @@ qemuBuildVirtioTransitional(virBufferPtr buf, tmodel_cap = QEMU_CAPS_DEVICE_VIRTIO_INPUT_HOST_TRANSITIONAL; ntmodel_cap = QEMU_CAPS_DEVICE_VIRTIO_INPUT_HOST_NON_TRANSITIONAL; break; + case VIR_DOMAIN_DEVICE_CONTROLLER: + if (strstr(baseName, "scsi")) { + has_tmodel = model == VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VIRTIO_TRANSITIONAL; + has_ntmodel = model == VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VIRTIO_NON_TRANSITIONAL; + tmodel_cap = QEMU_CAPS_DEVICE_VIRTIO_SCSI_TRANSITIONAL; + ntmodel_cap = QEMU_CAPS_DEVICE_VIRTIO_SCSI_NON_TRANSITIONAL; + break; + } + return 0; case VIR_DOMAIN_DEVICE_LEASE: case VIR_DOMAIN_DEVICE_SOUND: case VIR_DOMAIN_DEVICE_VIDEO: case VIR_DOMAIN_DEVICE_WATCHDOG: - case VIR_DOMAIN_DEVICE_CONTROLLER: case VIR_DOMAIN_DEVICE_GRAPHICS: case VIR_DOMAIN_DEVICE_HUB: case VIR_DOMAIN_DEVICE_REDIRDEV: @@ -2971,8 +2979,14 @@ qemuBuildControllerDevStr(const virDomainDef *domainDef, case VIR_DOMAIN_CONTROLLER_TYPE_SCSI: switch ((virDomainControllerModelSCSI) def->model) { case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VIRTIO_SCSI: - if (qemuBuildVirtioDevStr(&buf, "virtio-scsi", def->info.type) < 0) + case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VIRTIO_TRANSITIONAL: + case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VIRTIO_NON_TRANSITIONAL: + if (qemuBuildVirtioTransitional(&buf, "virtio-scsi", qemuCaps, + def->info.type, + def->model, NULL, + VIR_DOMAIN_DEVICE_CONTROLLER) < 0) { goto error; + } if (def->iothread) { virBufferAsprintf(&buf, ",iothread=iothread%u", diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 6d54727a31..85f7b6a4c8 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -4972,7 +4972,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")); @@ -5026,6 +5028,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 " @@ -5141,6 +5145,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 70591dce25..9d07fa133e 100644 --- a/src/qemu/qemu_domain_address.c +++ b/src/qemu/qemu_domain_address.c @@ -651,8 +651,10 @@ qemuDomainDeviceCalculatePCIConnectFlags(virDomainDeviceDefPtr dev, return 0; case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VIRTIO_SCSI: + case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VIRTIO_NON_TRANSITIONAL: return virtioFlags; + 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..a853c05e86 100644 --- a/src/vmx/vmx.c +++ b/src/vmx/vmx.c @@ -517,7 +517,9 @@ 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/qemucapabilitiesdata/caps_4.0.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml index d5bbbc40f7..aa9a0d2d3b 100644 --- a/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml @@ -228,6 +228,8 @@ + + 3001050 0 446361 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 fc183757b0..6fea53fa6e 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 @@ -32,9 +32,12 @@ addr=0x1 \ -device pcie-root-port,port=0xd,chassis=6,id=pci.6,bus=pcie.0,addr=0x1.0x5 \ -device pcie-root-port,port=0xe,chassis=7,id=pci.7,bus=pcie.0,addr=0x1.0x6 \ -device pcie-root-port,port=0xf,chassis=8,id=pci.8,bus=pcie.0,addr=0x1.0x7 \ --device pcie-root-port,port=0x10,chassis=9,id=pci.9,bus=pcie.0,addr=0x2 \ +-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 virtio-scsi-pci,disable-legacy=on,id=scsi0,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,scsi=off,bus=pci.3,addr=0x0,\ +-device virtio-blk-pci,disable-legacy=on,scsi=off,bus=pci.4,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,id=fs0,fsdev=fsdev-fs0,mount_tag=fs1,\ @@ -43,15 +46,15 @@ bus=pci.1,addr=0x0 \ -device virtio-net-pci,disable-legacy=on,netdev=hostnet0,id=net0,\ mac=00:11:22:33:44:55,bus=pci.2,addr=0x0 \ -device virtio-input-host-pci,disable-legacy=on,id=input0,\ -evdev=/dev/input/event1234,bus=pci.7,addr=0x0 \ +evdev=/dev/input/event1234,bus=pci.8,addr=0x0 \ -device vhost-scsi-pci,disable-legacy=on,wwpn=naa.5123456789abcde0,vhostfd=3,\ -id=hostdev0,bus=pci.4,addr=0x0 \ --device virtio-balloon-pci,disable-legacy=on,id=balloon0,bus=pci.5,addr=0x0 \ +id=hostdev0,bus=pci.5,addr=0x0 \ +-device virtio-balloon-pci,disable-legacy=on,id=balloon0,bus=pci.6,addr=0x0 \ -object rng-random,id=objrng0,filename=/dev/urandom \ --device virtio-rng-pci,disable-legacy=on,rng=objrng0,id=rng0,bus=pci.6,\ +-device virtio-rng-pci,disable-legacy=on,rng=objrng0,id=rng0,bus=pci.7,\ addr=0x0 \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\ resourcecontrol=deny \ -device vhost-vsock-pci,disable-legacy=on,id=vsock0,guest-cid=4,vhostfd=6789,\ -bus=pci.8,addr=0x0 \ +bus=pci.9,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 383b29f629..ad644de35d 100644 --- a/tests/qemuxml2argvdata/virtio-non-transitional.x86_64-latest.args +++ b/tests/qemuxml2argvdata/virtio-non-transitional.x86_64-latest.args @@ -32,9 +32,12 @@ addr=0x1 \ -device pcie-root-port,port=0xd,chassis=6,id=pci.6,bus=pcie.0,addr=0x1.0x5 \ -device pcie-root-port,port=0xe,chassis=7,id=pci.7,bus=pcie.0,addr=0x1.0x6 \ -device pcie-root-port,port=0xf,chassis=8,id=pci.8,bus=pcie.0,addr=0x1.0x7 \ --device pcie-root-port,port=0x10,chassis=9,id=pci.9,bus=pcie.0,addr=0x2 \ +-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 virtio-scsi-pci-non-transitional,id=scsi0,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.3,addr=0x0,\ +-device virtio-blk-pci-non-transitional,scsi=off,bus=pci.4,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,\ @@ -43,14 +46,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.7,addr=0x0 \ +evdev=/dev/input/event1234,bus=pci.8,addr=0x0 \ -device vhost-scsi-pci-non-transitional,wwpn=naa.5123456789abcde0,vhostfd=3,\ -id=hostdev0,bus=pci.4,addr=0x0 \ --device virtio-balloon-pci-non-transitional,id=balloon0,bus=pci.5,addr=0x0 \ +id=hostdev0,bus=pci.5,addr=0x0 \ +-device virtio-balloon-pci-non-transitional,id=balloon0,bus=pci.6,addr=0x0 \ -object rng-random,id=objrng0,filename=/dev/urandom \ --device virtio-rng-pci-non-transitional,rng=objrng0,id=rng0,bus=pci.6,addr=0x0 \ +-device virtio-rng-pci-non-transitional,rng=objrng0,id=rng0,bus=pci.7,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.8,addr=0x0 \ +bus=pci.9,addr=0x0 \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/virtio-non-transitional.xml b/tests/qemuxml2argvdata/virtio-non-transitional.xml index 596aa1015b..03273dc2d9 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 8046e5c102..e8b3712acb 100644 --- a/tests/qemuxml2argvdata/virtio-transitional.x86_64-3.1.0.args +++ b/tests/qemuxml2argvdata/virtio-transitional.x86_64-3.1.0.args @@ -27,8 +27,9 @@ 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=0x3 \ -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-virtio-disk0 \ --device virtio-blk-pci,scsi=off,bus=pci.2,addr=0x3,drive=drive-virtio-disk0,\ +-device virtio-blk-pci,scsi=off,bus=pci.2,addr=0x4,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 \ @@ -36,13 +37,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=0x7 \ +addr=0x8 \ -device vhost-scsi-pci,wwpn=naa.5123456789abcde0,vhostfd=3,id=hostdev0,\ -bus=pci.2,addr=0x4 \ --device virtio-balloon-pci,id=balloon0,bus=pci.2,addr=0x5 \ +bus=pci.2,addr=0x5 \ +-device virtio-balloon-pci,id=balloon0,bus=pci.2,addr=0x6 \ -object rng-random,id=objrng0,filename=/dev/urandom \ --device virtio-rng-pci,rng=objrng0,id=rng0,bus=pci.2,addr=0x6 \ +-device virtio-rng-pci,rng=objrng0,id=rng0,bus=pci.2,addr=0x7 \ -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=0x8 \ +-device vhost-vsock-pci,id=vsock0,guest-cid=4,vhostfd=6789,bus=pci.2,addr=0x9 \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/virtio-transitional.x86_64-latest.args b/tests/qemuxml2argvdata/virtio-transitional.x86_64-latest.args index 410eb28f0a..95d20f8579 100644 --- a/tests/qemuxml2argvdata/virtio-transitional.x86_64-latest.args +++ b/tests/qemuxml2argvdata/virtio-transitional.x86_64-latest.args @@ -27,8 +27,9 @@ 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=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=0x3,\ +-device virtio-blk-pci-transitional,scsi=off,bus=pci.2,addr=0x4,\ 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,\ @@ -37,14 +38,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=0x7 \ +evdev=/dev/input/event1234,bus=pci.2,addr=0x8 \ -device vhost-scsi-pci-transitional,wwpn=naa.5123456789abcde0,vhostfd=3,\ -id=hostdev0,bus=pci.2,addr=0x4 \ --device virtio-balloon-pci-transitional,id=balloon0,bus=pci.2,addr=0x5 \ +id=hostdev0,bus=pci.2,addr=0x5 \ +-device virtio-balloon-pci-transitional,id=balloon0,bus=pci.2,addr=0x6 \ -object rng-random,id=objrng0,filename=/dev/urandom \ --device virtio-rng-pci-transitional,rng=objrng0,id=rng0,bus=pci.2,addr=0x6 \ +-device virtio-rng-pci-transitional,rng=objrng0,id=rng0,bus=pci.2,addr=0x7 \ -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=0x8 \ +bus=pci.2,addr=0x9 \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/virtio-transitional.xml b/tests/qemuxml2argvdata/virtio-transitional.xml index 90fba68d9f..1616cb137b 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 b6e762c0a7..56b673d7fa 100644 --- a/tests/qemuxml2xmloutdata/virtio-non-transitional.xml +++ b/tests/qemuxml2xmloutdata/virtio-non-transitional.xml @@ -18,8 +18,11 @@ -
+
+ +
+
@@ -68,7 +71,12 @@ -
+
+ + + + +
@@ -82,24 +90,24 @@ -
+
-
+
-
+
/dev/urandom -
+
-
+
diff --git a/tests/qemuxml2xmloutdata/virtio-transitional.xml b/tests/qemuxml2xmloutdata/virtio-transitional.xml index 9fa9732c2d..cf6c43bcb0 100644 --- a/tests/qemuxml2xmloutdata/virtio-transitional.xml +++ b/tests/qemuxml2xmloutdata/virtio-transitional.xml @@ -18,8 +18,11 @@ -
+
+ +
+
@@ -51,24 +54,24 @@ -
+
-
+
-
+
/dev/urandom -
+
-
+
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 9fe2b8e8a2..114ceca16c 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -1271,14 +1271,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);