From patchwork Fri Feb 8 22:11: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: 157872
Delivered-To: patch@linaro.org
Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp917jaa;
Fri, 8 Feb 2019 14:12:28 -0800 (PST)
X-Google-Smtp-Source: AHgI3IbERbWXeyX0dTsiEn+Rq8qxIo2/phw7DkOMoXcGoGXRmRZAOsJgLftETkH8lq6QUTTMLVJx
X-Received: by 2002:ac8:1702:: with SMTP id w2mr5197036qtj.164.1549663947777;
Fri, 08 Feb 2019 14:12:27 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1549663947; cv=none;
d=google.com; s=arc-20160816;
b=Jm6Nshqt0PQkrSejatacwlJp7Z7Wk5pP9WWwBDsqtVJXPEPiG0pijaUlEo04gQLFWA
X8FQbRfwMP3dnwiTSMwxr0La9FbmcPVHfiNXyfib7JBwUF2VDFJFb4cWavdlhR/8lLA9
aeSVdjcMkco4UlRcysnwB1k79puW9AzhdRBxShn+8py8VFZw85VsDGlBZF3j2uurZm4K
czsYGY5+0Wcp2YhYa7ifv7ZIwj15nnl8Oa1fVwy9bcKoU4LXBgHpXbr0CEE1lt64MVEd
iiUMGR738/SU76BMnXq8yoOu0D9i0V4ICcwktjy+ButJ/vM9JP8dNbJOojp2zNuCZWTA
RAKQ==
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
:cc:mime-version:references:in-reply-to:message-id:date:to:from
:delivered-to;
bh=B5woJz2t6W4TlgoRa0ZdHQh+YSJqo4/VAfuxLdhtek8=;
b=uPo3T07e5zDCBVChDQVA+EQMCrYlUUSxWno/gl89GIrGVGvk7E5fNFIXqdyT3/qwuX
UcCcjDnieVos4Cu+SlC/oDSYRvN2uPKpHUfXi3+FC2t+1xqUWBatmoTz5OqisA2VpVUN
7eIXVQ7+QnzPUFk9q/om5oJJ9iO5US1FFO3js5A8yIh8xlbxM1o9XG4xPIPpiDwWEb3l
IqWxby7bJXAi6YYxIgFQCkJFPmckzG+KZJIuULooH7YrCUzKWC87OiBmlENbpUs3PXCI
lOhfHlcGoONIJXs8m7kIZbx2AaGPIyjDsej7ZXJX/fqi4OYNwqEzxXkEiDo1QWJHYWLm
iz9g==
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
i14si2324944qkg.219.2019.02.08.14.12.27
(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
Fri, 08 Feb 2019 14:12:27 -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-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15])
(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
(No client certificate requested)
by mx1.redhat.com (Postfix) with ESMTPS id E4E9959450;
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 2C1455B682;
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 18BED3F7D0;
Fri, 8 Feb 2019 22:12:20 +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 x18MCJau008383 for ;
Fri, 8 Feb 2019 17:12:19 -0500
Received: by smtp.corp.redhat.com (Postfix)
id 91E8A5C6A6; Fri, 8 Feb 2019 22:12:19 +0000 (UTC)
Delivered-To: libvirt-list@redhat.com
Received: from worklaptop.redhat.com (ovpn-123-115.rdu2.redhat.com
[10.10.123.115])
by smtp.corp.redhat.com (Postfix) with ESMTP id 1B37B5C6A5;
Fri, 8 Feb 2019 22:12:19 +0000 (UTC)
From: Cole Robinson
To: libvirt-list@redhat.com
Date: Fri, 8 Feb 2019 17:11:52 -0500
Message-Id: <68983230e2f6aad3b1e1e9178f689de5172833b9.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
Cc: Andrea Bolognani
Subject: [libvirt] [PATCH v3 01/17] qemu: command: Add qemuCaps to
BuildVirtioStr
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.15
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16
(mx1.redhat.com [10.5.110.39]);
Fri, 08 Feb 2019 22:12:26 +0000 (UTC)
It will be used in future patches
Reviewed-by: Andrea Bolognani
Signed-off-by: Cole Robinson
---
src/qemu/qemu_command.c | 30 ++++++++++++++++--------------
1 file changed, 16 insertions(+), 14 deletions(-)
--
2.20.1
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 572d3bc20f..a26f6291ac 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -409,6 +409,7 @@ qemuBuildDeviceAddressStr(virBufferPtr buf,
* qemuBuildVirtioDevStr
* @buf: virBufferPtr to append the built string
* @baseName: qemu virtio device basename string. Ex: virtio-rng for
+ * @qemuCaps: virQEMUCapPtr
* @devtype: virDomainDeviceType of the device. Ex: VIR_DOMAIN_DEVICE_TYPE_RNG
* @devdata: *DefPtr of the device definition
*
@@ -422,6 +423,7 @@ qemuBuildDeviceAddressStr(virBufferPtr buf,
static int
qemuBuildVirtioDevStr(virBufferPtr buf,
const char *baseName,
+ virQEMUCapsPtr qemuCaps ATTRIBUTE_UNUSED,
virDomainDeviceType devtype,
void *devdata)
{
@@ -2078,7 +2080,7 @@ qemuBuildDiskDeviceStr(const virDomainDef *def,
break;
case VIR_DOMAIN_DISK_BUS_VIRTIO:
- if (qemuBuildVirtioDevStr(&opt, "virtio-blk",
+ if (qemuBuildVirtioDevStr(&opt, "virtio-blk", qemuCaps,
VIR_DOMAIN_DEVICE_DISK, disk) < 0) {
goto error;
}
@@ -2673,7 +2675,7 @@ qemuBuildFSDevStr(const virDomainDef *def,
goto error;
}
- if (qemuBuildVirtioDevStr(&opt, "virtio-9p",
+ if (qemuBuildVirtioDevStr(&opt, "virtio-9p", qemuCaps,
VIR_DOMAIN_DEVICE_FS, fs) < 0) {
goto error;
}
@@ -2880,7 +2882,7 @@ 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",
+ if (qemuBuildVirtioDevStr(&buf, "virtio-scsi", qemuCaps,
VIR_DOMAIN_DEVICE_CONTROLLER, def) < 0) {
goto error;
}
@@ -2923,7 +2925,7 @@ qemuBuildControllerDevStr(const virDomainDef *domainDef,
break;
case VIR_DOMAIN_CONTROLLER_TYPE_VIRTIO_SERIAL:
- if (qemuBuildVirtioDevStr(&buf, "virtio-serial",
+ if (qemuBuildVirtioDevStr(&buf, "virtio-serial", qemuCaps,
VIR_DOMAIN_DEVICE_CONTROLLER, def) < 0) {
goto error;
}
@@ -3745,7 +3747,7 @@ qemuBuildNicDevStr(virDomainDefPtr def,
char macaddr[VIR_MAC_STRING_BUFLEN];
if (virDomainNetIsVirtioModel(net)) {
- if (qemuBuildVirtioDevStr(&buf, "virtio-net",
+ if (qemuBuildVirtioDevStr(&buf, "virtio-net", qemuCaps,
VIR_DOMAIN_DEVICE_NET, net) < 0) {
goto error;
}
@@ -4141,7 +4143,7 @@ qemuBuildMemballoonCommandLine(virCommandPtr cmd,
if (!virDomainDefHasMemballoon(def))
return 0;
- if (qemuBuildVirtioDevStr(&buf, "virtio-balloon",
+ if (qemuBuildVirtioDevStr(&buf, "virtio-balloon", qemuCaps,
VIR_DOMAIN_DEVICE_MEMBALLOON,
def->memballoon) < 0) {
goto error;
@@ -4241,25 +4243,25 @@ qemuBuildVirtioInputDevStr(const virDomainDef *def,
switch ((virDomainInputType)dev->type) {
case VIR_DOMAIN_INPUT_TYPE_MOUSE:
- if (qemuBuildVirtioDevStr(&buf, "virtio-mouse",
+ if (qemuBuildVirtioDevStr(&buf, "virtio-mouse", qemuCaps,
VIR_DOMAIN_DEVICE_INPUT, dev) < 0) {
goto error;
}
break;
case VIR_DOMAIN_INPUT_TYPE_TABLET:
- if (qemuBuildVirtioDevStr(&buf, "virtio-tablet",
+ if (qemuBuildVirtioDevStr(&buf, "virtio-tablet", qemuCaps,
VIR_DOMAIN_DEVICE_INPUT, dev) < 0) {
goto error;
}
break;
case VIR_DOMAIN_INPUT_TYPE_KBD:
- if (qemuBuildVirtioDevStr(&buf, "virtio-keyboard",
+ if (qemuBuildVirtioDevStr(&buf, "virtio-keyboard", qemuCaps,
VIR_DOMAIN_DEVICE_INPUT, dev) < 0) {
goto error;
}
break;
case VIR_DOMAIN_INPUT_TYPE_PASSTHROUGH:
- if (qemuBuildVirtioDevStr(&buf, "virtio-input-host",
+ if (qemuBuildVirtioDevStr(&buf, "virtio-input-host", qemuCaps,
VIR_DOMAIN_DEVICE_INPUT, dev) < 0) {
goto error;
}
@@ -4580,7 +4582,7 @@ qemuBuildDeviceVideoStr(const virDomainDef *def,
}
if (STREQ(model, "virtio-gpu")) {
- if (qemuBuildVirtioDevStr(&buf, "virtio-gpu",
+ if (qemuBuildVirtioDevStr(&buf, "virtio-gpu", qemuCaps,
VIR_DOMAIN_DEVICE_VIDEO, video) < 0) {
goto error;
}
@@ -5028,7 +5030,7 @@ qemuBuildSCSIVHostHostdevDevStr(const virDomainDef *def,
goto cleanup;
}
- if (qemuBuildVirtioDevStr(&buf, "vhost-scsi",
+ if (qemuBuildVirtioDevStr(&buf, "vhost-scsi", qemuCaps,
VIR_DOMAIN_DEVICE_HOSTDEV, dev) < 0) {
goto cleanup;
}
@@ -5978,7 +5980,7 @@ qemuBuildRNGDevStr(const virDomainDef *def,
dev->source.file))
goto error;
- if (qemuBuildVirtioDevStr(&buf, "virtio-rng",
+ if (qemuBuildVirtioDevStr(&buf, "virtio-rng", qemuCaps,
VIR_DOMAIN_DEVICE_RNG, dev) < 0) {
goto error;
}
@@ -10449,7 +10451,7 @@ qemuBuildVsockDevStr(virDomainDefPtr def,
char *ret = NULL;
- if (qemuBuildVirtioDevStr(&buf, "vhost-vsock",
+ if (qemuBuildVirtioDevStr(&buf, "vhost-vsock", qemuCaps,
VIR_DOMAIN_DEVICE_VSOCK, vsock) < 0) {
goto cleanup;
}
From patchwork Fri Feb 8 22:11:53 2019
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Cole Robinson
X-Patchwork-Id: 157875
Delivered-To: patch@linaro.org
Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp1248jaa;
Fri, 8 Feb 2019 14:12:46 -0800 (PST)
X-Google-Smtp-Source: AHgI3Iaxl3Tv4o9OocjqHn/jgodUiYFWBKN5/+zj4qo5uZFtHKnjLS0w6Y2mQlo/4ZCvK308i4jf
X-Received: by 2002:a0c:8aa1:: with SMTP id 30mr2308114qvv.1.1549663966836;
Fri, 08 Feb 2019 14:12:46 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1549663966; cv=none;
d=google.com; s=arc-20160816;
b=A2M576Up8CP8tYn51OQAqFO/NnZJ4q9saPV/2K806Si8jt443G9RBNmhb0Y8QQxwhp
pDtFN7JVMXmi2AXBGrEiOV1qGg4tBC0B1khLqZiv6xuCVQCPu7K1XKhUUeEmao8XNOIr
ESCqdYxh9z/612fS8OqgytSc2D+xNMPOubs5fmCzCu+kFc7TAHxzS+iSUvvO9qY9TeK6
YVZXlrOX7Cbz3Dtin4w4nxnsZ7Bzo+UwA6ZdexbFJS45VcekDOb8fLfa8zT50iNMGQvH
RrVl5ZGJMkunUxoP7UCTE/kWU2NTe1paieQchNz4Jr8gXVz+dNiC+MkdnhNDXl9pkQ1a
A0Tg==
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=sCXpi/3ZdSra2wuCPSYtAfdsuafXTlRfCLmTw6eyYj0=;
b=gaRarhRlNuVJAPD1aK8uIHH5uq8Io8b542871fOL5aNwPJb0+3qnbyi3+KuP4ut8Gc
hgKEF87vvh2ykvKguGE+GFfHA9jl8IOtiSG3Vj5jMRysfoOvk0QjNEoZo2QUqNYamu1P
1s1gijxPLPuudX040cqg4YGKXJVVvuKFOqFnNVip+CqOoiFxrk9EKsYzbDXEQzUh9WqP
yB7V2Swzwu89JC3TUk62eAqS8sWOXqreUwgjNBui5ysFk71EFTZkJ9cjx69nn/YnsUTw
8GZgDo3X6Y2O9Kev2cAFqI5lfmyYGecdJqHFKAZnkomHTAkdqOoutz0eamrf2ZBRjj0S
oncw==
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
u2si2358409qka.125.2019.02.08.14.12.46
(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
Fri, 08 Feb 2019 14:12:46 -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-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12])
(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
(No client certificate requested)
by mx1.redhat.com (Postfix) with ESMTPS id 6F493C051671;
Fri, 8 Feb 2019 22:12:45 +0000 (UTC)
Received: from colo-mx.corp.redhat.com
(colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20])
by smtp.corp.redhat.com (Postfix) with ESMTPS id 367836116C;
Fri, 8 Feb 2019 22:12:45 +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 D80FB1803390;
Fri, 8 Feb 2019 22:12:44 +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 x18MCKVC008388 for ;
Fri, 8 Feb 2019 17:12:20 -0500
Received: by smtp.corp.redhat.com (Postfix)
id 321975C557; Fri, 8 Feb 2019 22:12:20 +0000 (UTC)
Delivered-To: libvirt-list@redhat.com
Received: from worklaptop.redhat.com (ovpn-123-115.rdu2.redhat.com
[10.10.123.115])
by smtp.corp.redhat.com (Postfix) with ESMTP id BF2675C6A5;
Fri, 8 Feb 2019 22:12:19 +0000 (UTC)
From: Cole Robinson
To: libvirt-list@redhat.com
Date: Fri, 8 Feb 2019 17:11:53 -0500
Message-Id: <4647912f8705da4ba81e011e0dd652e1bfdf1ee2.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 02/17] qemu: capabilities: Add virtio/vhost
{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.12
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16
(mx1.redhat.com [10.5.110.31]);
Fri, 08 Feb 2019 22:12:46 +0000 (UTC)
Add a single QEMU_CAPS_VIRTIO_PCI_NON_TRANSITIONAL that
will be set if any of the following qemu devices are found:
virtio-blk-pci-transitional
virtio-blk-pci-non-transitional
virtio-net-pci-transitional
virtio-net-pci-non-transitional
vhost-scsi-pci-transitional
vhost-scsi-pci-non-transitional
virtio-rng-pci-transitional
virtio-rng-pci-non-transitional
virtio-9p-pci-transitional
virtio-9p-pci-non-transitional
virtio-balloon-pci-transitional
virtio-balloon-pci-non-transitional
vhost-vsock-pci-transitional
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
virtio-serial-pci-transitional
virtio-serial-pci-non-transitional
Signed-off-by: Cole Robinson
---
src/qemu/qemu_capabilities.c | 21 +++++++++++++++++++
src/qemu/qemu_capabilities.h | 1 +
.../caps_4.0.0.riscv32.xml | 1 +
.../caps_4.0.0.riscv64.xml | 1 +
.../caps_4.0.0.x86_64.xml | 1 +
5 files changed, 25 insertions(+)
--
2.20.1
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index f035e68251..8e42c1c51c 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -525,6 +525,7 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST,
"memory-backend-file.pmem",
"nvdimm.unarmed",
"scsi-disk.device_id",
+ "virtio-pci-non-transitional",
);
@@ -1102,6 +1103,26 @@ struct virQEMUCapsStringFlags virQEMUCapsObjectTypes[] = {
{ "vfio-ap", QEMU_CAPS_DEVICE_VFIO_AP },
{ "zpci", QEMU_CAPS_DEVICE_ZPCI },
{ "memory-backend-memfd", QEMU_CAPS_OBJECT_MEMORY_MEMFD },
+ { "virtio-blk-pci-transitional", QEMU_CAPS_VIRTIO_PCI_NON_TRANSITIONAL },
+ { "virtio-blk-pci-non-transitional", QEMU_CAPS_VIRTIO_PCI_NON_TRANSITIONAL },
+ { "virtio-net-pci-transitional", QEMU_CAPS_VIRTIO_PCI_NON_TRANSITIONAL },
+ { "virtio-net-pci-non-transitional", QEMU_CAPS_VIRTIO_PCI_NON_TRANSITIONAL },
+ { "vhost-scsi-pci-transitional", QEMU_CAPS_VIRTIO_PCI_NON_TRANSITIONAL },
+ { "vhost-scsi-pci-non-transitional", QEMU_CAPS_VIRTIO_PCI_NON_TRANSITIONAL },
+ { "virtio-rng-pci-transitional", QEMU_CAPS_VIRTIO_PCI_NON_TRANSITIONAL },
+ { "virtio-rng-pci-non-transitional", QEMU_CAPS_VIRTIO_PCI_NON_TRANSITIONAL },
+ { "virtio-9p-pci-transitional", QEMU_CAPS_VIRTIO_PCI_NON_TRANSITIONAL },
+ { "virtio-9p-pci-non-transitional", QEMU_CAPS_VIRTIO_PCI_NON_TRANSITIONAL },
+ { "virtio-balloon-pci-transitional", QEMU_CAPS_VIRTIO_PCI_NON_TRANSITIONAL },
+ { "virtio-balloon-pci-non-transitional", QEMU_CAPS_VIRTIO_PCI_NON_TRANSITIONAL },
+ { "vhost-vsock-pci-transitional", QEMU_CAPS_VIRTIO_PCI_NON_TRANSITIONAL },
+ { "vhost-vsock-pci-non-transitional", QEMU_CAPS_VIRTIO_PCI_NON_TRANSITIONAL },
+ { "virtio-input-host-pci-transitional", QEMU_CAPS_VIRTIO_PCI_NON_TRANSITIONAL },
+ { "virtio-input-host-pci-non-transitional", QEMU_CAPS_VIRTIO_PCI_NON_TRANSITIONAL },
+ { "virtio-scsi-pci-transitional", QEMU_CAPS_VIRTIO_PCI_NON_TRANSITIONAL },
+ { "virtio-scsi-pci-non-transitional", QEMU_CAPS_VIRTIO_PCI_NON_TRANSITIONAL },
+ { "virtio-serial-pci-transitional", QEMU_CAPS_VIRTIO_PCI_NON_TRANSITIONAL },
+ { "virtio-serial-pci-non-transitional", QEMU_CAPS_VIRTIO_PCI_NON_TRANSITIONAL },
};
static struct virQEMUCapsStringFlags virQEMUCapsDevicePropsVirtioBalloon[] = {
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index ba84052bca..c5e985d6b5 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -505,6 +505,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */
QEMU_CAPS_OBJECT_MEMORY_FILE_PMEM, /* -object memory-backend-file,pmem= */
QEMU_CAPS_DEVICE_NVDIMM_UNARMED, /* -device nvdimm,unarmed= */
QEMU_CAPS_SCSI_DISK_DEVICE_ID, /* 'device_id' property of scsi disk */
+ QEMU_CAPS_VIRTIO_PCI_NON_TRANSITIONAL, /* virtio *-pci-{non-}transitional devices */
QEMU_CAPS_LAST /* this must always be the last item */
} virQEMUCapsFlags;
diff --git a/tests/qemucapabilitiesdata/caps_4.0.0.riscv32.xml b/tests/qemucapabilitiesdata/caps_4.0.0.riscv32.xml
index 3d958db461..20b91663bc 100644
--- a/tests/qemucapabilitiesdata/caps_4.0.0.riscv32.xml
+++ b/tests/qemucapabilitiesdata/caps_4.0.0.riscv32.xml
@@ -161,6 +161,7 @@
+ 300105000
diff --git a/tests/qemucapabilitiesdata/caps_4.0.0.riscv64.xml b/tests/qemucapabilitiesdata/caps_4.0.0.riscv64.xml
index 40083843f2..7f37a3709c 100644
--- a/tests/qemucapabilitiesdata/caps_4.0.0.riscv64.xml
+++ b/tests/qemucapabilitiesdata/caps_4.0.0.riscv64.xml
@@ -161,6 +161,7 @@
+ 300105000
diff --git a/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml
index 109b1ff753..08f604385f 100644
--- a/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml
@@ -206,6 +206,7 @@
+ 3001050043100758
From patchwork Fri Feb 8 22:11:54 2019
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Cole Robinson
X-Patchwork-Id: 157874
Delivered-To: patch@linaro.org
Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp925jaa;
Fri, 8 Feb 2019 14:12:28 -0800 (PST)
X-Google-Smtp-Source: AHgI3IY1QfSrqzpx4Iag6OOHPd6Y3SbCuswxB+jzL7/znngk9TFCKvE1FM4cUP2mpyu7d6xvlfUB
X-Received: by 2002:a37:57c5:: with SMTP id
l188mr17003840qkb.54.1549663947938;
Fri, 08 Feb 2019 14:12:27 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1549663947; cv=none;
d=google.com; s=arc-20160816;
b=BxSOzBJu5267yg/m8xnXve6gH59lQZw3WxdPUd/9kTKxj4IA2OdxEFkNsAYFa8IarX
kidlOA00KVQcWJiKS6qTglfL9LuDgCcCgr0us6UMJ9PL/ZvCLMcfH1wBaLVqDqWIUx9z
LS8g6xbhdUhPNMSZv7hg5v2FFiy8gpVkM+ZlnwP7UA6y4Bt87JVvmIqR9miKRVdMhwPw
lGwbFACVXFKVBc9GMImf0sgm+CoV27IkQxI9fpmDtjuP97M0KSyHzlFTPqSdvGlQEB1T
UuSJSHqTnGMezjLC0RTfpv3qQE1M/0Xwu+EcKb5725WG5ZyTKP32mx/4FQR/Cg8t9i45
nb/A==
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=N8SyVfWKTzRg0ewmv/uuRt7sSoyP+SXecaWxf23cmL4=;
b=ntZ372yzvenALibrxrcrSIFGGeAcPusL3sI1SNs9cHTceiCPeCIPcYFvJOECekImdl
+soSilYBkyg8IGCAl2drsbBLuFtk0XsllXJxTlAe71/Sqz19XNBurbJtPITFaGZfFRTt
fWOiNTTwfhG3FulXxnMiJgMJEZ0Yp2Ayajuhu4IddROxEo6RQzQ+7t5Eg4BsO5phPc7c
dr+DMU1P7M7HmvngaHJjEDh3zmCMzs8Q+lSV6d5TdEl07cbdk3OqYpbePn1O8MT82GeJ
2YuahyjxmfO07vTLFck50yoyNvMMugtZLo9a7gr8kLbmHg+77g1DcyPPQKFY4zvjq21C
kpwA==
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 m5si593559qte.371.2019.02.08.14.12.27
(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
Fri, 08 Feb 2019 14:12:27 -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 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)
Delivered-To: libvirt-list@redhat.com
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: ,
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)
devices lack the model= attribute which is used by
most other device types. bus= mostly acts as one, but it
serves other purposes too like determing what target=
prefix to use, and for matching against controller type=
values.
Extending bus= 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
---
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-latest.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-latest.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
--
2.20.1
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Reviewed-by: Andrea Bolognani
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 further
+ with "virtio-transitional", "virtio-non-transitional", or
+ "virtio", see
+ Virtio transitional devices
+ for more details.
+ Since 5.1.0
+
rawio
Indicates whether the disk needs rawio capability. Valid
@@ -4074,6 +4085,40 @@
Since 3.5.0
+
+ Since 5.1.0, some of QEMU's virtio devices,
+ when used with PCI/PCIe machine types, accept the following
+ model values:
+
+
+
+
virtio-transitional
+
This instructs libvirt to always place the device in a conventional
+ 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 slot,
+ 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.
+
+
@@ -35,6 +35,16 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qemuxml2xmloutdata/virtio-transitional.xml b/tests/qemuxml2xmloutdata/virtio-transitional.xml
index c19e133bb3..f9729391a5 100644
--- a/tests/qemuxml2xmloutdata/virtio-transitional.xml
+++ b/tests/qemuxml2xmloutdata/virtio-transitional.xml
@@ -18,7 +18,7 @@
-
+
@@ -39,6 +39,11 @@
+
+
+
+
+
From patchwork Fri Feb 8 22:11:57 2019
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Cole Robinson
X-Patchwork-Id: 157878
Delivered-To: patch@linaro.org
Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp1311jaa;
Fri, 8 Feb 2019 14:12:51 -0800 (PST)
X-Google-Smtp-Source: AHgI3IaUw1u01IA8KU8wYwsiuQR5JBsA0xkL41bmnXuYFkfZ/fcJYSejxSItbdwHhUVXppEpLfRM
X-Received: by 2002:a0c:c2ce:: with SMTP id c14mr18660504qvi.7.1549663970960;
Fri, 08 Feb 2019 14:12:50 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1549663970; cv=none;
d=google.com; s=arc-20160816;
b=ja3ClQv6Mnin3TUbZSX0WEMHGGW/RZWNt+CV0bhdedbA4OrCiAMgZRuh/AQhZ3ulkq
BOCjHg+5JVDH65Z2NIyNp4fPBV7tegrIB/C0uwPBgo03LlN9POnQK/OEbChZiRhHnf3N
xuJiuFf3ujSrDUCSes5iUFrCX5EA/BGVPROFAfc6ThbBcWheAm8YxOQ1jAjvrxCkW6wY
p68XSCRtxfd7sACdEtkWzVi6bGCXdS3Jhx8t9mJ/AGbNHnXjqTfMBecPKytrf0MaYN/n
/8XL5IoXBxEMyo9fkObJeleZvgzel+/sEa4Wo3fkA71gBflD5NYj9215vD89dq3wjgCO
U/xQ==
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
:cc:mime-version:references:in-reply-to:message-id:date:to:from
:delivered-to;
bh=97rTH4zUT274mSycC/MIRCSbUh1XbeUlFYXiTTM56EI=;
b=ESRxofDWL8i+YxfffCjGziR3ZndRQuPysjSuoMj+iv6zes5YudF7eyihhZKJk5hPKF
K5QZm1PV+4ddfuvFcx1Li7EYnmhfnU3IUd9U+K7nPoE6feScPPAxvF3F+YjyXzyc7W0M
EMcCC0P2e/O+DOTrLMo582JlYg/BRxZATJBOaS/563lNqTU6/ZkpNkj6ftOPMgdraMvl
JeeGZbaWDkHVbXoJ2NdnjbZ1Sa6KsECP8eGUavwMyUa4xbHG2IkyHjv2e2emeU98saho
z/9Tqbzk4rSRxvipKD8XKrwdZIQSdNU9ml1m73k6bRLubxaZ800LZkAwOfSVLJr+OeAB
sTzw==
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
s4si2340931qvn.112.2019.02.08.14.12.50
(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
Fri, 08 Feb 2019 14:12:50 -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-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15])
(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
(No client certificate requested)
by mx1.redhat.com (Postfix) with ESMTPS id 819B859454;
Fri, 8 Feb 2019 22:12:49 +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 475C217171;
Fri, 8 Feb 2019 22:12: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 ECC633F60A;
Fri, 8 Feb 2019 22:12:48 +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 x18MCM7S008418 for ;
Fri, 8 Feb 2019 17:12:22 -0500
Received: by smtp.corp.redhat.com (Postfix)
id AA19D5C6B8; Fri, 8 Feb 2019 22:12:22 +0000 (UTC)
Delivered-To: libvirt-list@redhat.com
Received: from worklaptop.redhat.com (ovpn-123-115.rdu2.redhat.com
[10.10.123.115])
by smtp.corp.redhat.com (Postfix) with ESMTP id 1E8985C6A5;
Fri, 8 Feb 2019 22:12:22 +0000 (UTC)
From: Cole Robinson
To: libvirt-list@redhat.com
Date: Fri, 8 Feb 2019 17:11:57 -0500
Message-Id:
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
Cc: Andrea Bolognani
Subject: [libvirt] [PATCH v3 06/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: ,
Sender: libvir-list-bounces@redhat.com
Errors-To: libvir-list-bounces@redhat.com
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16
(mx1.redhat.com [10.5.110.39]);
Fri, 08 Feb 2019 22:12:50 +0000 (UTC)
qemu vhost-scsi devices map to XML roughly like:
To support vhost-scsi-pci-{non-}traditional in qemu, we
need to to extend the SCSI Host hostdev XML to handle
model= value. This matches the XML model= format used
for mediated devices. This is just the domain_conf bits
and some XML test cases.
Use of virtio-X naming here does not match the hostdev
protocol=vhost nor does it match the qemu vhost-X device
naming, however it's more consistent with all other
model= names in this area, and also matches the
inconsistency of devices which use model=virtio
but map to vhost-vsock on the qemu commandline
Reviewed-by: Andrea Bolognani
Signed-off-by: Cole Robinson
---
docs/formatdomain.html.in | 7 +++-
docs/schemas/domaincommon.rng | 9 +++++
src/conf/domain_conf.c | 38 ++++++++++++++++---
src/conf/domain_conf.h | 12 ++++++
src/libvirt_private.syms | 2 +
.../virtio-non-transitional.x86_64-3.1.0.args | 3 ++
...virtio-non-transitional.x86_64-latest.args | 3 ++
.../virtio-non-transitional.xml | 3 ++
.../virtio-transitional.x86_64-3.1.0.args | 3 ++
.../virtio-transitional.x86_64-latest.args | 3 ++
.../qemuxml2argvdata/virtio-transitional.xml | 3 ++
.../virtio-non-transitional.xml | 9 +++++
.../virtio-transitional.xml | 9 +++++
13 files changed, 98 insertions(+), 6 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 c8012f0a22..b7cea098bd 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -4715,7 +4715,12 @@
since 2.5.0For SCSI devices, user
is responsible to make sure the device is not used by host. This
type passes all LUNs presented by a single HBA to
- the guest.
+ the guest. Since 5.1.0, the
+ model attribute can be specified further
+ with "virtio-transitional", "virtio-non-transitional", or
+ "virtio". See
+ Virtio transitional devices
+ for more details.
mdev
For mediated devices (Since 3.2.0)
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
index 8811cf7e45..36531a1c24 100644
--- a/docs/schemas/domaincommon.rng
+++ b/docs/schemas/domaincommon.rng
@@ -4630,6 +4630,15 @@
scsi_host
+
+
+
+ virtio
+ virtio-transitional
+ virtio-non-transitional
+
+
+
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index e29f143f3d..9f58418c89 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -780,6 +780,14 @@ VIR_ENUM_IMPL(virDomainHostdevSubsysSCSIHostProtocol,
"vhost",
);
+VIR_ENUM_IMPL(virDomainHostdevSubsysSCSIVHostModel,
+ VIR_DOMAIN_HOSTDEV_SUBSYS_SCSI_VHOST_MODEL_TYPE_LAST,
+ "default",
+ "virtio",
+ "virtio-transitional",
+ "virtio-non-transitional",
+);
+
VIR_ENUM_IMPL(virDomainHostdevCaps, VIR_DOMAIN_HOSTDEV_CAPS_TYPE_LAST,
"storage",
"misc",
@@ -7800,6 +7808,7 @@ virDomainHostdevDefParseXMLSubsys(xmlNodePtr node,
int ret = -1;
virDomainHostdevSubsysPCIPtr pcisrc = &def->source.subsys.u.pci;
virDomainHostdevSubsysSCSIPtr scsisrc = &def->source.subsys.u.scsi;
+ virDomainHostdevSubsysSCSIVHostPtr scsihostsrc = &def->source.subsys.u.scsi_host;
virDomainHostdevSubsysMediatedDevPtr mdevsrc = &def->source.subsys.u.mdev;
/* @managed can be read from the xml document - it is always an
@@ -7882,14 +7891,26 @@ virDomainHostdevDefParseXMLSubsys(xmlNodePtr node,
}
}
- if (def->source.subsys.type != VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_MDEV) {
+ if (def->source.subsys.type != VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_MDEV &&
+ def->source.subsys.type != VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_SCSI_HOST) {
if (model) {
- virReportError(VIR_ERR_XML_ERROR, "%s",
- _("'model' attribute in is only supported "
- "when type='mdev'"));
+ virReportError(VIR_ERR_XML_ERROR,
+ _("'model' attribute in is not supported "
+ "for type='%s'"),
+ virDomainHostdevSubsysTypeToString(def->source.subsys.type));
goto cleanup;
}
- } else {
+ }
+
+ if (def->source.subsys.type == VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_SCSI_HOST) {
+ if (model &&
+ ((scsihostsrc->model = virDomainHostdevSubsysSCSIVHostModelTypeFromString(model)) < 0)) {
+ virReportError(VIR_ERR_XML_ERROR,
+ _("unknown hostdev model '%s'"),
+ model);
+ goto cleanup;
+ }
+ } else if (def->source.subsys.type == VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_MDEV) {
if (!model) {
virReportError(VIR_ERR_XML_ERROR, "%s",
_("Missing 'model' attribute in mediated device's "
@@ -27301,6 +27322,7 @@ virDomainHostdevDefFormat(virBufferPtr buf,
const char *mode = virDomainHostdevModeTypeToString(def->mode);
virDomainHostdevSubsysSCSIPtr scsisrc = &def->source.subsys.u.scsi;
virDomainHostdevSubsysMediatedDevPtr mdevsrc = &def->source.subsys.u.mdev;
+ virDomainHostdevSubsysSCSIVHostPtr scsihostsrc = &def->source.subsys.u.scsi_host;
const char *type;
if (!mode) {
@@ -27351,6 +27373,12 @@ virDomainHostdevDefFormat(virBufferPtr buf,
virTristateBoolTypeToString(scsisrc->rawio));
}
+ if (def->source.subsys.type == VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_SCSI_HOST &&
+ scsihostsrc->model) {
+ virBufferAsprintf(buf, " model='%s'",
+ virDomainHostdevSubsysSCSIVHostModelTypeToString(scsihostsrc->model));
+ }
+
if (def->source.subsys.type == VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_MDEV) {
virBufferAsprintf(buf, " model='%s'",
virMediatedDeviceModelTypeToString(mdevsrc->model));
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index ecf8b06c2e..dccdc42ed2 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -394,11 +394,23 @@ typedef enum {
VIR_ENUM_DECL(virDomainHostdevSubsysSCSIHostProtocol);
+typedef enum {
+ VIR_DOMAIN_HOSTDEV_SUBSYS_SCSI_VHOST_MODEL_TYPE_DEFAULT,
+ VIR_DOMAIN_HOSTDEV_SUBSYS_SCSI_VHOST_MODEL_TYPE_VIRTIO,
+ VIR_DOMAIN_HOSTDEV_SUBSYS_SCSI_VHOST_MODEL_TYPE_VIRTIO_TRANSITIONAL,
+ VIR_DOMAIN_HOSTDEV_SUBSYS_SCSI_VHOST_MODEL_TYPE_VIRTIO_NON_TRANSITIONAL,
+
+ VIR_DOMAIN_HOSTDEV_SUBSYS_SCSI_VHOST_MODEL_TYPE_LAST,
+} virDomainHostdevSubsysSCSIVHostModelType;
+
+VIR_ENUM_DECL(virDomainHostdevSubsysSCSIVHostModel);
+
typedef struct _virDomainHostdevSubsysSCSIVHost virDomainHostdevSubsysSCSIVHost;
typedef virDomainHostdevSubsysSCSIVHost *virDomainHostdevSubsysSCSIVHostPtr;
struct _virDomainHostdevSubsysSCSIVHost {
int protocol; /* enum virDomainHostdevSubsysSCSIHostProtocolType */
char *wwpn;
+ int model; /* enum virDomainHostdevSubsysSCSIVHostModelType */
};
typedef struct _virDomainHostdevSubsys virDomainHostdevSubsys;
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index aeedb1834c..32ad42282a 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -408,6 +408,8 @@ virDomainHostdevInsert;
virDomainHostdevModeTypeToString;
virDomainHostdevRemove;
virDomainHostdevSubsysPCIBackendTypeToString;
+virDomainHostdevSubsysSCSIVHostModelTypeFromString;
+virDomainHostdevSubsysSCSIVHostModelTypeToString;
virDomainHostdevSubsysTypeToString;
virDomainHPTResizingTypeToString;
virDomainHubTypeFromString;
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 827b4070d4..9c38d713b2 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
@@ -27,12 +27,15 @@ file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
addr=0x1 \
-device pcie-root-port,port=0x9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \
-device pcie-root-port,port=0xa,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x2 \
+-device pcie-root-port,port=0xb,chassis=4,id=pci.4,bus=pcie.0,addr=0x1.0x3 \
-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.2,\
addr=0x0,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \
-netdev user,id=hostnet0 \
-device virtio-net-pci,disable-legacy=on,disable-modern=off,netdev=hostnet0,\
id=net0,mac=00:11:22:33:44:55,bus=pci.1,addr=0x0 \
+-device vhost-scsi-pci,wwpn=naa.5123456789abcde0,vhostfd=3,id=hostdev0,\
+bus=pci.3,addr=0x0 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
resourcecontrol=deny \
-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 9a0eb9a1f3..82255909c4 100644
--- a/tests/qemuxml2argvdata/virtio-non-transitional.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/virtio-non-transitional.x86_64-latest.args
@@ -27,12 +27,15 @@ file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
addr=0x1 \
-device pcie-root-port,port=0x9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \
-device pcie-root-port,port=0xa,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x2 \
+-device pcie-root-port,port=0xb,chassis=4,id=pci.4,bus=pcie.0,addr=0x1.0x3 \
-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-virtio-disk0 \
-device virtio-blk-pci-non-transitional,scsi=off,bus=pci.2,addr=0x0,\
drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \
-netdev user,id=hostnet0 \
-device virtio-net-pci-non-transitional,netdev=hostnet0,id=net0,\
mac=00:11:22:33:44:55,bus=pci.1,addr=0x0 \
+-device vhost-scsi-pci,wwpn=naa.5123456789abcde0,vhostfd=3,id=hostdev0,\
+bus=pci.3,addr=0x0 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
resourcecontrol=deny \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/virtio-non-transitional.xml b/tests/qemuxml2argvdata/virtio-non-transitional.xml
index 72d92ba720..4cbf4b0893 100644
--- a/tests/qemuxml2argvdata/virtio-non-transitional.xml
+++ b/tests/qemuxml2argvdata/virtio-non-transitional.xml
@@ -15,6 +15,9 @@
+
+
+
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 ed0d3b7f7a..d5d0c3eaf7 100644
--- a/tests/qemuxml2argvdata/virtio-transitional.x86_64-3.1.0.args
+++ b/tests/qemuxml2argvdata/virtio-transitional.x86_64-3.1.0.args
@@ -27,12 +27,15 @@ 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 pcie-root-port,port=0xa,chassis=4,id=pci.4,bus=pcie.0,addr=0x1.0x2 \
-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=0x2,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \
-netdev user,id=hostnet0 \
-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=0x1 \
+-device vhost-scsi-pci,wwpn=naa.5123456789abcde0,vhostfd=3,id=hostdev0,\
+bus=pci.3,addr=0x0 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
resourcecontrol=deny \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/virtio-transitional.x86_64-latest.args b/tests/qemuxml2argvdata/virtio-transitional.x86_64-latest.args
index 46e139d492..dab25ba2e8 100644
--- a/tests/qemuxml2argvdata/virtio-transitional.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/virtio-transitional.x86_64-latest.args
@@ -27,12 +27,15 @@ 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 pcie-root-port,port=0xa,chassis=4,id=pci.4,bus=pcie.0,addr=0x1.0x2 \
-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-virtio-disk0 \
-device virtio-blk-pci-transitional,scsi=off,bus=pci.2,addr=0x2,\
drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \
-netdev user,id=hostnet0 \
-device virtio-net-pci-transitional,netdev=hostnet0,id=net0,\
mac=00:11:22:33:44:55,bus=pci.2,addr=0x1 \
+-device vhost-scsi-pci,wwpn=naa.5123456789abcde0,vhostfd=3,id=hostdev0,\
+bus=pci.3,addr=0x0 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
resourcecontrol=deny \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/virtio-transitional.xml b/tests/qemuxml2argvdata/virtio-transitional.xml
index a35a2e9cb4..591ea47952 100644
--- a/tests/qemuxml2argvdata/virtio-transitional.xml
+++ b/tests/qemuxml2argvdata/virtio-transitional.xml
@@ -15,6 +15,9 @@
+
+
+
diff --git a/tests/qemuxml2xmloutdata/virtio-non-transitional.xml b/tests/qemuxml2xmloutdata/virtio-non-transitional.xml
index f0dc7c0833..2af5195dfd 100644
--- a/tests/qemuxml2xmloutdata/virtio-non-transitional.xml
+++ b/tests/qemuxml2xmloutdata/virtio-non-transitional.xml
@@ -40,6 +40,11 @@
+
+
+
+
+
@@ -47,6 +52,10 @@
+
+
+
+
diff --git a/tests/qemuxml2xmloutdata/virtio-transitional.xml b/tests/qemuxml2xmloutdata/virtio-transitional.xml
index f9729391a5..ce7b109845 100644
--- a/tests/qemuxml2xmloutdata/virtio-transitional.xml
+++ b/tests/qemuxml2xmloutdata/virtio-transitional.xml
@@ -39,6 +39,11 @@
+
+
+
+
+
@@ -46,6 +51,10 @@
+
+
+
+
From patchwork Fri Feb 8 22:11:58 2019
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Cole Robinson
X-Patchwork-Id: 157882
Delivered-To: patch@linaro.org
Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp1447jaa;
Fri, 8 Feb 2019 14:13:01 -0800 (PST)
X-Google-Smtp-Source: AHgI3IYI7IqoBGmuf99E31TVdgSx22BGEsmBIilMj3an2apoAbmU0g2oT9pAzdyhkdVBLRvfUAVI
X-Received: by 2002:a37:4a47:: with SMTP id
x68mr17958581qka.112.1549663981169;
Fri, 08 Feb 2019 14:13:01 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1549663981; cv=none;
d=google.com; s=arc-20160816;
b=X8/Zi85pSneVnKxlnQrpZYKmAH5IQLRvR/Ug+avQ+yCpa0/t44U86t3bHSnSDGptJH
cfONCEG8w56b2zuXCrptC1NbG2ARGQmZP34+f7Jh3TTgwEWSuBpQDhSOuafuNuvmd0VT
EbITBQHgtGjXiqStg5ljluvBEM9qMSrhONq2zwlie0iKwtPEuaK0o/fGLoSnMaVqIkwu
PvLW1zlTS0GvC5gaZ0cq1lKdv957xtagRJP3zVYBWkA30P1wLZ6QWT87XNZpOUCzNOQp
x1PWXLlD0hthC6AoMclR4Seyqjrv7iZ9RTYFE0RB36LUNDsbeRuP4zBKUq01dypwd4YD
7Wuw==
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=JlwmSndHhqppF9nCoatb16vmyG9d40grWbRktXQ1BYM=;
b=EPueBOOV9wcLydlPGCucsNrz+GAjA5BonDHI92t/5Wj9SAEwfXTGW/4jCPQnAeqtf8
75un/qHkDmfDAcbSyiryUy0bxWqKB1Ips+FD0Dr7OhJh3ixw3RBQ/+c1IZbQ3FoaXwjO
Pmtc4/SZumB+NCE+N6l/OZkNmHjeo/Blz+rpJrkpPjFpmRa1/y9DI5uz7+7jl1MYdXaB
Jzv+WtcZ7MmG8yddqFO58Z1MU5EJneHTku1RYimgQr9uBHi1Qa9GphdkNTDWEOfs4ruG
RXkrII8wRSt15UxHZVdH3P6IB0UjjWndFRFFlnxIVE1raFK34T+duUgl88wcLQ4pMcz+
b1pw==
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 m6si265161qtq.192.2019.02.08.14.13.00
(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
Fri, 08 Feb 2019 14:13:01 -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-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15])
(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
(No client certificate requested)
by mx1.redhat.com (Postfix) with ESMTPS id 5A3CF80F84;
Fri, 8 Feb 2019 22:12:58 +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 1DA0F5B682;
Fri, 8 Feb 2019 22:12:58 +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 C7AB03F613;
Fri, 8 Feb 2019 22:12:57 +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 x18MCNcJ008423 for ;
Fri, 8 Feb 2019 17:12:23 -0500
Received: by smtp.corp.redhat.com (Postfix)
id 39F931F8; Fri, 8 Feb 2019 22:12:23 +0000 (UTC)
Delivered-To: libvirt-list@redhat.com
Received: from worklaptop.redhat.com (ovpn-123-115.rdu2.redhat.com
[10.10.123.115])
by smtp.corp.redhat.com (Postfix) with ESMTP id D0EB15C557;
Fri, 8 Feb 2019 22:12:22 +0000 (UTC)
From: Cole Robinson
To: libvirt-list@redhat.com
Date: Fri, 8 Feb 2019 17:11:58 -0500
Message-Id:
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 07/17] qemu: Support hostdev
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.15
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16
(mx1.redhat.com [10.5.110.27]);
Fri, 08 Feb 2019 22:13:00 +0000 (UTC)
Add protocol=vhost model handling for virtio transitional
devices. Ex:
* "virtio-transitional" maps to qemu "vhost-scsi-pci-transitional"
* "virtio-non-transitional" maps to qemu "vhost-scsi-pci-non-transitional"
Signed-off-by: Cole Robinson
---
src/qemu/qemu_command.c | 8 ++++++-
src/qemu/qemu_domain_address.c | 22 ++++++++++++++++---
.../virtio-non-transitional.x86_64-3.1.0.args | 4 ++--
...virtio-non-transitional.x86_64-latest.args | 4 ++--
.../virtio-transitional.x86_64-3.1.0.args | 5 ++---
.../virtio-transitional.x86_64-latest.args | 5 ++---
.../virtio-transitional.xml | 7 +-----
7 files changed, 35 insertions(+), 20 deletions(-)
--
2.20.1
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Reviewed-by: Andrea Bolognani
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 552f4c0807..15857f484a 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -485,12 +485,18 @@ qemuBuildVirtioDevStr(virBufferPtr buf,
"virtio-non-transitional");
break;
+ case VIR_DOMAIN_DEVICE_HOSTDEV:
+ if (device.data.hostdev->source.subsys.type != VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_SCSI_HOST)
+ return 0;
+ has_tmodel = device.data.hostdev->source.subsys.u.scsi_host.model == VIR_DOMAIN_HOSTDEV_SUBSYS_SCSI_VHOST_MODEL_TYPE_VIRTIO_TRANSITIONAL;
+ has_ntmodel = device.data.hostdev->source.subsys.u.scsi_host.model == VIR_DOMAIN_HOSTDEV_SUBSYS_SCSI_VHOST_MODEL_TYPE_VIRTIO_NON_TRANSITIONAL;
+ break;
+
case VIR_DOMAIN_DEVICE_LEASE:
case VIR_DOMAIN_DEVICE_FS:
case VIR_DOMAIN_DEVICE_INPUT:
case VIR_DOMAIN_DEVICE_SOUND:
case VIR_DOMAIN_DEVICE_VIDEO:
- case VIR_DOMAIN_DEVICE_HOSTDEV:
case VIR_DOMAIN_DEVICE_WATCHDOG:
case VIR_DOMAIN_DEVICE_CONTROLLER:
case VIR_DOMAIN_DEVICE_GRAPHICS:
diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c
index 5920439a96..283c3246b1 100644
--- a/src/qemu/qemu_domain_address.c
+++ b/src/qemu/qemu_domain_address.c
@@ -794,11 +794,27 @@ qemuDomainDeviceCalculatePCIConnectFlags(virDomainDeviceDefPtr dev,
return pcieFlags;
/* according to pbonzini, from the guest PoV vhost-scsi devices
- * are the same as virtio-scsi, so they should use virtioFlags
- * (same as virtio-scsi) to determine Express vs. legacy placement
+ * are the same as virtio-scsi, so they should follow virtio logic
*/
- if (hostdev->source.subsys.type == VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_SCSI_HOST)
+ if (hostdev->source.subsys.type == VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_SCSI_HOST) {
+ switch ((virDomainHostdevSubsysSCSIVHostModelType) hostdev->source.subsys.u.scsi_host.model) {
+ case VIR_DOMAIN_HOSTDEV_SUBSYS_SCSI_VHOST_MODEL_TYPE_VIRTIO_TRANSITIONAL:
+ /* Transitional devices only work in conventional PCI slots */
+ return pciFlags;
+ case VIR_DOMAIN_HOSTDEV_SUBSYS_SCSI_VHOST_MODEL_TYPE_VIRTIO:
+ case VIR_DOMAIN_HOSTDEV_SUBSYS_SCSI_VHOST_MODEL_TYPE_VIRTIO_NON_TRANSITIONAL:
+ case VIR_DOMAIN_HOSTDEV_SUBSYS_SCSI_VHOST_MODEL_TYPE_DEFAULT:
+ return virtioFlags;
+ case VIR_DOMAIN_HOSTDEV_SUBSYS_SCSI_VHOST_MODEL_TYPE_LAST:
+ break;
+ }
+ return 0;
+
+ /* Transitional devices only work in conventional PCI slots */
+ if (hostdev->source.subsys.u.scsi_host.model == VIR_DOMAIN_HOSTDEV_SUBSYS_SCSI_VHOST_MODEL_TYPE_VIRTIO_TRANSITIONAL)
+ return pciFlags;
return virtioFlags;
+ }
if (!(pciDev = virPCIDeviceNew(hostAddr->domain,
hostAddr->bus,
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 9c38d713b2..500c03bdc3 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
@@ -34,8 +34,8 @@ addr=0x0,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \
-netdev user,id=hostnet0 \
-device virtio-net-pci,disable-legacy=on,disable-modern=off,netdev=hostnet0,\
id=net0,mac=00:11:22:33:44:55,bus=pci.1,addr=0x0 \
--device vhost-scsi-pci,wwpn=naa.5123456789abcde0,vhostfd=3,id=hostdev0,\
-bus=pci.3,addr=0x0 \
+-device vhost-scsi-pci,disable-legacy=on,disable-modern=off,\
+wwpn=naa.5123456789abcde0,vhostfd=3,id=hostdev0,bus=pci.3,addr=0x0 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
resourcecontrol=deny \
-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 82255909c4..c8dbffda65 100644
--- a/tests/qemuxml2argvdata/virtio-non-transitional.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/virtio-non-transitional.x86_64-latest.args
@@ -34,8 +34,8 @@ drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \
-netdev user,id=hostnet0 \
-device virtio-net-pci-non-transitional,netdev=hostnet0,id=net0,\
mac=00:11:22:33:44:55,bus=pci.1,addr=0x0 \
--device vhost-scsi-pci,wwpn=naa.5123456789abcde0,vhostfd=3,id=hostdev0,\
-bus=pci.3,addr=0x0 \
+-device vhost-scsi-pci-non-transitional,wwpn=naa.5123456789abcde0,vhostfd=3,\
+id=hostdev0,bus=pci.3,addr=0x0 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
resourcecontrol=deny \
-msg timestamp=on
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 d5d0c3eaf7..d4d2b8ec35 100644
--- a/tests/qemuxml2argvdata/virtio-transitional.x86_64-3.1.0.args
+++ b/tests/qemuxml2argvdata/virtio-transitional.x86_64-3.1.0.args
@@ -27,15 +27,14 @@ 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 pcie-root-port,port=0xa,chassis=4,id=pci.4,bus=pcie.0,addr=0x1.0x2 \
-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=0x2,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \
-netdev user,id=hostnet0 \
-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=0x1 \
--device vhost-scsi-pci,wwpn=naa.5123456789abcde0,vhostfd=3,id=hostdev0,\
-bus=pci.3,addr=0x0 \
+-device vhost-scsi-pci,disable-legacy=off,disable-modern=off,\
+wwpn=naa.5123456789abcde0,vhostfd=3,id=hostdev0,bus=pci.2,addr=0x3 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
resourcecontrol=deny \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/virtio-transitional.x86_64-latest.args b/tests/qemuxml2argvdata/virtio-transitional.x86_64-latest.args
index dab25ba2e8..ab2c35514d 100644
--- a/tests/qemuxml2argvdata/virtio-transitional.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/virtio-transitional.x86_64-latest.args
@@ -27,15 +27,14 @@ 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 pcie-root-port,port=0xa,chassis=4,id=pci.4,bus=pcie.0,addr=0x1.0x2 \
-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-virtio-disk0 \
-device virtio-blk-pci-transitional,scsi=off,bus=pci.2,addr=0x2,\
drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \
-netdev user,id=hostnet0 \
-device virtio-net-pci-transitional,netdev=hostnet0,id=net0,\
mac=00:11:22:33:44:55,bus=pci.2,addr=0x1 \
--device vhost-scsi-pci,wwpn=naa.5123456789abcde0,vhostfd=3,id=hostdev0,\
-bus=pci.3,addr=0x0 \
+-device vhost-scsi-pci-transitional,wwpn=naa.5123456789abcde0,vhostfd=3,\
+id=hostdev0,bus=pci.2,addr=0x3 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
resourcecontrol=deny \
-msg timestamp=on
diff --git a/tests/qemuxml2xmloutdata/virtio-transitional.xml b/tests/qemuxml2xmloutdata/virtio-transitional.xml
index ce7b109845..8c1baced0e 100644
--- a/tests/qemuxml2xmloutdata/virtio-transitional.xml
+++ b/tests/qemuxml2xmloutdata/virtio-transitional.xml
@@ -39,11 +39,6 @@
-
-
-
-
-
@@ -53,7 +48,7 @@
-
+
From patchwork Fri Feb 8 22:11:59 2019
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Cole Robinson
X-Patchwork-Id: 157884
Delivered-To: patch@linaro.org
Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp1496jaa;
Fri, 8 Feb 2019 14:13:03 -0800 (PST)
X-Google-Smtp-Source: AHgI3IZFNbslDLNTFxpp9mz/yBoEPqqIiWtqkTqd+epChgaQ36dI23QHqLW/Obvf2YrQltPg8C31
X-Received: by 2002:a0c:c3d0:: with SMTP id p16mr14271416qvi.47.1549663983698;
Fri, 08 Feb 2019 14:13:03 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1549663983; cv=none;
d=google.com; s=arc-20160816;
b=O38FsOs1IggW4jdggjZivLxwAFvA/RuNP4m3BucqwHHUFQc98W5dDc4RcBBeRcepxq
BVAwk9vr/ONLz5BJkEAsAG/li09DEMM7BVULJBxRY1y7JKuSpBkdnk/dv+gJWqYPfnmY
T6uVULckxRKTaCBOjyz3k7XScoS8aM76aqZaXo1Wgk1D4SLf1Bbz49nZA1qfFOpFKpMU
Bw0ufMY8d26PI3M9P/TlHBZA8ye0KxrbhVII8ZoudRHB6qMWIVg9W0RWZHCbqtWe6yEp
1H7qOf0rEqJVftofP7MTNlmUgJW8HrM0D/aYid5tU0LThgFETGS6R1buewRYUegULDYx
+8CQ==
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=fnL7JKk3VrCJ4P58+RCtNXEhLU61Xy/418FZCPnPhtI=;
b=G/sb+AaVyEbuTtIqRs+sRkl4ZhWCENKbQ/L6dY3Wse4vU68437YZiiLuUajLXpTnHr
VmJqgPmF9nxlfSrDxU9/IVwtyWtzlYMBvIlsTiE5f9Wy3JrJPYSkzK4Mrfoh8Xp40xtj
2Juv9qDm5ShXoPZLoOzRaBJ7ST/HACbAy/MllnyrfvPtOyJRpOy9qb3j8830pVAHV/xm
LNVfgMST74OpzXYCJXQKbUftTMPmZCcMzRkvTMFvns5xwpu9pQatyg7ituo67NX4zNrT
ZWUzt5Zzal6STTpG3w33gALyuvbzJh6K0RX3aa3UpkWvaJc5h3V5h+iU82373j7KFhjx
3UBw==
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
d27si342007qvh.180.2019.02.08.14.13.03
(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
Fri, 08 Feb 2019 14:13:03 -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-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15])
(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
(No client certificate requested)
by mx1.redhat.com (Postfix) with ESMTPS id 28DFA88E50;
Fri, 8 Feb 2019 22:13:02 +0000 (UTC)
Received: from colo-mx.corp.redhat.com
(colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20])
by smtp.corp.redhat.com (Postfix) with ESMTPS id E2A7A62956;
Fri, 8 Feb 2019 22:13:01 +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 9C0B718033AA;
Fri, 8 Feb 2019 22:13:01 +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 x18MCN1Q008431 for ;
Fri, 8 Feb 2019 17:12:23 -0500
Received: by smtp.corp.redhat.com (Postfix)
id C6AF55C6A5; Fri, 8 Feb 2019 22:12:23 +0000 (UTC)
Delivered-To: libvirt-list@redhat.com
Received: from worklaptop.redhat.com (ovpn-123-115.rdu2.redhat.com
[10.10.123.115])
by smtp.corp.redhat.com (Postfix) with ESMTP id 668D55C557;
Fri, 8 Feb 2019 22:12:23 +0000 (UTC)
From: Cole Robinson
To: libvirt-list@redhat.com
Date: Fri, 8 Feb 2019 17:11:59 -0500
Message-Id: <85eeb4f8a82fc72a9c797e88040847e84f78174e.1549663397.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 08/17] qemu: Support rng
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.15
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16
(mx1.redhat.com [10.5.110.25]);
Fri, 08 Feb 2019 22:13:02 +0000 (UTC)
Add new model values for virtio transitional devices. Ex:
...
* "virtio-transitional" maps to qemu "virtio-rng-pci-transitional"
* "virtio-non-transitional" maps to qemu "virtio-rng-pci-non-transitional"
Signed-off-by: Cole Robinson
---
docs/formatdomain.html.in | 4 ++++
docs/schemas/domaincommon.rng | 6 +++++-
src/conf/domain_conf.c | 5 ++++-
src/conf/domain_conf.h | 2 ++
src/qemu/qemu_command.c | 6 +++++-
src/qemu/qemu_domain.c | 5 +++++
src/qemu/qemu_domain_address.c | 4 ++++
.../virtio-non-transitional.x86_64-3.1.0.args | 4 ++++
.../virtio-non-transitional.x86_64-latest.args | 3 +++
tests/qemuxml2argvdata/virtio-non-transitional.xml | 3 +++
.../virtio-transitional.x86_64-3.1.0.args | 3 +++
.../virtio-transitional.x86_64-latest.args | 2 ++
tests/qemuxml2argvdata/virtio-transitional.xml | 3 +++
tests/qemuxml2xmloutdata/virtio-non-transitional.xml | 9 +++++++++
tests/qemuxml2xmloutdata/virtio-transitional.xml | 4 ++++
15 files changed, 60 insertions(+), 3 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 b7cea098bd..674616f7b4 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -8012,7 +8012,11 @@ qemu-kvm -net nic,model=? /dev/null
'virtio' - supported by qemu and virtio-rng kernel module
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
index 36531a1c24..e91eb1395e 100644
--- a/docs/schemas/domaincommon.rng
+++ b/docs/schemas/domaincommon.rng
@@ -5455,7 +5455,11 @@
- virtio
+
+ virtio
+ virtio-transitional
+ virtio-non-transitional
+
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 9f58418c89..eab70ba807 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -947,7 +947,10 @@ VIR_ENUM_IMPL(virDomainDiskTray, VIR_DOMAIN_DISK_TRAY_LAST,
VIR_ENUM_IMPL(virDomainRNGModel,
VIR_DOMAIN_RNG_MODEL_LAST,
- "virtio");
+ "virtio",
+ "virtio-transitional",
+ "virtio-non-transitional",
+);
VIR_ENUM_IMPL(virDomainRNGBackend,
VIR_DOMAIN_RNG_BACKEND_LAST,
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index dccdc42ed2..2a209a04c2 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -2127,6 +2127,8 @@ struct _virBlkioDevice {
typedef enum {
VIR_DOMAIN_RNG_MODEL_VIRTIO,
+ VIR_DOMAIN_RNG_MODEL_VIRTIO_TRANSITIONAL,
+ VIR_DOMAIN_RNG_MODEL_VIRTIO_NON_TRANSITIONAL,
VIR_DOMAIN_RNG_MODEL_LAST
} virDomainRNGModel;
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 15857f484a..3ef26bb494 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -492,6 +492,11 @@ qemuBuildVirtioDevStr(virBufferPtr buf,
has_ntmodel = device.data.hostdev->source.subsys.u.scsi_host.model == VIR_DOMAIN_HOSTDEV_SUBSYS_SCSI_VHOST_MODEL_TYPE_VIRTIO_NON_TRANSITIONAL;
break;
+ case VIR_DOMAIN_DEVICE_RNG:
+ has_tmodel = device.data.rng->model == VIR_DOMAIN_RNG_MODEL_VIRTIO_TRANSITIONAL;
+ has_ntmodel = device.data.rng->model == VIR_DOMAIN_RNG_MODEL_VIRTIO_NON_TRANSITIONAL;
+ break;
+
case VIR_DOMAIN_DEVICE_LEASE:
case VIR_DOMAIN_DEVICE_FS:
case VIR_DOMAIN_DEVICE_INPUT:
@@ -510,7 +515,6 @@ qemuBuildVirtioDevStr(virBufferPtr buf,
case VIR_DOMAIN_DEVICE_SHMEM:
case VIR_DOMAIN_DEVICE_TPM:
case VIR_DOMAIN_DEVICE_PANIC:
- case VIR_DOMAIN_DEVICE_RNG:
case VIR_DOMAIN_DEVICE_MEMORY:
case VIR_DOMAIN_DEVICE_IOMMU:
case VIR_DOMAIN_DEVICE_VSOCK:
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 801d25a44b..4e9c179db3 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -4553,6 +4553,11 @@ qemuDomainRNGDefValidate(const virDomainRNGDef *def,
modelIsSupported = virQEMUCapsGet(qemuCaps,
QEMU_CAPS_DEVICE_VIRTIO_RNG);
break;
+ case VIR_DOMAIN_RNG_MODEL_VIRTIO_TRANSITIONAL:
+ case VIR_DOMAIN_RNG_MODEL_VIRTIO_NON_TRANSITIONAL:
+ modelIsSupported = (virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_PCI_NON_TRANSITIONAL) ||
+ virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_PCI_DISABLE_LEGACY));
+ break;
case VIR_DOMAIN_RNG_MODEL_LAST:
break;
}
diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c
index 283c3246b1..bc8829943f 100644
--- a/src/qemu/qemu_domain_address.c
+++ b/src/qemu/qemu_domain_address.c
@@ -884,7 +884,11 @@ qemuDomainDeviceCalculatePCIConnectFlags(virDomainDeviceDefPtr dev,
case VIR_DOMAIN_DEVICE_RNG:
switch ((virDomainRNGModel) dev->data.rng->model) {
case VIR_DOMAIN_RNG_MODEL_VIRTIO:
+ case VIR_DOMAIN_RNG_MODEL_VIRTIO_NON_TRANSITIONAL:
return virtioFlags;
+ case VIR_DOMAIN_RNG_MODEL_VIRTIO_TRANSITIONAL:
+ /* Transitional devices only work in conventional PCI slots */
+ return pciFlags;
case VIR_DOMAIN_RNG_MODEL_LAST:
return 0;
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 500c03bdc3..10cc6236cb 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
@@ -28,6 +28,7 @@ addr=0x1 \
-device pcie-root-port,port=0x9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \
-device pcie-root-port,port=0xa,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x2 \
-device pcie-root-port,port=0xb,chassis=4,id=pci.4,bus=pcie.0,addr=0x1.0x3 \
+-device pcie-root-port,port=0xc,chassis=5,id=pci.5,bus=pcie.0,addr=0x1.0x4 \
-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.2,\
addr=0x0,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \
@@ -36,6 +37,9 @@ addr=0x0,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \
id=net0,mac=00:11:22:33:44:55,bus=pci.1,addr=0x0 \
-device vhost-scsi-pci,disable-legacy=on,disable-modern=off,\
wwpn=naa.5123456789abcde0,vhostfd=3,id=hostdev0,bus=pci.3,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.4,addr=0x0 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
resourcecontrol=deny \
-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 c8dbffda65..a0fc475c2f 100644
--- a/tests/qemuxml2argvdata/virtio-non-transitional.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/virtio-non-transitional.x86_64-latest.args
@@ -28,6 +28,7 @@ addr=0x1 \
-device pcie-root-port,port=0x9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \
-device pcie-root-port,port=0xa,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x2 \
-device pcie-root-port,port=0xb,chassis=4,id=pci.4,bus=pcie.0,addr=0x1.0x3 \
+-device pcie-root-port,port=0xc,chassis=5,id=pci.5,bus=pcie.0,addr=0x1.0x4 \
-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-virtio-disk0 \
-device virtio-blk-pci-non-transitional,scsi=off,bus=pci.2,addr=0x0,\
drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \
@@ -36,6 +37,8 @@ drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \
mac=00:11:22:33:44:55,bus=pci.1,addr=0x0 \
-device vhost-scsi-pci-non-transitional,wwpn=naa.5123456789abcde0,vhostfd=3,\
id=hostdev0,bus=pci.3,addr=0x0 \
+-object rng-random,id=objrng0,filename=/dev/urandom \
+-device virtio-rng-pci-non-transitional,rng=objrng0,id=rng0,bus=pci.4,addr=0x0 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
resourcecontrol=deny \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/virtio-non-transitional.xml b/tests/qemuxml2argvdata/virtio-non-transitional.xml
index 4cbf4b0893..d49d82691f 100644
--- a/tests/qemuxml2argvdata/virtio-non-transitional.xml
+++ b/tests/qemuxml2argvdata/virtio-non-transitional.xml
@@ -18,6 +18,9 @@
+
+ /dev/urandom
+
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 d4d2b8ec35..b21a6cadd4 100644
--- a/tests/qemuxml2argvdata/virtio-transitional.x86_64-3.1.0.args
+++ b/tests/qemuxml2argvdata/virtio-transitional.x86_64-3.1.0.args
@@ -35,6 +35,9 @@ bus=pci.2,addr=0x2,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \
id=net0,mac=00:11:22:33:44:55,bus=pci.2,addr=0x1 \
-device vhost-scsi-pci,disable-legacy=off,disable-modern=off,\
wwpn=naa.5123456789abcde0,vhostfd=3,id=hostdev0,bus=pci.2,addr=0x3 \
+-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=0x4 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
resourcecontrol=deny \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/virtio-transitional.x86_64-latest.args b/tests/qemuxml2argvdata/virtio-transitional.x86_64-latest.args
index ab2c35514d..64fb4153fd 100644
--- a/tests/qemuxml2argvdata/virtio-transitional.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/virtio-transitional.x86_64-latest.args
@@ -35,6 +35,8 @@ drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \
mac=00:11:22:33:44:55,bus=pci.2,addr=0x1 \
-device vhost-scsi-pci-transitional,wwpn=naa.5123456789abcde0,vhostfd=3,\
id=hostdev0,bus=pci.2,addr=0x3 \
+-object rng-random,id=objrng0,filename=/dev/urandom \
+-device virtio-rng-pci-transitional,rng=objrng0,id=rng0,bus=pci.2,addr=0x4 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
resourcecontrol=deny \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/virtio-transitional.xml b/tests/qemuxml2argvdata/virtio-transitional.xml
index 591ea47952..9643788a9a 100644
--- a/tests/qemuxml2argvdata/virtio-transitional.xml
+++ b/tests/qemuxml2argvdata/virtio-transitional.xml
@@ -18,6 +18,9 @@
+
+ /dev/urandom
+
diff --git a/tests/qemuxml2xmloutdata/virtio-non-transitional.xml b/tests/qemuxml2xmloutdata/virtio-non-transitional.xml
index 2af5195dfd..4a315050ab 100644
--- a/tests/qemuxml2xmloutdata/virtio-non-transitional.xml
+++ b/tests/qemuxml2xmloutdata/virtio-non-transitional.xml
@@ -45,6 +45,11 @@
+
+
+
+
+
@@ -57,5 +62,9 @@
+
+ /dev/urandom
+
+
diff --git a/tests/qemuxml2xmloutdata/virtio-transitional.xml b/tests/qemuxml2xmloutdata/virtio-transitional.xml
index 8c1baced0e..ae3789ad93 100644
--- a/tests/qemuxml2xmloutdata/virtio-transitional.xml
+++ b/tests/qemuxml2xmloutdata/virtio-transitional.xml
@@ -51,5 +51,9 @@
+
+ /dev/urandom
+
+
From patchwork Fri Feb 8 22:12:00 2019
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Cole Robinson
X-Patchwork-Id: 157876
Delivered-To: patch@linaro.org
Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp1246jaa;
Fri, 8 Feb 2019 14:12:46 -0800 (PST)
X-Google-Smtp-Source: AHgI3Iap7KEvB25jwVU2DKklu4Ir5s0C2qPgqNZbx9virzohRowuzKSql4t+vkLjnDKKy5rpiD4A
X-Received: by 2002:a37:ef18:: with SMTP id j24mr6613936qkk.358.1549663966736;
Fri, 08 Feb 2019 14:12:46 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1549663966; cv=none;
d=google.com; s=arc-20160816;
b=OTtx1nL0wLzpxA/6UogMxSxFmCnrRu6XL490uwH3a/3lIFFuDapUC99K6n/N48CjmX
26cgrCpWaw8SIPAypiSWFrvP7P/G+srKnuPFF/s1xPaQq9ExD+sDtuUl/V1W5NGUKWDq
nnxWOOFbCAj5W0CZLJBiwztihVgfwzb4LBrweScSbA6c3sszqzm9ofbvHBgE/CAHEciQ
rwioeEuaYwX1vxbMr1F86NDM7aFsBJY4QxHfvbNZyyLvy7NpaIqpHMoiUTuGhRrGimjY
WTt6nrdVOnUQ7DS1g1Frl01q+m17JodfrNAJZndWThHooPdqrXerW1Wc+4sn88Z+8hX/
evwA==
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=9HIhoMQ3BpLAwvRNCUkyZoB1MxB/Bk25AgxtDMFDWoc=;
b=p98XyhlNKnece2BLGllxs2BeBpJquF72PD+OfT9FoogdfA6VQENFy5yDLd1HBqV807
okQQtlnvAQ7rVfTC03hteZ3TGbzbN1ircN+QF3UhlY57+P/737kb4XMo5Vo9PqHGaLla
YeV1e2kumXaboCsepOvx71Hd5hAZIAiTZvYppezjKQE9Vq3UqZnMSTX2GRtsFeCtdjAo
0XSNYZ++ul8APx7Ay3axo4c8l64NV4PglV+Z6w6r8/DfuwXwoieFS1GgQ2+QqtNtvW1x
sdZ4+E+jmuodHkpjBls8VShcdTTEa1rUEMB/cLy9FBR+L6eAbLc+nl3rlnX3P+B2mbqJ
17eg==
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
m25si1054641qka.75.2019.02.08.14.12.46
(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
Fri, 08 Feb 2019 14:12:46 -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-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13])
(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
(No client certificate requested)
by mx1.redhat.com (Postfix) with ESMTPS id 3368110F9E;
Fri, 8 Feb 2019 22:12:45 +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 F07F9611C2;
Fri, 8 Feb 2019 22:12:44 +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 A762F3F608;
Fri, 8 Feb 2019 22:12:44 +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 x18MCOtf008441 for ;
Fri, 8 Feb 2019 17:12:24 -0500
Received: by smtp.corp.redhat.com (Postfix)
id 5A4055C6A5; Fri, 8 Feb 2019 22:12:24 +0000 (UTC)
Delivered-To: libvirt-list@redhat.com
Received: from worklaptop.redhat.com (ovpn-123-115.rdu2.redhat.com
[10.10.123.115])
by smtp.corp.redhat.com (Postfix) with ESMTP id F08B75C557;
Fri, 8 Feb 2019 22:12:23 +0000 (UTC)
From: Cole Robinson
To: libvirt-list@redhat.com
Date: Fri, 8 Feb 2019 17:12:00 -0500
Message-Id: <9a2d24aa36abe20f38cb3286c27c7d1a1b710ba3.1549663397.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 09/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: ,
Sender: libvir-list-bounces@redhat.com
Errors-To: libvir-list-bounces@redhat.com
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16
(mx1.redhat.com [10.5.110.28]);
Fri, 08 Feb 2019 22:12:45 +0000 (UTC)
devices lack the model= attribute which is used by
most other device types. To eventually support
virtio-9p-pci-{non-}traditional in qemu, let's add a standard
model= attribute. The accepted values are:
- virtio
- virtio-transitional
- virtio-non-transitional
Signed-off-by: Cole Robinson
---
docs/formatdomain.html.in | 5 +++
docs/schemas/domaincommon.rng | 9 +++++
src/conf/domain_conf.c | 33 +++++++++++++++++--
src/conf/domain_conf.h | 11 +++++++
.../virtio-non-transitional.x86_64-3.1.0.args | 11 ++++---
...virtio-non-transitional.x86_64-latest.args | 11 ++++---
.../virtio-non-transitional.xml | 4 +++
.../virtio-transitional.x86_64-3.1.0.args | 15 +++++----
.../virtio-transitional.x86_64-latest.args | 15 +++++----
.../qemuxml2argvdata/virtio-transitional.xml | 4 +++
.../virtio-non-transitional.xml | 18 +++++++---
.../virtio-transitional.xml | 26 ++++++++++-----
12 files changed, 128 insertions(+), 34 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 674616f7b4..e84e71fda8 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -3881,6 +3881,11 @@
+ Since 5.1.0, the filesystem element
+ has an optional attribute model with supported values
+ "virtio-transitional", "virtio-non-transitional", or "virtio".
+ See Virtio transitional devices
+ for more details.
+
+
+
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 c3df97ca86..0286b98ece 100644
--- a/tests/qemuxml2argvdata/virtio-transitional.x86_64-3.1.0.args
+++ b/tests/qemuxml2argvdata/virtio-transitional.x86_64-3.1.0.args
@@ -27,6 +27,7 @@ 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 pcie-root-port,port=0xa,chassis=4,id=pci.4,bus=pcie.0,addr=0x1.0x2 \
-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=0x3,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \
@@ -36,6 +37,8 @@ fsdev=fsdev-fs0,mount_tag=fs1,bus=pci.2,addr=0x1 \
-netdev user,id=hostnet0 \
-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,id=input0,evdev=/dev/input/event1234,bus=pci.3,\
+addr=0x0 \
-device vhost-scsi-pci,disable-legacy=off,disable-modern=off,\
wwpn=naa.5123456789abcde0,vhostfd=3,id=hostdev0,bus=pci.2,addr=0x4 \
-device virtio-balloon-pci,disable-legacy=off,disable-modern=off,id=balloon0,\
diff --git a/tests/qemuxml2argvdata/virtio-transitional.x86_64-latest.args b/tests/qemuxml2argvdata/virtio-transitional.x86_64-latest.args
index f3a4e0804e..24b49e6009 100644
--- a/tests/qemuxml2argvdata/virtio-transitional.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/virtio-transitional.x86_64-latest.args
@@ -27,6 +27,7 @@ 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 pcie-root-port,port=0xa,chassis=4,id=pci.4,bus=pcie.0,addr=0x1.0x2 \
-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,\
drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \
@@ -36,6 +37,8 @@ bus=pci.2,addr=0x1 \
-netdev user,id=hostnet0 \
-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,id=input0,evdev=/dev/input/event1234,bus=pci.3,\
+addr=0x0 \
-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 \
diff --git a/tests/qemuxml2argvdata/virtio-transitional.xml b/tests/qemuxml2argvdata/virtio-transitional.xml
index a2ca96ed09..b60400a484 100644
--- a/tests/qemuxml2argvdata/virtio-transitional.xml
+++ b/tests/qemuxml2argvdata/virtio-transitional.xml
@@ -25,6 +25,9 @@
+
+
+
diff --git a/tests/qemuxml2xmloutdata/virtio-non-transitional.xml b/tests/qemuxml2xmloutdata/virtio-non-transitional.xml
index 9f05de5089..b6e762c0a7 100644
--- a/tests/qemuxml2xmloutdata/virtio-non-transitional.xml
+++ b/tests/qemuxml2xmloutdata/virtio-non-transitional.xml
@@ -65,6 +65,11 @@
+
+
+
+
+
@@ -75,6 +80,10 @@
+
+
+
+
@@ -90,7 +99,7 @@
-
+
diff --git a/tests/qemuxml2xmloutdata/virtio-transitional.xml b/tests/qemuxml2xmloutdata/virtio-transitional.xml
index 0d99aa2ded..490b28368a 100644
--- a/tests/qemuxml2xmloutdata/virtio-transitional.xml
+++ b/tests/qemuxml2xmloutdata/virtio-transitional.xml
@@ -39,6 +39,11 @@
+
+
+
+
+
@@ -49,6 +54,10 @@
+
+
+
+
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c
index 30954cc341..452184d84a 100644
--- a/tests/qemuxml2xmltest.c
+++ b/tests/qemuxml2xmltest.c
@@ -1259,13 +1259,15 @@ mymain(void)
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_DEVICE_VHOST_VSOCK,
+ QEMU_CAPS_VIRTIO_INPUT_HOST);
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_DEVICE_VHOST_VSOCK,
+ QEMU_CAPS_VIRTIO_INPUT_HOST);
if (getenv("LIBVIRT_SKIP_CLEANUP") == NULL)
virFileDeleteTree(fakerootdir);
From patchwork Fri Feb 8 22:12:05 2019
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Cole Robinson
X-Patchwork-Id: 157888
Delivered-To: patch@linaro.org
Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp1704jaa;
Fri, 8 Feb 2019 14:13:15 -0800 (PST)
X-Google-Smtp-Source: AHgI3IZ8VwFeVnyvx3PZ5tkJSOCgEHSBhlP2kbXEo6Cdj38aAduU1PTxE5gEZn5OPXWAE+2UB91b
X-Received: by 2002:a37:b046:: with SMTP id
z67mr17075930qke.350.1549663995575;
Fri, 08 Feb 2019 14:13:15 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1549663995; cv=none;
d=google.com; s=arc-20160816;
b=D5pH0hK9HilayTDOzdgCHqosyB6C7eq2WJ1cPCShVCWwOULQ/iAUvwU+MymT85QY2w
ALnlU1QUkq69zSKtd8ZxzxoFOuECf0wr+9XUgJ1DX0awmt2UdWvIQRy22eHFHVluL+dU
izMOzv4e5dlslZC5Z32B/eJibNrTMYNM+G/MLfpmfGxuYpV8MjFbgjzFwvvR0pV/E5Qv
kcNKoW3p1gHeDJqUcQfllBuCgQMM9W332vy72sbqeUhvX4H+2KwD1cJ1e6WMkR1h+Fbg
Ck+H609LpiGnpPrYbTQ79HRqY4gEPQHwQIqvw2HCrIN47EetO8LJCTH1Br+gLQYykJzM
KczQ==
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
:cc:mime-version:references:in-reply-to:message-id:date:to:from
:delivered-to;
bh=UomfbYRXmt6bxr+Smv57Szgqnlng4sHAPSLmVjxpQa0=;
b=gi1/PuIc2sbba4EHTrnR7uKncy2RfxG7tcJMMlykTDxVeEv3hNTaYPbpRvImOHUScT
1SA5T0IJ26uvC449KkWxgauIZdc9fhRxBKjDJLFHVStlJGLH4vq0Wykl+kwiglb300bs
MvGUB2ZOsAGP+6PHECl50s2nVlAxALSL/AVjT3luaYScZQ15STDu6SaTI1cQpsmkaEYK
hBWh/f1Z047acIEg+eevBEqxUvNlviwY3TvyS8pNli+B0HZaiSAC2qW5PjEvJo3Ngvyr
0cJ6V9O77ZB4b9iHiV33Xb+avtAGhxHuI84+eJJqLL+vWeJwqfmWBph4nSvSrlQK5g3+
xgPw==
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
e126si2318308qkb.261.2019.02.08.14.13.15
(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
Fri, 08 Feb 2019 14:13:15 -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-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11])
(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
(No client certificate requested)
by mx1.redhat.com (Postfix) with ESMTPS id D59006699F;
Fri, 8 Feb 2019 22:13:13 +0000 (UTC)
Received: from colo-mx.corp.redhat.com
(colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20])
by smtp.corp.redhat.com (Postfix) with ESMTPS id A603D9CAC;
Fri, 8 Feb 2019 22:13:13 +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 6008F18033B0;
Fri, 8 Feb 2019 22:13:13 +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 x18MCSeD008505 for ;
Fri, 8 Feb 2019 17:12:28 -0500
Received: by smtp.corp.redhat.com (Postfix)
id 9F1E235E4; Fri, 8 Feb 2019 22:12:28 +0000 (UTC)
Delivered-To: libvirt-list@redhat.com
Received: from worklaptop.redhat.com (ovpn-123-115.rdu2.redhat.com
[10.10.123.115])
by smtp.corp.redhat.com (Postfix) with ESMTP id 298755C557;
Fri, 8 Feb 2019 22:12:28 +0000 (UTC)
From: Cole Robinson
To: libvirt-list@redhat.com
Date: Fri, 8 Feb 2019 17:12:05 -0500
Message-Id: <005ef112d40e58325485f47dcb86b58b4032a269.1549663397.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
Cc: Andrea Bolognani
Subject: [libvirt] [PATCH v3 14/17] qemu: Support input
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.11
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16
(mx1.redhat.com [10.5.110.38]);
Fri, 08 Feb 2019 22:13:14 +0000 (UTC)
Add model handling for virtio transitional devices. Ex:
...
* "virtio-transitional" maps to qemu "virtio-input-host-pci-transitional"
* "virtio-non-transitional" maps to qemu "virtio-input-host-non-transitional"
Reviewed-by: Andrea Bolognani
Signed-off-by: Cole Robinson
---
src/qemu/qemu_command.c | 8 +++++++-
src/qemu/qemu_domain_address.c | 13 ++++++++++++-
.../virtio-non-transitional.x86_64-3.1.0.args | 4 ++--
.../virtio-non-transitional.x86_64-latest.args | 4 ++--
.../virtio-transitional.x86_64-3.1.0.args | 7 +++----
.../virtio-transitional.x86_64-latest.args | 7 +++----
tests/qemuxml2xmloutdata/virtio-transitional.xml | 9 ++-------
7 files changed, 31 insertions(+), 21 deletions(-)
--
2.20.1
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 022d5a5d90..946bc8b0b3 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -512,8 +512,14 @@ qemuBuildVirtioDevStr(virBufferPtr buf,
has_ntmodel = device.data.vsock->model == VIR_DOMAIN_VSOCK_MODEL_VIRTIO_NON_TRANSITIONAL;
break;
- case VIR_DOMAIN_DEVICE_LEASE:
case VIR_DOMAIN_DEVICE_INPUT:
+ if (device.data.input->type != VIR_DOMAIN_INPUT_TYPE_PASSTHROUGH)
+ return 0;
+ has_tmodel = device.data.input->model == VIR_DOMAIN_INPUT_MODEL_VIRTIO_TRANSITIONAL;
+ has_ntmodel = device.data.input->model == VIR_DOMAIN_INPUT_MODEL_VIRTIO_NON_TRANSITIONAL;
+ break;
+
+ case VIR_DOMAIN_DEVICE_LEASE:
case VIR_DOMAIN_DEVICE_SOUND:
case VIR_DOMAIN_DEVICE_VIDEO:
case VIR_DOMAIN_DEVICE_WATCHDOG:
diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c
index badf237333..8f505c90fd 100644
--- a/src/qemu/qemu_domain_address.c
+++ b/src/qemu/qemu_domain_address.c
@@ -949,7 +949,18 @@ qemuDomainDeviceCalculatePCIConnectFlags(virDomainDeviceDefPtr dev,
case VIR_DOMAIN_DEVICE_INPUT:
switch ((virDomainInputBus) dev->data.input->bus) {
case VIR_DOMAIN_INPUT_BUS_VIRTIO:
- return virtioFlags;
+ switch ((virDomainInputModel) dev->data.input->model) {
+ case VIR_DOMAIN_INPUT_MODEL_VIRTIO_TRANSITIONAL:
+ /* Transitional devices only work in conventional PCI slots */
+ return pciFlags;
+ case VIR_DOMAIN_INPUT_MODEL_VIRTIO:
+ case VIR_DOMAIN_INPUT_MODEL_VIRTIO_NON_TRANSITIONAL:
+ case VIR_DOMAIN_INPUT_MODEL_DEFAULT:
+ return virtioFlags;
+ case VIR_DOMAIN_INPUT_MODEL_LAST:
+ break;
+ }
+ return 0;
case VIR_DOMAIN_INPUT_BUS_PS2:
case VIR_DOMAIN_INPUT_BUS_USB:
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 9130572abe..0f5de86315 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
@@ -42,8 +42,8 @@ fsdev=fsdev-fs0,mount_tag=fs1,bus=pci.1,addr=0x0 \
-netdev user,id=hostnet0 \
-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,id=input0,evdev=/dev/input/event1234,bus=pci.7,\
-addr=0x0 \
+-device virtio-input-host-pci,disable-legacy=on,disable-modern=off,id=input0,\
+evdev=/dev/input/event1234,bus=pci.7,addr=0x0 \
-device vhost-scsi-pci,disable-legacy=on,disable-modern=off,\
wwpn=naa.5123456789abcde0,vhostfd=3,id=hostdev0,bus=pci.4,addr=0x0 \
-device virtio-balloon-pci,disable-legacy=on,disable-modern=off,id=balloon0,\
diff --git a/tests/qemuxml2argvdata/virtio-non-transitional.x86_64-latest.args b/tests/qemuxml2argvdata/virtio-non-transitional.x86_64-latest.args
index 8e0709816b..383b29f629 100644
--- a/tests/qemuxml2argvdata/virtio-non-transitional.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/virtio-non-transitional.x86_64-latest.args
@@ -42,8 +42,8 @@ bus=pci.1,addr=0x0 \
-netdev user,id=hostnet0 \
-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,id=input0,evdev=/dev/input/event1234,bus=pci.7,\
-addr=0x0 \
+-device virtio-input-host-pci-non-transitional,id=input0,\
+evdev=/dev/input/event1234,bus=pci.7,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 \
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 0286b98ece..1c851b5ec4 100644
--- a/tests/qemuxml2argvdata/virtio-transitional.x86_64-3.1.0.args
+++ b/tests/qemuxml2argvdata/virtio-transitional.x86_64-3.1.0.args
@@ -27,7 +27,6 @@ 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 pcie-root-port,port=0xa,chassis=4,id=pci.4,bus=pcie.0,addr=0x1.0x2 \
-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=0x3,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \
@@ -37,8 +36,8 @@ fsdev=fsdev-fs0,mount_tag=fs1,bus=pci.2,addr=0x1 \
-netdev user,id=hostnet0 \
-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,id=input0,evdev=/dev/input/event1234,bus=pci.3,\
-addr=0x0 \
+-device virtio-input-host-pci,disable-legacy=off,disable-modern=off,id=input0,\
+evdev=/dev/input/event1234,bus=pci.2,addr=0x7 \
-device vhost-scsi-pci,disable-legacy=off,disable-modern=off,\
wwpn=naa.5123456789abcde0,vhostfd=3,id=hostdev0,bus=pci.2,addr=0x4 \
-device virtio-balloon-pci,disable-legacy=off,disable-modern=off,id=balloon0,\
@@ -49,5 +48,5 @@ id=rng0,bus=pci.2,addr=0x6 \
-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=0x7 \
+guest-cid=4,vhostfd=6789,bus=pci.2,addr=0x8 \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/virtio-transitional.x86_64-latest.args b/tests/qemuxml2argvdata/virtio-transitional.x86_64-latest.args
index 24b49e6009..410eb28f0a 100644
--- a/tests/qemuxml2argvdata/virtio-transitional.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/virtio-transitional.x86_64-latest.args
@@ -27,7 +27,6 @@ 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 pcie-root-port,port=0xa,chassis=4,id=pci.4,bus=pcie.0,addr=0x1.0x2 \
-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,\
drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \
@@ -37,8 +36,8 @@ bus=pci.2,addr=0x1 \
-netdev user,id=hostnet0 \
-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,id=input0,evdev=/dev/input/event1234,bus=pci.3,\
-addr=0x0 \
+-device virtio-input-host-pci-transitional,id=input0,\
+evdev=/dev/input/event1234,bus=pci.2,addr=0x7 \
-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 \
@@ -47,5 +46,5 @@ id=hostdev0,bus=pci.2,addr=0x4 \
-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=0x7 \
+bus=pci.2,addr=0x8 \
-msg timestamp=on
diff --git a/tests/qemuxml2xmloutdata/virtio-transitional.xml b/tests/qemuxml2xmloutdata/virtio-transitional.xml
index 490b28368a..9fa9732c2d 100644
--- a/tests/qemuxml2xmloutdata/virtio-transitional.xml
+++ b/tests/qemuxml2xmloutdata/virtio-transitional.xml
@@ -39,11 +39,6 @@
-
-
-
-
-
@@ -56,7 +51,7 @@
-
+
@@ -73,7 +68,7 @@
-
+
From patchwork Fri Feb 8 22:12:06 2019
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Cole Robinson
X-Patchwork-Id: 157885
Delivered-To: patch@linaro.org
Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp1553jaa;
Fri, 8 Feb 2019 14:13:06 -0800 (PST)
X-Google-Smtp-Source: AHgI3IYbDcdS6nFGubx8XdIrkwxgzd4DIJmDN4ZUa4IwyXu4vjWVwChnoUZwY2B2ZXmkfC/BLjWY
X-Received: by 2002:a0c:b182:: with SMTP id v2mr2483632qvd.237.1549663986330;
Fri, 08 Feb 2019 14:13:06 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1549663986; cv=none;
d=google.com; s=arc-20160816;
b=N03BXTVa4T0yIRDfl2Z8ihVBoBDvJbvyA1wsaqgs4WSpTxE8hWSMJeqpq7vm5KuXpk
Fjc3M/j36pCb10aX0S/YnvBV0dRxq+4UFCeJtmLvpL/ha/rmcYyd5nQV5oSqCtiRaC4x
F/x5Tn+1Re9PqbBAMuKhYwlEsh1oASwarIvDYP3vghdknD9+fLgedmBdKEWIUhjvb8OF
Jwpq7g48sOQBYrg568tvmJ7+4Qn20g5YX1V3EaPhHmn32PdkxrwYyV7kwD/ldmM3HoZ7
IwGwH8ar2+uBxxpO1DuX02oz8UNYOjIMQuIAoVDkYdLbfORT9jgFh1l7Aej9BqDe4Sfa
ZTjw==
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
:cc:mime-version:references:in-reply-to:message-id:date:to:from
:delivered-to;
bh=fKB6YHQuUE8qfrq8cBdkMjPrZQ7ES/mlWYYGk8vc1gU=;
b=NlUdxyoWhK6lF+l8/qFUk7XyeUMFOOe8X/YHBfmXX+s3UH0cLfejMYM/qdF+MLttLX
Fl571eFY7/pG+4SJknGyFpzLQ3DNcZcAmeLY37dGif4VdcuSsPyCGp4EgrGS6GhGiZEA
xw2z/P3WX7pjX5AP7prasPAaAsOSR6AWvp6LClA795usOhbvfV7F80GOOG6/hjojGWRN
QfOPj/+xSlIxUI5xlmU8f7G6vONCUUAq0as0UHUKoE1n1j2TyNCQJhIQ9wAl/gNvV1wA
CHdPoLjYRZv8mKCmhNh3BYwzpnSJjEW2ozzD8nY/A8rLIFd/mhZlk/9qeKTXtKA0amLV
J50g==
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 x19si826431qkx.54.2019.02.08.14.13.06
(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
Fri, 08 Feb 2019 14:13:06 -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-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22])
(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
(No client certificate requested)
by mx1.redhat.com (Postfix) with ESMTPS id 860A9C057F8F;
Fri, 8 Feb 2019 22:13:04 +0000 (UTC)
Received: from colo-mx.corp.redhat.com
(colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20])
by smtp.corp.redhat.com (Postfix) with ESMTPS id 4B4F410640FD;
Fri, 8 Feb 2019 22:13:04 +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 F09C218033CC;
Fri, 8 Feb 2019 22:13:03 +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 x18MCT88008512 for ;
Fri, 8 Feb 2019 17:12:29 -0500
Received: by smtp.corp.redhat.com (Postfix)
id 48D265C6A6; Fri, 8 Feb 2019 22:12:29 +0000 (UTC)
Delivered-To: libvirt-list@redhat.com
Received: from worklaptop.redhat.com (ovpn-123-115.rdu2.redhat.com
[10.10.123.115])
by smtp.corp.redhat.com (Postfix) with ESMTP id C81AC5C557;
Fri, 8 Feb 2019 22:12:28 +0000 (UTC)
From: Cole Robinson
To: libvirt-list@redhat.com
Date: Fri, 8 Feb 2019 17:12:06 -0500
Message-Id:
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
Cc: Andrea Bolognani
Subject: [libvirt] [PATCH v3 15/17] qemu: Support virtio-serial 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.22
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16
(mx1.redhat.com [10.5.110.32]);
Fri, 08 Feb 2019 22:13:05 +0000 (UTC)
Add controller type='virtio-serial' model handling for virtio
transitional devices. Ex:
* "virtio-transitional" maps to qemu "virtio-serial-pci-transitional"
* "virtio-non-transitional" maps to qemu "virtio-serial-pci-non-transitional"
Reviewed-by: Andrea Bolognani
Signed-off-by: Cole Robinson
---
docs/formatdomain.html.in | 7 +++++-
docs/schemas/domaincommon.rng | 9 ++++++++
src/conf/domain_conf.c | 11 ++++++++++
src/conf/domain_conf.h | 10 +++++++++
src/qemu/qemu_command.c | 10 ++++++++-
src/qemu/qemu_domain_address.c | 15 ++++++++++++-
.../virtio-non-transitional.x86_64-3.1.0.args | 18 +++++++++------
...virtio-non-transitional.x86_64-latest.args | 18 +++++++++------
.../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 | 22 +++++++++++++------
.../virtio-transitional.xml | 15 ++++++++-----
14 files changed, 122 insertions(+), 42 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 336a28e54c..32e40e8765 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -4171,7 +4171,12 @@
The virtio-serial controller has two additional
optional attributes ports and vectors,
which control how many devices can be connected through the
- controller.
+ controller. Since 5.1.0, it
+ supports an optional attribute model which can
+ be 'virtio', 'virtio-transitional', or 'virtio-non-transitional'. See
+ Virtio transitional devices
+ for more details.
+
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.
+