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.
+