From nobody Fri May 3 14:56:44 2024
Delivered-To: importer@patchew.org
Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28
as permitted sender) client-ip=209.132.183.28;
envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com;
Authentication-Results: mx.zoho.com;
spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as
permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com;
Return-Path:
Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by
mx.zohomail.com
with SMTPS id 1493820476939229.2040567158832;
Wed, 3 May 2017 07:07:56 -0700 (PDT)
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 4DBAC4E356;
Wed, 3 May 2017 14:07:53 +0000 (UTC)
Received: from colo-mx.corp.redhat.com (unknown [10.5.11.21])
by smtp.corp.redhat.com (Postfix) with ESMTPS id 07183182C9;
Wed, 3 May 2017 14:07:53 +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 AED955EC62;
Wed, 3 May 2017 14:07:52 +0000 (UTC)
Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com
[10.5.11.13])
by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP
id v43E7p5V014338 for ;
Wed, 3 May 2017 10:07:51 -0400
Received: by smtp.corp.redhat.com (Postfix)
id 3648A17F57; Wed, 3 May 2017 14:07:51 +0000 (UTC)
Received: from icr.brq.redhat.com (dhcp129-58.brq.redhat.com [10.34.129.58])
by smtp.corp.redhat.com (Postfix) with ESMTP id 7A7DD17F5D;
Wed, 3 May 2017 14:07:50 +0000 (UTC)
DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 4DBAC4E356
Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com;
dmarc=none (p=none dis=none) header.from=redhat.com
Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com;
spf=pass smtp.mailfrom=libvir-list-bounces@redhat.com
DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 4DBAC4E356
From: =?UTF-8?q?J=C3=A1n=20Tomko?=
To: libvir-list@redhat.com
Date: Wed, 3 May 2017 16:05:14 +0200
Message-Id:
In-Reply-To:
References:
In-Reply-To:
References:
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13
X-loop: libvir-list@redhat.com
Cc: peterx@redhat.com
Subject: [libvirt] [PATCHv4 1/6] conf: add to
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: ,
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Sender: libvir-list-bounces@redhat.com
Errors-To: libvir-list-bounces@redhat.com
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15
X-Greylist: Sender IP whitelisted,
not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]);
Wed, 03 May 2017 14:07:54 +0000 (UTC)
X-ZohoMail: RSF_0 Z_629925259 SPT_0
Content-Type: text/plain; charset="utf-8"
Add a new element with a driver attribute.
Possible values are qemu and kvm. With 'qemu', the I/O
APIC can be put in the userspace even for KVM domains.
https://bugzilla.redhat.com/show_bug.cgi?id=3D1427005
---
docs/formatdomain.html.in | 8 ++++++
docs/schemas/domaincommon.rng | 15 ++++++++++
src/conf/domain_conf.c | 33 ++++++++++++++++++=
+++-
src/conf/domain_conf.h | 11 ++++++++
.../qemuxml2argv-intel-iommu-ioapic.xml | 29 +++++++++++++++++++
.../qemuxml2xmlout-intel-iommu-ioapic.xml | 1 +
tests/qemuxml2xmltest.c | 1 +
7 files changed, 97 insertions(+), 1 deletion(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-intel-iommu-ioapic.=
xml
create mode 120000 tests/qemuxml2xmloutdata/qemuxml2xmlout-intel-iommu-ioa=
pic.xml
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index 8c884f4..6669e71 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -1678,6 +1678,7 @@
</kvm>
<pvspinlock state=3D'on'/>
<gic version=3D'2'/>
+ <ioapic driver=3D'qemu'/>
=20
</features>
...
@@ -1839,6 +1840,13 @@
for hypervisor to decide.
Since 2.1.0
+
ioapic
+
Tune the I/O APIC. Possible values for the
+ driver attribute are:
+ kvm (default for KVM domains)
+ and qemu which puts I/O APIC in userspace.
+ Since 3.4.0 (KVM only)
+
@@ -7406,6 +7408,26 @@ qemu-kvm -net nic,model=3D? /dev/null
Currently only the intel model is supported.
+
driver
+
+
+ The driver subelement can be used to configure
+ additional options:
+
+
+
intremap
+
+
+ The intremap attribute with possible values
+ on and off can be used to
+ turn on interrupt remapping, a part of the VT-d functionalit=
y.
+ Currently this requires split I/O APIC
+ (<ioapic driver=3D'qemu'/>)
+ Since 3.4.0 (QEMU/KVM only)
+
+ The caching_mode attribute with possible values
+ on and off can be used to
+ turn on the VT-d caching mode (useful for assigned devices)
+ Since 3.4.0 (QEMU/KVM only)
+
+
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
index 00d9290..f88e84a 100644
--- a/docs/schemas/domaincommon.rng
+++ b/docs/schemas/domaincommon.rng
@@ -3954,6 +3954,11 @@
+
+
+
+
+
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 4eefd92..ef31f4a 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -14176,6 +14176,15 @@ virDomainIOMMUDefParseXML(xmlNodePtr node,
iommu->intremap =3D val;
}
=20
+ VIR_FREE(tmp);
+ if ((tmp =3D virXPathString("string(./driver/@caching_mode)", ctxt))) {
+ if ((val =3D virTristateSwitchTypeFromString(tmp)) < 0) {
+ virReportError(VIR_ERR_XML_ERROR, _("unknown caching_mode valu=
e: %s"), tmp);
+ goto cleanup;
+ }
+ iommu->caching_mode =3D val;
+ }
+
ret =3D iommu;
iommu =3D NULL;
=20
@@ -24143,9 +24152,18 @@ virDomainIOMMUDefFormat(virBufferPtr buf,
=20
virBufferAdjustIndent(&childBuf, virBufferGetIndent(buf, false) + 2);
=20
- if (iommu->intremap !=3D VIR_TRISTATE_SWITCH_ABSENT) {
- virBufferAsprintf(&childBuf, "\n",
- virTristateSwitchTypeToString(iommu->intremap));
+ if (iommu->intremap !=3D VIR_TRISTATE_SWITCH_ABSENT ||
+ iommu->caching_mode !=3D VIR_TRISTATE_SWITCH_ABSENT) {
+ virBufferAddLit(&childBuf, "intremap) {
+ virBufferAsprintf(&childBuf, " intremap=3D'%s'",
+ virTristateSwitchTypeToString(iommu->intrema=
p));
+ }
+ if (iommu->caching_mode !=3D VIR_TRISTATE_SWITCH_ABSENT) {
+ virBufferAsprintf(&childBuf, " caching_mode=3D'%s'",
+ virTristateSwitchTypeToString(iommu->caching=
_mode));
+ }
+ virBufferAddLit(&childBuf, "/>\n");
}
=20
virBufferAsprintf(buf, "
+ QEMUGuest1
+ c7a5fdbd-edaf-9455-926a-d65c16db1809
+ 219100
+ 219100
+ 1
+
+ hvm
+
+
+
+ destroy
+ restart
+ destroy
+
+ /usr/bin/qemu-system-x86_64
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-intel-iommu-caching-mo=
de.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-intel-iommu-caching-mode.x=
ml
new file mode 120000
index 0000000..d971a35
--- /dev/null
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-intel-iommu-caching-mode.xml
@@ -0,0 +1 @@
+../qemuxml2argvdata/qemuxml2argv-intel-iommu-caching-mode.xml
\ No newline at end of file
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c
index 0f00b20..81d8105 100644
--- a/tests/qemuxml2xmltest.c
+++ b/tests/qemuxml2xmltest.c
@@ -1123,6 +1123,7 @@ mymain(void)
QEMU_CAPS_MACHINE_OPT,
QEMU_CAPS_MACHINE_IOMMU);
DO_TEST("intel-iommu-ioapic", NONE);
+ DO_TEST("intel-iommu-caching-mode", NONE);
=20
DO_TEST("cpu-check-none", NONE);
DO_TEST("cpu-check-partial", NONE);
--=20
2.10.2
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
From nobody Fri May 3 14:56:44 2024
Delivered-To: importer@patchew.org
Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28
as permitted sender) client-ip=209.132.183.28;
envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com;
Authentication-Results: mx.zoho.com;
spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as
permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com;
Return-Path:
Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by
mx.zohomail.com
with SMTPS id 14938205033831004.6320906989923;
Wed, 3 May 2017 07:08:23 -0700 (PDT)
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 CF57780C16;
Wed, 3 May 2017 14:08:19 +0000 (UTC)
Received: from colo-mx.corp.redhat.com (unknown [10.5.11.21])
by smtp.corp.redhat.com (Postfix) with ESMTPS id A42B180E18;
Wed, 3 May 2017 14:08:19 +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 5BB985EC67;
Wed, 3 May 2017 14:08:19 +0000 (UTC)
Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com
[10.5.11.13])
by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP
id v43E8HcV014404 for ;
Wed, 3 May 2017 10:08:17 -0400
Received: by smtp.corp.redhat.com (Postfix)
id 86A6417F2C; Wed, 3 May 2017 14:08:17 +0000 (UTC)
Received: from icr.brq.redhat.com (dhcp129-58.brq.redhat.com [10.34.129.58])
by smtp.corp.redhat.com (Postfix) with ESMTP id E297E17DF5;
Wed, 3 May 2017 14:08:01 +0000 (UTC)
DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com CF57780C16
Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com;
dmarc=none (p=none dis=none) header.from=redhat.com
Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com;
spf=pass smtp.mailfrom=libvir-list-bounces@redhat.com
DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com CF57780C16
From: =?UTF-8?q?J=C3=A1n=20Tomko?=
To: libvir-list@redhat.com
Date: Wed, 3 May 2017 16:05:19 +0200
Message-Id:
In-Reply-To:
References:
In-Reply-To:
References:
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13
X-loop: libvir-list@redhat.com
Cc: peterx@redhat.com
Subject: [libvirt] [PATCHv4 6/6] qemu: format caching-mode on iommu command
line
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: ,
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Sender: libvir-list-bounces@redhat.com
Errors-To: libvir-list-bounces@redhat.com
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12
X-Greylist: Sender IP whitelisted,
not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]);
Wed, 03 May 2017 14:08:21 +0000 (UTC)
X-ZohoMail: RSF_0 Z_629925259 SPT_0
Content-Type: text/plain; charset="utf-8"
Format the caching-mode option for the intel-iommu device,
based on its attribute value.
https://bugzilla.redhat.com/show_bug.cgi?id=3D1427005
---
src/qemu/qemu_capabilities.c | 2 ++
src/qemu/qemu_capabilities.h | 1 +
src/qemu/qemu_command.c | 11 ++++++++++
tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml | 1 +
.../qemuxml2argv-intel-iommu-caching-mode.args | 25 ++++++++++++++++++=
++++
tests/qemuxml2argvtest.c | 11 ++++++++++
6 files changed, 51 insertions(+)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-intel-iommu-caching=
-mode.args
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 8458a29..9d50389 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -370,6 +370,7 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST,
"kernel-irqchip", /* 255 */
"kernel-irqchip.split",
"intel-iommu.intremap",
+ "intel-iommu.caching-mode",
);
=20
=20
@@ -1723,6 +1724,7 @@ static struct virQEMUCapsStringFlags virQEMUCapsObjec=
tPropsUSBNECXHCI[] =3D {
=20
static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsIntelIOMMU[] =
=3D {
{ "intremap", QEMU_CAPS_INTEL_IOMMU_INTREMAP },
+ { "caching-mode", QEMU_CAPS_INTEL_IOMMU_CACHING_MODE },
};
=20
/* see documentation for virQEMUCapsQMPSchemaGetByPath for the query forma=
t */
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index 2810513..aa99fda 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -408,6 +408,7 @@ typedef enum {
QEMU_CAPS_MACHINE_KERNEL_IRQCHIP, /* -machine kernel_irqchip */
QEMU_CAPS_MACHINE_KERNEL_IRQCHIP_SPLIT, /* -machine kernel_irqchip=3Ds=
plit */
QEMU_CAPS_INTEL_IOMMU_INTREMAP, /* intel-iommu.intremap */
+ QEMU_CAPS_INTEL_IOMMU_CACHING_MODE, /* intel-iommu.caching-mode */
=20
QEMU_CAPS_LAST /* this must always be the last item */
} virQEMUCapsFlags;
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index f162e0a..d8d0dea 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -6694,6 +6694,13 @@ qemuBuildIOMMUCommandLine(virCommandPtr cmd,
"with this QEMU binary"));
return -1;
}
+ if (iommu->caching_mode !=3D VIR_TRISTATE_SWITCH_ABSENT &&
+ !virQEMUCapsGet(qemuCaps, QEMU_CAPS_INTEL_IOMMU_CACHING_MODE))=
{
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("iommu: caching mode is not supported "
+ "with this QEMU binary"));
+ return -1;
+ }
break;
case VIR_DOMAIN_IOMMU_MODEL_LAST:
break;
@@ -6723,6 +6730,10 @@ qemuBuildIOMMUCommandLine(virCommandPtr cmd,
virBufferAsprintf(&opts, ",intremap=3D%s",
virTristateSwitchTypeToString(iommu->intrema=
p));
}
+ if (iommu->caching_mode !=3D VIR_TRISTATE_SWITCH_ABSENT) {
+ virBufferAsprintf(&opts, ",caching-mode=3D%s",
+ virTristateSwitchTypeToString(iommu->caching=
_mode));
+ }
case VIR_DOMAIN_IOMMU_MODEL_LAST:
break;
}
diff --git a/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml b/tests/qemuc=
apabilitiesdata/caps_2.9.0.x86_64.xml
index 0f273d6..19fe4b7 100644
--- a/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml
@@ -213,6 +213,7 @@
+ 20090000 (v2.9.0)
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-intel-iommu-caching-mode.a=
rgs b/tests/qemuxml2argvdata/qemuxml2argv-intel-iommu-caching-mode.args
new file mode 100644
index 0000000..1bec6d0
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-intel-iommu-caching-mode.args
@@ -0,0 +1,25 @@
+LC_ALL=3DC \
+PATH=3D/bin \
+HOME=3D/home/test \
+USER=3Dtest \
+LOGNAME=3Dtest \
+QEMU_AUDIO_DRV=3Dnone \
+/usr/bin/qemu-system-x86_64 \
+-name QEMUGuest1 \
+-S \
+-machine q35,accel=3Dtcg \
+-m 214 \
+-smp 1,sockets=3D1,cores=3D1,threads=3D1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-nodefaults \
+-monitor unix:/tmp/lib/domain--1-QEMUGuest1/monitor.sock,server,nowait \
+-no-acpi \
+-boot c \
+-device intel-iommu,intremap=3Don,caching-mode=3Don \
+-device i82801b11-bridge,id=3Dpci.1,bus=3Dpcie.0,addr=3D0x1e \
+-device pci-bridge,chassis_nr=3D2,id=3Dpci.2,bus=3Dpci.1,addr=3D0x0 \
+-device ioh3420,port=3D0x10,chassis=3D3,id=3Dpci.3,bus=3Dpcie.0,addr=3D0x2=
\
+-device ich9-usb-ehci1,id=3Dusb,bus=3Dpci.2,addr=3D0x2.0x7 \
+-device rtl8139,vlan=3D0,id=3Dnet0,mac=3D52:54:00:ab:0c:5c,bus=3Dpci.2,add=
r=3D0x1 \
+-net user,vlan=3D0,name=3Dhostnet0
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index a554416..e308ffd 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -2515,6 +2515,17 @@ mymain(void)
QEMU_CAPS_MACHINE_KERNEL_IRQCHIP_SPLIT,
QEMU_CAPS_INTEL_IOMMU_INTREMAP,
QEMU_CAPS_DEVICE_INTEL_IOMMU);
+ DO_TEST("intel-iommu-caching-mode",
+ QEMU_CAPS_MACHINE_OPT,
+ QEMU_CAPS_DEVICE_PCI_BRIDGE,
+ QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE,
+ QEMU_CAPS_DEVICE_IOH3420,
+ QEMU_CAPS_ICH9_AHCI,
+ QEMU_CAPS_PCI_MULTIFUNCTION,
+ QEMU_CAPS_ICH9_USB_EHCI1,
+ QEMU_CAPS_DEVICE_INTEL_IOMMU,
+ QEMU_CAPS_INTEL_IOMMU_INTREMAP,
+ QEMU_CAPS_INTEL_IOMMU_CACHING_MODE);
=20
DO_TEST("cpu-hotplug-startup", QEMU_CAPS_QUERY_HOTPLUGGABLE_CPUS);
=20
--=20
2.10.2
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
From nobody Fri May 3 14:56:44 2024
Delivered-To: importer@patchew.org
Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28
as permitted sender) client-ip=209.132.183.28;
envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com;
Authentication-Results: mx.zoho.com;
spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as
permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com;
Return-Path:
Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by
mx.zohomail.com
with SMTPS id 1494601865595526.4924783108775;
Fri, 12 May 2017 08:11:05 -0700 (PDT)
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 90AE080C10;
Fri, 12 May 2017 15:11:01 +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 195F58EE4A;
Fri, 12 May 2017 15:11:00 +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 9A6615EC66;
Fri, 12 May 2017 15:10:58 +0000 (UTC)
Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com
[10.5.11.12])
by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP
id v4CFAu7M027756 for ;
Fri, 12 May 2017 11:10:56 -0400
Received: by smtp.corp.redhat.com (Postfix)
id 8CFB460F8A; Fri, 12 May 2017 15:10:56 +0000 (UTC)
Received: from icr.brq.redhat.com (dhcp129-58.brq.redhat.com [10.34.129.58])
by smtp.corp.redhat.com (Postfix) with ESMTP id 067E080F97
for ; Fri, 12 May 2017 15:10:54 +0000 (UTC)
DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 90AE080C10
Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com;
dmarc=none (p=none dis=none) header.from=redhat.com
Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com;
spf=pass smtp.mailfrom=libvir-list-bounces@redhat.com
DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 90AE080C10
From: =?UTF-8?q?J=C3=A1n=20Tomko?=
To: libvir-list@redhat.com
Date: Fri, 12 May 2017 17:08:33 +0200
Message-Id:
<9554d47c35e878c26641a5ec446396683fd39bfd.1494601688.git.jtomko@redhat.com>
In-Reply-To:
References:
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12
X-loop: libvir-list@redhat.com
Subject: [libvirt] [PATCHv4 7/6] conf: split out
virDomainIOMMUDefCheckABIStability
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: ,
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Sender: libvir-list-bounces@redhat.com
Errors-To: libvir-list-bounces@redhat.com
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11
X-Greylist: Sender IP whitelisted,
not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]);
Fri, 12 May 2017 15:11:02 +0000 (UTC)
X-ZohoMail: RSF_0 Z_629925259 SPT_0
Content-Type: text/plain; charset="utf-8"
---
src/conf/domain_conf.c | 24 +++++++++++++++++-------
1 file changed, 17 insertions(+), 7 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 25dc8c6..669860c 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -19819,6 +19819,22 @@ virDomainMemoryDefCheckABIStability(virDomainMemor=
yDefPtr src,
=20
=20
static bool
+virDomainIOMMUDefCheckABIStability(virDomainIOMMUDefPtr src,
+ virDomainIOMMUDefPtr dst)
+{
+ if (src->model !=3D dst->model) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ _("Target domain IOMMU device model '%s' "
+ "does not match source '%s'"),
+ virDomainIOMMUModelTypeToString(dst->model),
+ virDomainIOMMUModelTypeToString(src->model));
+ return false;
+ }
+ return true;
+}
+
+
+static bool
virDomainDefVcpuCheckAbiStability(virDomainDefPtr src,
virDomainDefPtr dst)
{
@@ -20284,14 +20300,8 @@ virDomainDefCheckABIStabilityFlags(virDomainDefPtr=
src,
}
=20
if (src->iommu &&
- src->iommu->model !=3D dst->iommu->model) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("Target domain IOMMU device model '%s' "
- "does not match source '%s'"),
- virDomainIOMMUModelTypeToString(dst->iommu->model),
- virDomainIOMMUModelTypeToString(src->iommu->model));
+ !virDomainIOMMUDefCheckABIStability(src->iommu, dst->iommu))
goto error;
- }
=20
/* Coverity is not very happy with this - all dead_error_condition */
#if !STATIC_ANALYSIS
--=20
2.10.2
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
From nobody Fri May 3 14:56:44 2024
Delivered-To: importer@patchew.org
Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28
as permitted sender) client-ip=209.132.183.28;
envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com;
Authentication-Results: mx.zoho.com;
spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as
permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com;
Return-Path:
Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by
mx.zohomail.com
with SMTPS id 149460187575632.33481395948854;
Fri, 12 May 2017 08:11:15 -0700 (PDT)
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 2CB28C0467C2;
Fri, 12 May 2017 15:11:14 +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 05A888D56D;
Fri, 12 May 2017 15:11:14 +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 9748D1800C8E;
Fri, 12 May 2017 15:11:13 +0000 (UTC)
Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com
[10.5.11.12])
by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP
id v4CFB94H027768 for ;
Fri, 12 May 2017 11:11:09 -0400
Received: by smtp.corp.redhat.com (Postfix)
id B49CD7FCDC; Fri, 12 May 2017 15:11:09 +0000 (UTC)
Received: from icr.brq.redhat.com (dhcp129-58.brq.redhat.com [10.34.129.58])
by smtp.corp.redhat.com (Postfix) with ESMTP id 3B28760F8A
for ; Fri, 12 May 2017 15:11:09 +0000 (UTC)
DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 2CB28C0467C2
Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com;
dmarc=none (p=none dis=none) header.from=redhat.com
Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com;
spf=pass smtp.mailfrom=libvir-list-bounces@redhat.com
DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 2CB28C0467C2
From: =?UTF-8?q?J=C3=A1n=20Tomko?=
To: libvir-list@redhat.com
Date: Fri, 12 May 2017 17:08:50 +0200
Message-Id:
In-Reply-To:
References:
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12
X-loop: libvir-list@redhat.com
Subject: [libvirt] [PATCHv4 8/6] conf: add ABI stability checks for IOMMU
options
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: ,
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Sender: libvir-list-bounces@redhat.com
Errors-To: libvir-list-bounces@redhat.com
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11
X-Greylist: Sender IP whitelisted,
not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]);
Fri, 12 May 2017 15:11:14 +0000 (UTC)
X-ZohoMail: RSF_0 Z_629925259 SPT_0
Content-Type: text/plain; charset="utf-8"
https://bugzilla.redhat.com/show_bug.cgi?id=3D1427005
---
src/conf/domain_conf.c | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 669860c..9eba70a 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -19691,6 +19691,16 @@ virDomainDefFeaturesCheckABIStability(virDomainDef=
Ptr src,
}
}
=20
+ /* ioapic */
+ if (src->ioapic !=3D dst->ioapic) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ _("State of ioapic differs: "
+ "source: '%s', destination: '%s'"),
+ virDomainIOAPICTypeToString(src->ioapic),
+ virDomainIOAPICTypeToString(dst->ioapic));
+ return false;
+ }
+
return true;
}
=20
@@ -19830,6 +19840,22 @@ virDomainIOMMUDefCheckABIStability(virDomainIOMMUD=
efPtr src,
virDomainIOMMUModelTypeToString(src->model));
return false;
}
+ if (src->intremap !=3D dst->intremap) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ _("Target domain IOMMU device intremap value '%s' "
+ "does not match source '%s'"),
+ virTristateSwitchTypeToString(dst->intremap),
+ virTristateSwitchTypeToString(src->intremap));
+ return false;
+ }
+ if (src->caching_mode !=3D dst->caching_mode) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ _("Target domain IOMMU device caching mode '%s' "
+ "does not match source '%s'"),
+ virTristateSwitchTypeToString(dst->caching_mode),
+ virTristateSwitchTypeToString(src->caching_mode));
+ return false;
+ }
return true;
}
=20
--=20
2.10.2
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
From nobody Fri May 3 14:56:44 2024
Delivered-To: importer@patchew.org
Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28
as permitted sender) client-ip=209.132.183.28;
envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com;
Authentication-Results: mx.zoho.com;
spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as
permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com;
Return-Path:
Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by
mx.zohomail.com
with SMTPS id 1494600072611666.22009004916;
Fri, 12 May 2017 07:41:12 -0700 (PDT)
Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com
[10.5.11.14])
(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
(No client certificate requested)
by mx1.redhat.com (Postfix) with ESMTPS id DE20664D86;
Fri, 12 May 2017 14:41:09 +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 99EA37DB45;
Fri, 12 May 2017 14:41:09 +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 95FDF5EC68;
Fri, 12 May 2017 14:41:08 +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 v4CEf6vG023296 for ;
Fri, 12 May 2017 10:41:06 -0400
Received: by smtp.corp.redhat.com (Postfix)
id 89D1F5C541; Fri, 12 May 2017 14:41:06 +0000 (UTC)
Received: from icr.brq.redhat.com (dhcp129-58.brq.redhat.com [10.34.129.58])
by smtp.corp.redhat.com (Postfix) with ESMTP id 01ED35C89F
for ; Fri, 12 May 2017 14:41:02 +0000 (UTC)
DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com DE20664D86
Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com;
dmarc=none (p=none dis=none) header.from=redhat.com
Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com;
spf=pass smtp.mailfrom=libvir-list-bounces@redhat.com
DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com DE20664D86
From: =?UTF-8?q?J=C3=A1n=20Tomko?=
To: libvir-list@redhat.com
Date: Fri, 12 May 2017 16:38:43 +0200
Message-Id:
In-Reply-To:
References:
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16
X-loop: libvir-list@redhat.com
Subject: [libvirt] [PATCH 1.5/6] qemu: advertise ioapic tuning in the
capabilities
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: ,
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Sender: libvir-list-bounces@redhat.com
Errors-To: libvir-list-bounces@redhat.com
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14
X-Greylist: Sender IP whitelisted,
not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]);
Fri, 12 May 2017 14:41:10 +0000 (UTC)
X-ZohoMail: RSF_0 Z_629925259 SPT_0
Content-Type: text/plain; charset="utf-8"
Add an element to .
https://bugzilla.redhat.com/show_bug.cgi?id=3D1427005
---
docs/formatcaps.html.in | 3 +++
src/conf/capabilities.c | 3 ++-
src/qemu/qemu_capabilities.c | 3 ++-
tests/qemucaps2xmldata/all_1.6.0-1.xml | 1 +
tests/qemucaps2xmldata/nodisksnapshot_1.6.0-1.xml | 1 +
5 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/docs/formatcaps.html.in b/docs/formatcaps.html.in
index bc4511c..5b8ee5f 100644
--- a/docs/formatcaps.html.in
+++ b/docs/formatcaps.html.in
@@ -134,6 +134,9 @@
requires attempting the API and checking for an error to
find out for sure. Since
1.2.3
+
apic
If this element is present,
+ the I/O APIC chip can be tuned.
+ Since 3.4.0