|
|
9119d9 |
From c6b22fdc32c38b487b4d8748251f697d30e1fe48 Mon Sep 17 00:00:00 2001
|
|
|
9119d9 |
Message-Id: <c6b22fdc32c38b487b4d8748251f697d30e1fe48@dist-git>
|
|
|
9119d9 |
From: Maxime Leroy <maxime.leroy@6wind.com>
|
|
|
9119d9 |
Date: Fri, 3 Oct 2014 22:54:56 +0200
|
|
|
9119d9 |
Subject: [PATCH] qemu: add capability probing for ivshmem device
|
|
|
9119d9 |
|
|
|
9119d9 |
https://bugzilla.redhat.com/show_bug.cgi?id=1126991
|
|
|
9119d9 |
|
|
|
9119d9 |
Ivshmem is supported by QEMU since 0.13 release.
|
|
|
9119d9 |
|
|
|
9119d9 |
Signed-off-by: Maxime Leroy <maxime.leroy@6wind.com>
|
|
|
9119d9 |
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
|
|
|
9119d9 |
(cherry picked from commit e3d478eb51c1a60a2f52392a81031b477098e2bc)
|
|
|
9119d9 |
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
|
|
9119d9 |
---
|
|
|
9119d9 |
src/qemu/qemu_capabilities.c | 2 ++
|
|
|
9119d9 |
src/qemu/qemu_capabilities.h | 1 +
|
|
|
9119d9 |
tests/qemucapabilitiesdata/caps_1.2.2-1.caps | 1 +
|
|
|
9119d9 |
tests/qemucapabilitiesdata/caps_1.3.1-1.caps | 1 +
|
|
|
9119d9 |
tests/qemucapabilitiesdata/caps_1.4.2-1.caps | 1 +
|
|
|
9119d9 |
tests/qemucapabilitiesdata/caps_1.5.3-1.caps | 1 +
|
|
|
9119d9 |
tests/qemucapabilitiesdata/caps_1.6.0-1.caps | 1 +
|
|
|
9119d9 |
tests/qemucapabilitiesdata/caps_1.6.50-1.caps | 1 +
|
|
|
9119d9 |
tests/qemucapabilitiesdata/caps_2.1.1-1.caps | 1 +
|
|
|
9119d9 |
tests/qemuhelptest.c | 15 ++++++++++-----
|
|
|
9119d9 |
10 files changed, 20 insertions(+), 5 deletions(-)
|
|
|
9119d9 |
|
|
|
9119d9 |
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
|
|
|
9119d9 |
index ca112e9..ea1250d 100644
|
|
|
9119d9 |
--- a/src/qemu/qemu_capabilities.c
|
|
|
9119d9 |
+++ b/src/qemu/qemu_capabilities.c
|
|
|
9119d9 |
@@ -270,6 +270,7 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST,
|
|
|
9119d9 |
"splash-timeout", /* 175 */
|
|
|
9119d9 |
"iothread",
|
|
|
9119d9 |
"migrate-rdma",
|
|
|
9119d9 |
+ "ivshmem",
|
|
|
9119d9 |
);
|
|
|
9119d9 |
|
|
|
9119d9 |
|
|
|
9119d9 |
@@ -1500,6 +1501,7 @@ struct virQEMUCapsStringFlags virQEMUCapsObjectTypes[] = {
|
|
|
9119d9 |
{ "memory-backend-file", QEMU_CAPS_OBJECT_MEMORY_FILE },
|
|
|
9119d9 |
{ "usb-audio", QEMU_CAPS_OBJECT_USB_AUDIO },
|
|
|
9119d9 |
{ "iothread", QEMU_CAPS_OBJECT_IOTHREAD},
|
|
|
9119d9 |
+ { "ivshmem", QEMU_CAPS_DEVICE_IVSHMEM },
|
|
|
9119d9 |
};
|
|
|
9119d9 |
|
|
|
9119d9 |
static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsVirtioBlk[] = {
|
|
|
9119d9 |
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
|
|
|
9119d9 |
index b15b9f1..d3a9a0a 100644
|
|
|
9119d9 |
--- a/src/qemu/qemu_capabilities.h
|
|
|
9119d9 |
+++ b/src/qemu/qemu_capabilities.h
|
|
|
9119d9 |
@@ -217,6 +217,7 @@ typedef enum {
|
|
|
9119d9 |
QEMU_CAPS_SPLASH_TIMEOUT = 175, /* -boot splash-time */
|
|
|
9119d9 |
QEMU_CAPS_OBJECT_IOTHREAD = 176, /* -object iothread */
|
|
|
9119d9 |
QEMU_CAPS_MIGRATE_RDMA = 177, /* have rdma migration */
|
|
|
9119d9 |
+ QEMU_CAPS_DEVICE_IVSHMEM = 178, /* -device ivshmem */
|
|
|
9119d9 |
|
|
|
9119d9 |
QEMU_CAPS_LAST, /* this must always be the last item */
|
|
|
9119d9 |
} virQEMUCapsFlags;
|
|
|
9119d9 |
diff --git a/tests/qemucapabilitiesdata/caps_1.2.2-1.caps b/tests/qemucapabilitiesdata/caps_1.2.2-1.caps
|
|
|
9119d9 |
index 3b1b699..fc8dfc1 100644
|
|
|
9119d9 |
--- a/tests/qemucapabilitiesdata/caps_1.2.2-1.caps
|
|
|
9119d9 |
+++ b/tests/qemucapabilitiesdata/caps_1.2.2-1.caps
|
|
|
9119d9 |
@@ -115,4 +115,5 @@
|
|
|
9119d9 |
<flag name='usb-kbd'/>
|
|
|
9119d9 |
<flag name='host-pci-multidomain'/>
|
|
|
9119d9 |
<flag name='usb-audio'/>
|
|
|
9119d9 |
+ <flag name='ivshmem'/>
|
|
|
9119d9 |
</qemuCaps>
|
|
|
9119d9 |
diff --git a/tests/qemucapabilitiesdata/caps_1.3.1-1.caps b/tests/qemucapabilitiesdata/caps_1.3.1-1.caps
|
|
|
9119d9 |
index 4b7651e..f4f0397 100644
|
|
|
9119d9 |
--- a/tests/qemucapabilitiesdata/caps_1.3.1-1.caps
|
|
|
9119d9 |
+++ b/tests/qemucapabilitiesdata/caps_1.3.1-1.caps
|
|
|
9119d9 |
@@ -129,4 +129,5 @@
|
|
|
9119d9 |
<flag name='usb-kbd'/>
|
|
|
9119d9 |
<flag name='host-pci-multidomain'/>
|
|
|
9119d9 |
<flag name='usb-audio'/>
|
|
|
9119d9 |
+ <flag name='ivshmem'/>
|
|
|
9119d9 |
</qemuCaps>
|
|
|
9119d9 |
diff --git a/tests/qemucapabilitiesdata/caps_1.4.2-1.caps b/tests/qemucapabilitiesdata/caps_1.4.2-1.caps
|
|
|
9119d9 |
index d146bf9..e6659e4 100644
|
|
|
9119d9 |
--- a/tests/qemucapabilitiesdata/caps_1.4.2-1.caps
|
|
|
9119d9 |
+++ b/tests/qemucapabilitiesdata/caps_1.4.2-1.caps
|
|
|
9119d9 |
@@ -130,4 +130,5 @@
|
|
|
9119d9 |
<flag name='usb-kbd'/>
|
|
|
9119d9 |
<flag name='host-pci-multidomain'/>
|
|
|
9119d9 |
<flag name='usb-audio'/>
|
|
|
9119d9 |
+ <flag name='ivshmem'/>
|
|
|
9119d9 |
</qemuCaps>
|
|
|
9119d9 |
diff --git a/tests/qemucapabilitiesdata/caps_1.5.3-1.caps b/tests/qemucapabilitiesdata/caps_1.5.3-1.caps
|
|
|
9119d9 |
index c220b46..9716cf5 100644
|
|
|
9119d9 |
--- a/tests/qemucapabilitiesdata/caps_1.5.3-1.caps
|
|
|
9119d9 |
+++ b/tests/qemucapabilitiesdata/caps_1.5.3-1.caps
|
|
|
9119d9 |
@@ -139,4 +139,5 @@
|
|
|
9119d9 |
<flag name='host-pci-multidomain'/>
|
|
|
9119d9 |
<flag name='usb-audio'/>
|
|
|
9119d9 |
<flag name='splash-timeout'/>
|
|
|
9119d9 |
+ <flag name='ivshmem'/>
|
|
|
9119d9 |
</qemuCaps>
|
|
|
9119d9 |
diff --git a/tests/qemucapabilitiesdata/caps_1.6.0-1.caps b/tests/qemucapabilitiesdata/caps_1.6.0-1.caps
|
|
|
9119d9 |
index 21d4320..a820cd4 100644
|
|
|
9119d9 |
--- a/tests/qemucapabilitiesdata/caps_1.6.0-1.caps
|
|
|
9119d9 |
+++ b/tests/qemucapabilitiesdata/caps_1.6.0-1.caps
|
|
|
9119d9 |
@@ -145,4 +145,5 @@
|
|
|
9119d9 |
<flag name='msg-timestamp'/>
|
|
|
9119d9 |
<flag name='usb-audio'/>
|
|
|
9119d9 |
<flag name='splash-timeout'/>
|
|
|
9119d9 |
+ <flag name='ivshmem'/>
|
|
|
9119d9 |
</qemuCaps>
|
|
|
9119d9 |
diff --git a/tests/qemucapabilitiesdata/caps_1.6.50-1.caps b/tests/qemucapabilitiesdata/caps_1.6.50-1.caps
|
|
|
9119d9 |
index 44f7b0c..f65b3f4 100644
|
|
|
9119d9 |
--- a/tests/qemucapabilitiesdata/caps_1.6.50-1.caps
|
|
|
9119d9 |
+++ b/tests/qemucapabilitiesdata/caps_1.6.50-1.caps
|
|
|
9119d9 |
@@ -145,4 +145,5 @@
|
|
|
9119d9 |
<flag name='numa'/>
|
|
|
9119d9 |
<flag name='usb-audio'/>
|
|
|
9119d9 |
<flag name='splash-timeout'/>
|
|
|
9119d9 |
+ <flag name='ivshmem'/>
|
|
|
9119d9 |
</qemuCaps>
|
|
|
9119d9 |
diff --git a/tests/qemucapabilitiesdata/caps_2.1.1-1.caps b/tests/qemucapabilitiesdata/caps_2.1.1-1.caps
|
|
|
9119d9 |
index 71d2459..7fc654d 100644
|
|
|
9119d9 |
--- a/tests/qemucapabilitiesdata/caps_2.1.1-1.caps
|
|
|
9119d9 |
+++ b/tests/qemucapabilitiesdata/caps_2.1.1-1.caps
|
|
|
9119d9 |
@@ -159,4 +159,5 @@
|
|
|
9119d9 |
<flag name='splash-timeout'/>
|
|
|
9119d9 |
<flag name='iothread'/>
|
|
|
9119d9 |
<flag name='migrate-rdma'/>
|
|
|
9119d9 |
+ <flag name='ivshmem'/>
|
|
|
9119d9 |
</qemuCaps>
|
|
|
9119d9 |
diff --git a/tests/qemuhelptest.c b/tests/qemuhelptest.c
|
|
|
9119d9 |
index 975edf3..7e62a50 100644
|
|
|
9119d9 |
--- a/tests/qemuhelptest.c
|
|
|
9119d9 |
+++ b/tests/qemuhelptest.c
|
|
|
9119d9 |
@@ -518,7 +518,8 @@ mymain(void)
|
|
|
9119d9 |
QEMU_CAPS_DEVICE_SCSI_GENERIC,
|
|
|
9119d9 |
QEMU_CAPS_DEVICE_USB_KBD,
|
|
|
9119d9 |
QEMU_CAPS_DEVICE_USB_STORAGE,
|
|
|
9119d9 |
- QEMU_CAPS_HOST_PCI_MULTIDOMAIN);
|
|
|
9119d9 |
+ QEMU_CAPS_HOST_PCI_MULTIDOMAIN,
|
|
|
9119d9 |
+ QEMU_CAPS_DEVICE_IVSHMEM);
|
|
|
9119d9 |
DO_TEST("qemu-kvm-0.12.1.2-rhel61", 12001, 1, 0,
|
|
|
9119d9 |
QEMU_CAPS_VNC_COLON,
|
|
|
9119d9 |
QEMU_CAPS_NO_REBOOT,
|
|
|
9119d9 |
@@ -746,7 +747,8 @@ mymain(void)
|
|
|
9119d9 |
QEMU_CAPS_DEVICE_SCSI_GENERIC_BOOTINDEX,
|
|
|
9119d9 |
QEMU_CAPS_DEVICE_USB_KBD,
|
|
|
9119d9 |
QEMU_CAPS_DEVICE_USB_STORAGE,
|
|
|
9119d9 |
- QEMU_CAPS_SPLASH_TIMEOUT);
|
|
|
9119d9 |
+ QEMU_CAPS_SPLASH_TIMEOUT,
|
|
|
9119d9 |
+ QEMU_CAPS_DEVICE_IVSHMEM);
|
|
|
9119d9 |
DO_TEST("qemu-1.1.0", 1001000, 0, 0,
|
|
|
9119d9 |
QEMU_CAPS_VNC_COLON,
|
|
|
9119d9 |
QEMU_CAPS_NO_REBOOT,
|
|
|
9119d9 |
@@ -845,7 +847,8 @@ mymain(void)
|
|
|
9119d9 |
QEMU_CAPS_DEVICE_USB_KBD,
|
|
|
9119d9 |
QEMU_CAPS_DEVICE_USB_STORAGE,
|
|
|
9119d9 |
QEMU_CAPS_OBJECT_USB_AUDIO,
|
|
|
9119d9 |
- QEMU_CAPS_SPLASH_TIMEOUT);
|
|
|
9119d9 |
+ QEMU_CAPS_SPLASH_TIMEOUT,
|
|
|
9119d9 |
+ QEMU_CAPS_DEVICE_IVSHMEM);
|
|
|
9119d9 |
DO_TEST("qemu-1.2.0", 1002000, 0, 0,
|
|
|
9119d9 |
QEMU_CAPS_VNC_COLON,
|
|
|
9119d9 |
QEMU_CAPS_NO_REBOOT,
|
|
|
9119d9 |
@@ -956,7 +959,8 @@ mymain(void)
|
|
|
9119d9 |
QEMU_CAPS_DEVICE_USB_KBD,
|
|
|
9119d9 |
QEMU_CAPS_USB_STORAGE_REMOVABLE,
|
|
|
9119d9 |
QEMU_CAPS_OBJECT_USB_AUDIO,
|
|
|
9119d9 |
- QEMU_CAPS_SPLASH_TIMEOUT);
|
|
|
9119d9 |
+ QEMU_CAPS_SPLASH_TIMEOUT,
|
|
|
9119d9 |
+ QEMU_CAPS_DEVICE_IVSHMEM);
|
|
|
9119d9 |
DO_TEST("qemu-kvm-1.2.0", 1002000, 1, 0,
|
|
|
9119d9 |
QEMU_CAPS_VNC_COLON,
|
|
|
9119d9 |
QEMU_CAPS_NO_REBOOT,
|
|
|
9119d9 |
@@ -1072,7 +1076,8 @@ mymain(void)
|
|
|
9119d9 |
QEMU_CAPS_DEVICE_USB_KBD,
|
|
|
9119d9 |
QEMU_CAPS_USB_STORAGE_REMOVABLE,
|
|
|
9119d9 |
QEMU_CAPS_OBJECT_USB_AUDIO,
|
|
|
9119d9 |
- QEMU_CAPS_SPLASH_TIMEOUT);
|
|
|
9119d9 |
+ QEMU_CAPS_SPLASH_TIMEOUT,
|
|
|
9119d9 |
+ QEMU_CAPS_DEVICE_IVSHMEM);
|
|
|
9119d9 |
|
|
|
9119d9 |
return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
|
|
|
9119d9 |
}
|
|
|
9119d9 |
--
|
|
|
9119d9 |
2.1.2
|
|
|
9119d9 |
|