|
|
3e5111 |
From f341f4c03ec726b6004e477259ba2da0932528e3 Mon Sep 17 00:00:00 2001
|
|
|
3e5111 |
Message-Id: <f341f4c03ec726b6004e477259ba2da0932528e3@dist-git>
|
|
|
3e5111 |
From: =?UTF-8?q?J=C3=A1n=20Tomko?= <jtomko@redhat.com>
|
|
|
3e5111 |
Date: Tue, 16 May 2017 10:44:55 +0200
|
|
|
3e5111 |
Subject: [PATCH] qemu: format intel-iommu, intremap on the command line
|
|
|
3e5111 |
MIME-Version: 1.0
|
|
|
3e5111 |
Content-Type: text/plain; charset=UTF-8
|
|
|
3e5111 |
Content-Transfer-Encoding: 8bit
|
|
|
3e5111 |
|
|
|
3e5111 |
https://bugzilla.redhat.com/show_bug.cgi?id=1427005
|
|
|
3e5111 |
(cherry picked from commit 04028a9db9f2657e8d57d1e4705073c908aa248c)
|
|
|
3e5111 |
Signed-off-by: Ján Tomko <jtomko@redhat.com>
|
|
|
3e5111 |
|
|
|
3e5111 |
Conflicts:
|
|
|
3e5111 |
tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml
|
|
|
3e5111 |
- downstream did not update qemu version to 2.9.0
|
|
|
3e5111 |
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
|
|
3e5111 |
---
|
|
|
3e5111 |
src/qemu/qemu_capabilities.c | 8 ++++
|
|
|
3e5111 |
src/qemu/qemu_capabilities.h | 1 +
|
|
|
3e5111 |
src/qemu/qemu_command.c | 18 ++++++++
|
|
|
3e5111 |
.../qemucapabilitiesdata/caps_2.4.0.x86_64.replies | 22 +++++++---
|
|
|
3e5111 |
.../qemucapabilitiesdata/caps_2.5.0.x86_64.replies | 24 +++++++----
|
|
|
3e5111 |
.../qemucapabilitiesdata/caps_2.6.0.x86_64.replies | 24 +++++++----
|
|
|
3e5111 |
.../qemucapabilitiesdata/caps_2.7.0.x86_64.replies | 28 +++++++++----
|
|
|
3e5111 |
tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml | 1 +
|
|
|
3e5111 |
.../qemucapabilitiesdata/caps_2.8.0.x86_64.replies | 37 ++++++++++++----
|
|
|
3e5111 |
tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml | 1 +
|
|
|
3e5111 |
.../qemucapabilitiesdata/caps_2.9.0.x86_64.replies | 49 ++++++++++++++++++----
|
|
|
3e5111 |
tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml | 1 +
|
|
|
3e5111 |
.../qemuxml2argv-intel-iommu-ioapic.args | 2 +-
|
|
|
3e5111 |
tests/qemuxml2argvtest.c | 1 +
|
|
|
3e5111 |
14 files changed, 173 insertions(+), 44 deletions(-)
|
|
|
3e5111 |
|
|
|
3e5111 |
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
|
|
|
3e5111 |
index f27fe0a24..4fd0df260 100644
|
|
|
3e5111 |
--- a/src/qemu/qemu_capabilities.c
|
|
|
3e5111 |
+++ b/src/qemu/qemu_capabilities.c
|
|
|
3e5111 |
@@ -369,6 +369,7 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST,
|
|
|
3e5111 |
|
|
|
3e5111 |
"kernel-irqchip", /* 255 */
|
|
|
3e5111 |
"kernel-irqchip.split",
|
|
|
3e5111 |
+ "intel-iommu.intremap",
|
|
|
3e5111 |
);
|
|
|
3e5111 |
|
|
|
3e5111 |
|
|
|
3e5111 |
@@ -1721,6 +1722,10 @@ static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsUSBNECXHCI[] = {
|
|
|
3e5111 |
{ "p3", QEMU_CAPS_NEC_USB_XHCI_PORTS },
|
|
|
3e5111 |
};
|
|
|
3e5111 |
|
|
|
3e5111 |
+static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsIntelIOMMU[] = {
|
|
|
3e5111 |
+ { "intremap", QEMU_CAPS_INTEL_IOMMU_INTREMAP },
|
|
|
3e5111 |
+};
|
|
|
3e5111 |
+
|
|
|
3e5111 |
/* see documentation for virQEMUCapsQMPSchemaGetByPath for the query format */
|
|
|
3e5111 |
static struct virQEMUCapsStringFlags virQEMUCapsQMPSchemaQueries[] = {
|
|
|
3e5111 |
{ "blockdev-add/arg-type/options/+gluster/debug-level", QEMU_CAPS_GLUSTER_DEBUG_LEVEL},
|
|
|
3e5111 |
@@ -1828,6 +1833,9 @@ static struct virQEMUCapsObjectTypeProps virQEMUCapsObjectProps[] = {
|
|
|
3e5111 |
{ "nec-usb-xhci", virQEMUCapsObjectPropsUSBNECXHCI,
|
|
|
3e5111 |
ARRAY_CARDINALITY(virQEMUCapsObjectPropsUSBNECXHCI),
|
|
|
3e5111 |
-1 },
|
|
|
3e5111 |
+ { "intel-iommu", virQEMUCapsObjectPropsIntelIOMMU,
|
|
|
3e5111 |
+ ARRAY_CARDINALITY(virQEMUCapsObjectPropsIntelIOMMU),
|
|
|
3e5111 |
+ QEMU_CAPS_DEVICE_INTEL_IOMMU},
|
|
|
3e5111 |
};
|
|
|
3e5111 |
|
|
|
3e5111 |
struct virQEMUCapsPropTypeObjects {
|
|
|
3e5111 |
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
|
|
|
3e5111 |
index a6cdf2c3d..d1730a725 100644
|
|
|
3e5111 |
--- a/src/qemu/qemu_capabilities.h
|
|
|
3e5111 |
+++ b/src/qemu/qemu_capabilities.h
|
|
|
3e5111 |
@@ -407,6 +407,7 @@ typedef enum {
|
|
|
3e5111 |
/* 255 */
|
|
|
3e5111 |
QEMU_CAPS_MACHINE_KERNEL_IRQCHIP, /* -machine kernel_irqchip */
|
|
|
3e5111 |
QEMU_CAPS_MACHINE_KERNEL_IRQCHIP_SPLIT, /* -machine kernel_irqchip=split */
|
|
|
3e5111 |
+ QEMU_CAPS_INTEL_IOMMU_INTREMAP, /* intel-iommu.intremap */
|
|
|
3e5111 |
|
|
|
3e5111 |
QEMU_CAPS_LAST /* this must always be the last item */
|
|
|
3e5111 |
} virQEMUCapsFlags;
|
|
|
3e5111 |
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
|
|
|
3e5111 |
index 7151b1843..a8dac1489 100644
|
|
|
3e5111 |
--- a/src/qemu/qemu_command.c
|
|
|
3e5111 |
+++ b/src/qemu/qemu_command.c
|
|
|
3e5111 |
@@ -6671,6 +6671,20 @@ qemuBuildIOMMUCommandLine(virCommandPtr cmd,
|
|
|
3e5111 |
if (!iommu)
|
|
|
3e5111 |
return 0;
|
|
|
3e5111 |
|
|
|
3e5111 |
+ switch (iommu->model) {
|
|
|
3e5111 |
+ case VIR_DOMAIN_IOMMU_MODEL_INTEL:
|
|
|
3e5111 |
+ if (iommu->intremap != VIR_TRISTATE_SWITCH_ABSENT &&
|
|
|
3e5111 |
+ !virQEMUCapsGet(qemuCaps, QEMU_CAPS_INTEL_IOMMU_INTREMAP)) {
|
|
|
3e5111 |
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
|
|
3e5111 |
+ _("iommu: interrupt remapping is not supported "
|
|
|
3e5111 |
+ "with this QEMU binary"));
|
|
|
3e5111 |
+ return -1;
|
|
|
3e5111 |
+ }
|
|
|
3e5111 |
+ break;
|
|
|
3e5111 |
+ case VIR_DOMAIN_IOMMU_MODEL_LAST:
|
|
|
3e5111 |
+ break;
|
|
|
3e5111 |
+ }
|
|
|
3e5111 |
+
|
|
|
3e5111 |
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_MACHINE_IOMMU))
|
|
|
3e5111 |
return 0; /* Already handled via -machine */
|
|
|
3e5111 |
|
|
|
3e5111 |
@@ -6691,6 +6705,10 @@ qemuBuildIOMMUCommandLine(virCommandPtr cmd,
|
|
|
3e5111 |
return -1;
|
|
|
3e5111 |
}
|
|
|
3e5111 |
virBufferAddLit(&opts, "intel-iommu");
|
|
|
3e5111 |
+ if (iommu->intremap != VIR_TRISTATE_SWITCH_ABSENT) {
|
|
|
3e5111 |
+ virBufferAsprintf(&opts, ",intremap=%s",
|
|
|
3e5111 |
+ virTristateSwitchTypeToString(iommu->intremap));
|
|
|
3e5111 |
+ }
|
|
|
3e5111 |
case VIR_DOMAIN_IOMMU_MODEL_LAST:
|
|
|
3e5111 |
break;
|
|
|
3e5111 |
}
|
|
|
3e5111 |
diff --git a/tests/qemucapabilitiesdata/caps_2.4.0.x86_64.replies b/tests/qemucapabilitiesdata/caps_2.4.0.x86_64.replies
|
|
|
3e5111 |
index 68221816b..9f256c48a 100644
|
|
|
3e5111 |
--- a/tests/qemucapabilitiesdata/caps_2.4.0.x86_64.replies
|
|
|
3e5111 |
+++ b/tests/qemucapabilitiesdata/caps_2.4.0.x86_64.replies
|
|
|
3e5111 |
@@ -3123,6 +3123,16 @@
|
|
|
3e5111 |
{
|
|
|
3e5111 |
"return": [
|
|
|
3e5111 |
{
|
|
|
3e5111 |
+ "name": "version",
|
|
|
3e5111 |
+ "type": "uint32"
|
|
|
3e5111 |
+ }
|
|
|
3e5111 |
+ ],
|
|
|
3e5111 |
+ "id": "libvirt-41"
|
|
|
3e5111 |
+}
|
|
|
3e5111 |
+
|
|
|
3e5111 |
+{
|
|
|
3e5111 |
+ "return": [
|
|
|
3e5111 |
+ {
|
|
|
3e5111 |
"name": "pc-i440fx-2.4",
|
|
|
3e5111 |
"is-default": true,
|
|
|
3e5111 |
"cpu-max": 255,
|
|
|
3e5111 |
@@ -3246,7 +3256,7 @@
|
|
|
3e5111 |
"cpu-max": 255
|
|
|
3e5111 |
}
|
|
|
3e5111 |
],
|
|
|
3e5111 |
- "id": "libvirt-41"
|
|
|
3e5111 |
+ "id": "libvirt-42"
|
|
|
3e5111 |
}
|
|
|
3e5111 |
|
|
|
3e5111 |
{
|
|
|
3e5111 |
@@ -3336,21 +3346,21 @@
|
|
|
3e5111 |
"name": "qemu64"
|
|
|
3e5111 |
}
|
|
|
3e5111 |
],
|
|
|
3e5111 |
- "id": "libvirt-42"
|
|
|
3e5111 |
+ "id": "libvirt-43"
|
|
|
3e5111 |
}
|
|
|
3e5111 |
|
|
|
3e5111 |
{
|
|
|
3e5111 |
"return": [
|
|
|
3e5111 |
"tpm-tis"
|
|
|
3e5111 |
],
|
|
|
3e5111 |
- "id": "libvirt-43"
|
|
|
3e5111 |
+ "id": "libvirt-44"
|
|
|
3e5111 |
}
|
|
|
3e5111 |
|
|
|
3e5111 |
{
|
|
|
3e5111 |
"return": [
|
|
|
3e5111 |
"passthrough"
|
|
|
3e5111 |
],
|
|
|
3e5111 |
- "id": "libvirt-44"
|
|
|
3e5111 |
+ "id": "libvirt-45"
|
|
|
3e5111 |
}
|
|
|
3e5111 |
|
|
|
3e5111 |
{
|
|
|
3e5111 |
@@ -4358,7 +4368,7 @@
|
|
|
3e5111 |
"option": "drive"
|
|
|
3e5111 |
}
|
|
|
3e5111 |
],
|
|
|
3e5111 |
- "id": "libvirt-45"
|
|
|
3e5111 |
+ "id": "libvirt-46"
|
|
|
3e5111 |
}
|
|
|
3e5111 |
|
|
|
3e5111 |
{
|
|
|
3e5111 |
@@ -4388,7 +4398,7 @@
|
|
|
3e5111 |
"capability": "events"
|
|
|
3e5111 |
}
|
|
|
3e5111 |
],
|
|
|
3e5111 |
- "id": "libvirt-46"
|
|
|
3e5111 |
+ "id": "libvirt-47"
|
|
|
3e5111 |
}
|
|
|
3e5111 |
|
|
|
3e5111 |
{
|
|
|
3e5111 |
diff --git a/tests/qemucapabilitiesdata/caps_2.5.0.x86_64.replies b/tests/qemucapabilitiesdata/caps_2.5.0.x86_64.replies
|
|
|
3e5111 |
index 2eeed7d6c..876bc2f0a 100644
|
|
|
3e5111 |
--- a/tests/qemucapabilitiesdata/caps_2.5.0.x86_64.replies
|
|
|
3e5111 |
+++ b/tests/qemucapabilitiesdata/caps_2.5.0.x86_64.replies
|
|
|
3e5111 |
@@ -3286,6 +3286,16 @@
|
|
|
3e5111 |
{
|
|
|
3e5111 |
"return": [
|
|
|
3e5111 |
{
|
|
|
3e5111 |
+ "name": "version",
|
|
|
3e5111 |
+ "type": "uint32"
|
|
|
3e5111 |
+ }
|
|
|
3e5111 |
+ ],
|
|
|
3e5111 |
+ "id": "libvirt-41"
|
|
|
3e5111 |
+}
|
|
|
3e5111 |
+
|
|
|
3e5111 |
+{
|
|
|
3e5111 |
+ "return": [
|
|
|
3e5111 |
+ {
|
|
|
3e5111 |
"name": "pc-i440fx-2.4",
|
|
|
3e5111 |
"cpu-max": 255
|
|
|
3e5111 |
},
|
|
|
3e5111 |
@@ -3417,7 +3427,7 @@
|
|
|
3e5111 |
"cpu-max": 255
|
|
|
3e5111 |
}
|
|
|
3e5111 |
],
|
|
|
3e5111 |
- "id": "libvirt-41"
|
|
|
3e5111 |
+ "id": "libvirt-42"
|
|
|
3e5111 |
}
|
|
|
3e5111 |
|
|
|
3e5111 |
{
|
|
|
3e5111 |
@@ -3507,21 +3517,21 @@
|
|
|
3e5111 |
"name": "qemu64"
|
|
|
3e5111 |
}
|
|
|
3e5111 |
],
|
|
|
3e5111 |
- "id": "libvirt-42"
|
|
|
3e5111 |
+ "id": "libvirt-43"
|
|
|
3e5111 |
}
|
|
|
3e5111 |
|
|
|
3e5111 |
{
|
|
|
3e5111 |
"return": [
|
|
|
3e5111 |
"tpm-tis"
|
|
|
3e5111 |
],
|
|
|
3e5111 |
- "id": "libvirt-43"
|
|
|
3e5111 |
+ "id": "libvirt-44"
|
|
|
3e5111 |
}
|
|
|
3e5111 |
|
|
|
3e5111 |
{
|
|
|
3e5111 |
"return": [
|
|
|
3e5111 |
"passthrough"
|
|
|
3e5111 |
],
|
|
|
3e5111 |
- "id": "libvirt-44"
|
|
|
3e5111 |
+ "id": "libvirt-45"
|
|
|
3e5111 |
}
|
|
|
3e5111 |
|
|
|
3e5111 |
{
|
|
|
3e5111 |
@@ -4566,7 +4576,7 @@
|
|
|
3e5111 |
"option": "drive"
|
|
|
3e5111 |
}
|
|
|
3e5111 |
],
|
|
|
3e5111 |
- "id": "libvirt-45"
|
|
|
3e5111 |
+ "id": "libvirt-46"
|
|
|
3e5111 |
}
|
|
|
3e5111 |
|
|
|
3e5111 |
{
|
|
|
3e5111 |
@@ -4600,7 +4610,7 @@
|
|
|
3e5111 |
"capability": "x-postcopy-ram"
|
|
|
3e5111 |
}
|
|
|
3e5111 |
],
|
|
|
3e5111 |
- "id": "libvirt-46"
|
|
|
3e5111 |
+ "id": "libvirt-47"
|
|
|
3e5111 |
}
|
|
|
3e5111 |
|
|
|
3e5111 |
{
|
|
|
3e5111 |
@@ -12145,7 +12155,7 @@
|
|
|
3e5111 |
"meta-type": "array"
|
|
|
3e5111 |
}
|
|
|
3e5111 |
],
|
|
|
3e5111 |
- "id": "libvirt-47"
|
|
|
3e5111 |
+ "id": "libvirt-48"
|
|
|
3e5111 |
}
|
|
|
3e5111 |
|
|
|
3e5111 |
{
|
|
|
3e5111 |
diff --git a/tests/qemucapabilitiesdata/caps_2.6.0.x86_64.replies b/tests/qemucapabilitiesdata/caps_2.6.0.x86_64.replies
|
|
|
3e5111 |
index 0c285cd95..d6d0b5786 100644
|
|
|
3e5111 |
--- a/tests/qemucapabilitiesdata/caps_2.6.0.x86_64.replies
|
|
|
3e5111 |
+++ b/tests/qemucapabilitiesdata/caps_2.6.0.x86_64.replies
|
|
|
3e5111 |
@@ -3368,6 +3368,16 @@
|
|
|
3e5111 |
{
|
|
|
3e5111 |
"return": [
|
|
|
3e5111 |
{
|
|
|
3e5111 |
+ "name": "version",
|
|
|
3e5111 |
+ "type": "uint32"
|
|
|
3e5111 |
+ }
|
|
|
3e5111 |
+ ],
|
|
|
3e5111 |
+ "id": "libvirt-41"
|
|
|
3e5111 |
+}
|
|
|
3e5111 |
+
|
|
|
3e5111 |
+{
|
|
|
3e5111 |
+ "return": [
|
|
|
3e5111 |
+ {
|
|
|
3e5111 |
"name": "pc-0.12",
|
|
|
3e5111 |
"cpu-max": 255
|
|
|
3e5111 |
},
|
|
|
3e5111 |
@@ -3475,7 +3485,7 @@
|
|
|
3e5111 |
"cpu-max": 255
|
|
|
3e5111 |
}
|
|
|
3e5111 |
],
|
|
|
3e5111 |
- "id": "libvirt-41"
|
|
|
3e5111 |
+ "id": "libvirt-42"
|
|
|
3e5111 |
}
|
|
|
3e5111 |
|
|
|
3e5111 |
{
|
|
|
3e5111 |
@@ -3565,21 +3575,21 @@
|
|
|
3e5111 |
"name": "qemu64"
|
|
|
3e5111 |
}
|
|
|
3e5111 |
],
|
|
|
3e5111 |
- "id": "libvirt-42"
|
|
|
3e5111 |
+ "id": "libvirt-43"
|
|
|
3e5111 |
}
|
|
|
3e5111 |
|
|
|
3e5111 |
{
|
|
|
3e5111 |
"return": [
|
|
|
3e5111 |
"tpm-tis"
|
|
|
3e5111 |
],
|
|
|
3e5111 |
- "id": "libvirt-43"
|
|
|
3e5111 |
+ "id": "libvirt-44"
|
|
|
3e5111 |
}
|
|
|
3e5111 |
|
|
|
3e5111 |
{
|
|
|
3e5111 |
"return": [
|
|
|
3e5111 |
"passthrough"
|
|
|
3e5111 |
],
|
|
|
3e5111 |
- "id": "libvirt-44"
|
|
|
3e5111 |
+ "id": "libvirt-45"
|
|
|
3e5111 |
}
|
|
|
3e5111 |
|
|
|
3e5111 |
{
|
|
|
3e5111 |
@@ -4673,7 +4683,7 @@
|
|
|
3e5111 |
"option": "drive"
|
|
|
3e5111 |
}
|
|
|
3e5111 |
],
|
|
|
3e5111 |
- "id": "libvirt-45"
|
|
|
3e5111 |
+ "id": "libvirt-46"
|
|
|
3e5111 |
}
|
|
|
3e5111 |
|
|
|
3e5111 |
{
|
|
|
3e5111 |
@@ -4707,7 +4717,7 @@
|
|
|
3e5111 |
"capability": "postcopy-ram"
|
|
|
3e5111 |
}
|
|
|
3e5111 |
],
|
|
|
3e5111 |
- "id": "libvirt-46"
|
|
|
3e5111 |
+ "id": "libvirt-47"
|
|
|
3e5111 |
}
|
|
|
3e5111 |
|
|
|
3e5111 |
{
|
|
|
3e5111 |
@@ -12712,7 +12722,7 @@
|
|
|
3e5111 |
"meta-type": "array"
|
|
|
3e5111 |
}
|
|
|
3e5111 |
],
|
|
|
3e5111 |
- "id": "libvirt-47"
|
|
|
3e5111 |
+ "id": "libvirt-48"
|
|
|
3e5111 |
}
|
|
|
3e5111 |
|
|
|
3e5111 |
{
|
|
|
3e5111 |
diff --git a/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.replies b/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.replies
|
|
|
3e5111 |
index 4a872370b..671a958be 100644
|
|
|
3e5111 |
--- a/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.replies
|
|
|
3e5111 |
+++ b/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.replies
|
|
|
3e5111 |
@@ -3559,6 +3559,20 @@
|
|
|
3e5111 |
{
|
|
|
3e5111 |
"return": [
|
|
|
3e5111 |
{
|
|
|
3e5111 |
+ "name": "version",
|
|
|
3e5111 |
+ "type": "uint32"
|
|
|
3e5111 |
+ },
|
|
|
3e5111 |
+ {
|
|
|
3e5111 |
+ "name": "intremap",
|
|
|
3e5111 |
+ "type": "bool"
|
|
|
3e5111 |
+ }
|
|
|
3e5111 |
+ ],
|
|
|
3e5111 |
+ "id": "libvirt-41"
|
|
|
3e5111 |
+}
|
|
|
3e5111 |
+
|
|
|
3e5111 |
+{
|
|
|
3e5111 |
+ "return": [
|
|
|
3e5111 |
+ {
|
|
|
3e5111 |
"hotpluggable-cpus": true,
|
|
|
3e5111 |
"name": "pc-0.12",
|
|
|
3e5111 |
"cpu-max": 255
|
|
|
3e5111 |
@@ -3702,7 +3716,7 @@
|
|
|
3e5111 |
"cpu-max": 255
|
|
|
3e5111 |
}
|
|
|
3e5111 |
],
|
|
|
3e5111 |
- "id": "libvirt-41"
|
|
|
3e5111 |
+ "id": "libvirt-42"
|
|
|
3e5111 |
}
|
|
|
3e5111 |
|
|
|
3e5111 |
{
|
|
|
3e5111 |
@@ -3795,21 +3809,21 @@
|
|
|
3e5111 |
"name": "qemu64"
|
|
|
3e5111 |
}
|
|
|
3e5111 |
],
|
|
|
3e5111 |
- "id": "libvirt-42"
|
|
|
3e5111 |
+ "id": "libvirt-43"
|
|
|
3e5111 |
}
|
|
|
3e5111 |
|
|
|
3e5111 |
{
|
|
|
3e5111 |
"return": [
|
|
|
3e5111 |
"tpm-tis"
|
|
|
3e5111 |
],
|
|
|
3e5111 |
- "id": "libvirt-43"
|
|
|
3e5111 |
+ "id": "libvirt-44"
|
|
|
3e5111 |
}
|
|
|
3e5111 |
|
|
|
3e5111 |
{
|
|
|
3e5111 |
"return": [
|
|
|
3e5111 |
"passthrough"
|
|
|
3e5111 |
],
|
|
|
3e5111 |
- "id": "libvirt-44"
|
|
|
3e5111 |
+ "id": "libvirt-45"
|
|
|
3e5111 |
}
|
|
|
3e5111 |
|
|
|
3e5111 |
{
|
|
|
3e5111 |
@@ -4907,7 +4921,7 @@
|
|
|
3e5111 |
"option": "drive"
|
|
|
3e5111 |
}
|
|
|
3e5111 |
],
|
|
|
3e5111 |
- "id": "libvirt-45"
|
|
|
3e5111 |
+ "id": "libvirt-46"
|
|
|
3e5111 |
}
|
|
|
3e5111 |
|
|
|
3e5111 |
{
|
|
|
3e5111 |
@@ -4941,7 +4955,7 @@
|
|
|
3e5111 |
"capability": "postcopy-ram"
|
|
|
3e5111 |
}
|
|
|
3e5111 |
],
|
|
|
3e5111 |
- "id": "libvirt-46"
|
|
|
3e5111 |
+ "id": "libvirt-47"
|
|
|
3e5111 |
}
|
|
|
3e5111 |
|
|
|
3e5111 |
{
|
|
|
3e5111 |
@@ -13297,7 +13311,7 @@
|
|
|
3e5111 |
"meta-type": "object"
|
|
|
3e5111 |
}
|
|
|
3e5111 |
],
|
|
|
3e5111 |
- "id": "libvirt-47"
|
|
|
3e5111 |
+ "id": "libvirt-48"
|
|
|
3e5111 |
}
|
|
|
3e5111 |
|
|
|
3e5111 |
{
|
|
|
3e5111 |
diff --git a/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml
|
|
|
3e5111 |
index 6c2ea59c6..49c046212 100644
|
|
|
3e5111 |
--- a/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml
|
|
|
3e5111 |
+++ b/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml
|
|
|
3e5111 |
@@ -204,6 +204,7 @@
|
|
|
3e5111 |
<flag name='query-named-block-nodes'/>
|
|
|
3e5111 |
<flag name='kernel-irqchip'/>
|
|
|
3e5111 |
<flag name='kernel-irqchip.split'/>
|
|
|
3e5111 |
+ <flag name='intel-iommu.intremap'/>
|
|
|
3e5111 |
<version>2007000</version>
|
|
|
3e5111 |
<kvmVersion>0</kvmVersion>
|
|
|
3e5111 |
<package> (v2.7.0)</package>
|
|
|
3e5111 |
diff --git a/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.replies b/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.replies
|
|
|
3e5111 |
index b3ad9121e..3087d7680 100644
|
|
|
3e5111 |
--- a/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.replies
|
|
|
3e5111 |
+++ b/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.replies
|
|
|
3e5111 |
@@ -3692,6 +3692,29 @@
|
|
|
3e5111 |
{
|
|
|
3e5111 |
"return": [
|
|
|
3e5111 |
{
|
|
|
3e5111 |
+ "name": "eim",
|
|
|
3e5111 |
+ "description": "on/off/auto",
|
|
|
3e5111 |
+ "type": "OnOffAuto"
|
|
|
3e5111 |
+ },
|
|
|
3e5111 |
+ {
|
|
|
3e5111 |
+ "name": "x-buggy-eim",
|
|
|
3e5111 |
+ "type": "bool"
|
|
|
3e5111 |
+ },
|
|
|
3e5111 |
+ {
|
|
|
3e5111 |
+ "name": "intremap",
|
|
|
3e5111 |
+ "type": "bool"
|
|
|
3e5111 |
+ },
|
|
|
3e5111 |
+ {
|
|
|
3e5111 |
+ "name": "version",
|
|
|
3e5111 |
+ "type": "uint32"
|
|
|
3e5111 |
+ }
|
|
|
3e5111 |
+ ],
|
|
|
3e5111 |
+ "id": "libvirt-41"
|
|
|
3e5111 |
+}
|
|
|
3e5111 |
+
|
|
|
3e5111 |
+{
|
|
|
3e5111 |
+ "return": [
|
|
|
3e5111 |
+ {
|
|
|
3e5111 |
"hotpluggable-cpus": true,
|
|
|
3e5111 |
"name": "pc-0.12",
|
|
|
3e5111 |
"cpu-max": 255
|
|
|
3e5111 |
@@ -3855,7 +3878,7 @@
|
|
|
3e5111 |
"cpu-max": 255
|
|
|
3e5111 |
}
|
|
|
3e5111 |
],
|
|
|
3e5111 |
- "id": "libvirt-41"
|
|
|
3e5111 |
+ "id": "libvirt-42"
|
|
|
3e5111 |
}
|
|
|
3e5111 |
|
|
|
3e5111 |
{
|
|
|
3e5111 |
@@ -4061,21 +4084,21 @@
|
|
|
3e5111 |
"static": false
|
|
|
3e5111 |
}
|
|
|
3e5111 |
],
|
|
|
3e5111 |
- "id": "libvirt-42"
|
|
|
3e5111 |
+ "id": "libvirt-43"
|
|
|
3e5111 |
}
|
|
|
3e5111 |
|
|
|
3e5111 |
{
|
|
|
3e5111 |
"return": [
|
|
|
3e5111 |
"tpm-tis"
|
|
|
3e5111 |
],
|
|
|
3e5111 |
- "id": "libvirt-43"
|
|
|
3e5111 |
+ "id": "libvirt-44"
|
|
|
3e5111 |
}
|
|
|
3e5111 |
|
|
|
3e5111 |
{
|
|
|
3e5111 |
"return": [
|
|
|
3e5111 |
"passthrough"
|
|
|
3e5111 |
],
|
|
|
3e5111 |
- "id": "libvirt-44"
|
|
|
3e5111 |
+ "id": "libvirt-45"
|
|
|
3e5111 |
}
|
|
|
3e5111 |
|
|
|
3e5111 |
{
|
|
|
3e5111 |
@@ -5198,7 +5221,7 @@
|
|
|
3e5111 |
"option": "drive"
|
|
|
3e5111 |
}
|
|
|
3e5111 |
],
|
|
|
3e5111 |
- "id": "libvirt-45"
|
|
|
3e5111 |
+ "id": "libvirt-46"
|
|
|
3e5111 |
}
|
|
|
3e5111 |
|
|
|
3e5111 |
{
|
|
|
3e5111 |
@@ -5236,7 +5259,7 @@
|
|
|
3e5111 |
"capability": "x-colo"
|
|
|
3e5111 |
}
|
|
|
3e5111 |
],
|
|
|
3e5111 |
- "id": "libvirt-46"
|
|
|
3e5111 |
+ "id": "libvirt-47"
|
|
|
3e5111 |
}
|
|
|
3e5111 |
|
|
|
3e5111 |
{
|
|
|
3e5111 |
@@ -14006,7 +14029,7 @@
|
|
|
3e5111 |
"meta-type": "object"
|
|
|
3e5111 |
}
|
|
|
3e5111 |
],
|
|
|
3e5111 |
- "id": "libvirt-47"
|
|
|
3e5111 |
+ "id": "libvirt-48"
|
|
|
3e5111 |
}
|
|
|
3e5111 |
|
|
|
3e5111 |
{
|
|
|
3e5111 |
diff --git a/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml
|
|
|
3e5111 |
index 9c8c79ab0..e51567817 100644
|
|
|
3e5111 |
--- a/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml
|
|
|
3e5111 |
+++ b/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml
|
|
|
3e5111 |
@@ -205,6 +205,7 @@
|
|
|
3e5111 |
<flag name='query-named-block-nodes'/>
|
|
|
3e5111 |
<flag name='kernel-irqchip'/>
|
|
|
3e5111 |
<flag name='kernel-irqchip.split'/>
|
|
|
3e5111 |
+ <flag name='intel-iommu.intremap'/>
|
|
|
3e5111 |
<version>2008000</version>
|
|
|
3e5111 |
<kvmVersion>0</kvmVersion>
|
|
|
3e5111 |
<package> (v2.8.0)</package>
|
|
|
3e5111 |
diff --git a/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.replies b/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.replies
|
|
|
3e5111 |
index bae24750c..3cfefb709 100644
|
|
|
3e5111 |
--- a/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.replies
|
|
|
3e5111 |
+++ b/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.replies
|
|
|
3e5111 |
@@ -4003,6 +4003,37 @@
|
|
|
3e5111 |
{
|
|
|
3e5111 |
"return": [
|
|
|
3e5111 |
{
|
|
|
3e5111 |
+ "name": "eim",
|
|
|
3e5111 |
+ "description": "on/off/auto",
|
|
|
3e5111 |
+ "type": "OnOffAuto"
|
|
|
3e5111 |
+ },
|
|
|
3e5111 |
+ {
|
|
|
3e5111 |
+ "name": "caching-mode",
|
|
|
3e5111 |
+ "type": "bool"
|
|
|
3e5111 |
+ },
|
|
|
3e5111 |
+ {
|
|
|
3e5111 |
+ "name": "x-buggy-eim",
|
|
|
3e5111 |
+ "type": "bool"
|
|
|
3e5111 |
+ },
|
|
|
3e5111 |
+ {
|
|
|
3e5111 |
+ "name": "intremap",
|
|
|
3e5111 |
+ "type": "bool"
|
|
|
3e5111 |
+ },
|
|
|
3e5111 |
+ {
|
|
|
3e5111 |
+ "name": "version",
|
|
|
3e5111 |
+ "type": "uint32"
|
|
|
3e5111 |
+ },
|
|
|
3e5111 |
+ {
|
|
|
3e5111 |
+ "name": "device-iotlb",
|
|
|
3e5111 |
+ "type": "bool"
|
|
|
3e5111 |
+ }
|
|
|
3e5111 |
+ ],
|
|
|
3e5111 |
+ "id": "libvirt-41"
|
|
|
3e5111 |
+}
|
|
|
3e5111 |
+
|
|
|
3e5111 |
+{
|
|
|
3e5111 |
+ "return": [
|
|
|
3e5111 |
+ {
|
|
|
3e5111 |
"hotpluggable-cpus": true,
|
|
|
3e5111 |
"name": "pc-0.12",
|
|
|
3e5111 |
"cpu-max": 255
|
|
|
3e5111 |
@@ -4176,7 +4207,7 @@
|
|
|
3e5111 |
"cpu-max": 255
|
|
|
3e5111 |
}
|
|
|
3e5111 |
],
|
|
|
3e5111 |
- "id": "libvirt-41"
|
|
|
3e5111 |
+ "id": "libvirt-42"
|
|
|
3e5111 |
}
|
|
|
3e5111 |
|
|
|
3e5111 |
{
|
|
|
3e5111 |
@@ -4458,21 +4489,21 @@
|
|
|
3e5111 |
"migration-safe": true
|
|
|
3e5111 |
}
|
|
|
3e5111 |
],
|
|
|
3e5111 |
- "id": "libvirt-42"
|
|
|
3e5111 |
+ "id": "libvirt-43"
|
|
|
3e5111 |
}
|
|
|
3e5111 |
|
|
|
3e5111 |
{
|
|
|
3e5111 |
"return": [
|
|
|
3e5111 |
"tpm-tis"
|
|
|
3e5111 |
],
|
|
|
3e5111 |
- "id": "libvirt-43"
|
|
|
3e5111 |
+ "id": "libvirt-44"
|
|
|
3e5111 |
}
|
|
|
3e5111 |
|
|
|
3e5111 |
{
|
|
|
3e5111 |
"return": [
|
|
|
3e5111 |
"passthrough"
|
|
|
3e5111 |
],
|
|
|
3e5111 |
- "id": "libvirt-44"
|
|
|
3e5111 |
+ "id": "libvirt-45"
|
|
|
3e5111 |
}
|
|
|
3e5111 |
|
|
|
3e5111 |
{
|
|
|
3e5111 |
@@ -5721,7 +5752,7 @@
|
|
|
3e5111 |
"option": "drive"
|
|
|
3e5111 |
}
|
|
|
3e5111 |
],
|
|
|
3e5111 |
- "id": "libvirt-45"
|
|
|
3e5111 |
+ "id": "libvirt-46"
|
|
|
3e5111 |
}
|
|
|
3e5111 |
|
|
|
3e5111 |
{
|
|
|
3e5111 |
@@ -5763,7 +5794,7 @@
|
|
|
3e5111 |
"capability": "release-ram"
|
|
|
3e5111 |
}
|
|
|
3e5111 |
],
|
|
|
3e5111 |
- "id": "libvirt-46"
|
|
|
3e5111 |
+ "id": "libvirt-47"
|
|
|
3e5111 |
}
|
|
|
3e5111 |
|
|
|
3e5111 |
{
|
|
|
3e5111 |
@@ -14888,7 +14919,7 @@
|
|
|
3e5111 |
"meta-type": "object"
|
|
|
3e5111 |
}
|
|
|
3e5111 |
],
|
|
|
3e5111 |
- "id": "libvirt-47"
|
|
|
3e5111 |
+ "id": "libvirt-48"
|
|
|
3e5111 |
}
|
|
|
3e5111 |
|
|
|
3e5111 |
{
|
|
|
3e5111 |
@@ -15067,7 +15098,7 @@
|
|
|
3e5111 |
}
|
|
|
3e5111 |
}
|
|
|
3e5111 |
},
|
|
|
3e5111 |
- "id": "libvirt-48"
|
|
|
3e5111 |
+ "id": "libvirt-49"
|
|
|
3e5111 |
}
|
|
|
3e5111 |
|
|
|
3e5111 |
{
|
|
|
3e5111 |
@@ -15308,7 +15339,7 @@
|
|
|
3e5111 |
}
|
|
|
3e5111 |
}
|
|
|
3e5111 |
},
|
|
|
3e5111 |
- "id": "libvirt-49"
|
|
|
3e5111 |
+ "id": "libvirt-50"
|
|
|
3e5111 |
}
|
|
|
3e5111 |
|
|
|
3e5111 |
{
|
|
|
3e5111 |
diff --git a/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml
|
|
|
3e5111 |
index e4cdca89a..5a88cf505 100644
|
|
|
3e5111 |
--- a/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml
|
|
|
3e5111 |
+++ b/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml
|
|
|
3e5111 |
@@ -211,6 +211,7 @@
|
|
|
3e5111 |
<flag name='qemu-xhci'/>
|
|
|
3e5111 |
<flag name='kernel-irqchip'/>
|
|
|
3e5111 |
<flag name='kernel-irqchip.split'/>
|
|
|
3e5111 |
+ <flag name='intel-iommu.intremap'/>
|
|
|
3e5111 |
<version>2008090</version>
|
|
|
3e5111 |
<kvmVersion>0</kvmVersion>
|
|
|
3e5111 |
<package> (v2.9.0-rc0-142-g940a8ce)</package>
|
|
|
3e5111 |
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-intel-iommu-ioapic.args b/tests/qemuxml2argvdata/qemuxml2argv-intel-iommu-ioapic.args
|
|
|
3e5111 |
index 43d71adfc..c6539878a 100644
|
|
|
3e5111 |
--- a/tests/qemuxml2argvdata/qemuxml2argv-intel-iommu-ioapic.args
|
|
|
3e5111 |
+++ b/tests/qemuxml2argvdata/qemuxml2argv-intel-iommu-ioapic.args
|
|
|
3e5111 |
@@ -16,4 +16,4 @@ QEMU_AUDIO_DRV=none \
|
|
|
3e5111 |
-monitor unix:/tmp/lib/domain--1-QEMUGuest1/monitor.sock,server,nowait \
|
|
|
3e5111 |
-no-acpi \
|
|
|
3e5111 |
-boot c \
|
|
|
3e5111 |
--device intel-iommu
|
|
|
3e5111 |
+-device intel-iommu,intremap=on
|
|
|
3e5111 |
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
|
|
|
3e5111 |
index c7aad297c..8061292b3 100644
|
|
|
3e5111 |
--- a/tests/qemuxml2argvtest.c
|
|
|
3e5111 |
+++ b/tests/qemuxml2argvtest.c
|
|
|
3e5111 |
@@ -2521,6 +2521,7 @@ mymain(void)
|
|
|
3e5111 |
QEMU_CAPS_MACHINE_OPT,
|
|
|
3e5111 |
QEMU_CAPS_MACHINE_KERNEL_IRQCHIP,
|
|
|
3e5111 |
QEMU_CAPS_MACHINE_KERNEL_IRQCHIP_SPLIT,
|
|
|
3e5111 |
+ QEMU_CAPS_INTEL_IOMMU_INTREMAP,
|
|
|
3e5111 |
QEMU_CAPS_DEVICE_INTEL_IOMMU);
|
|
|
3e5111 |
|
|
|
3e5111 |
DO_TEST("cpu-hotplug-startup", QEMU_CAPS_QUERY_HOTPLUGGABLE_CPUS);
|
|
|
3e5111 |
--
|
|
|
3e5111 |
2.13.0
|
|
|
3e5111 |
|