[PATCH 4/8] conf, qemu: Add newer shmem models

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The old ivshmem is deprecated in QEMU, so let's use the better
ivshmem-{plain,doorbell} variants instead.

Signed-off-by: Martin Kletzander <mkletzan@xxxxxxxxxx>
---
 docs/schemas/domaincommon.rng | 2 ++
 src/conf/domain_conf.c        | 4 +++-
 src/conf/domain_conf.h        | 2 ++
 src/qemu/qemu_command.c       | 7 +++++++
 4 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
index 43c8b6696ac7..5d591ccc6bdd 100644
--- a/docs/schemas/domaincommon.rng
+++ b/docs/schemas/domaincommon.rng
@@ -3591,6 +3591,8 @@
             <attribute name="type">
               <choice>
                 <value>ivshmem</value>
+                <value>ivshmem-plain</value>
+                <value>ivshmem-doorbell</value>
               </choice>
             </attribute>
           </element>
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index ed9a86af0f4e..a94266603811 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -844,7 +844,9 @@ VIR_ENUM_IMPL(virDomainMemoryModel, VIR_DOMAIN_MEMORY_MODEL_LAST,
               "", "dimm")

 VIR_ENUM_IMPL(virDomainShmemModel, VIR_DOMAIN_SHMEM_MODEL_LAST,
-              "ivshmem")
+              "ivshmem",
+              "ivshmem-plain",
+              "ivshmem-doorbell")

 static virClassPtr virDomainObjClass;
 static virClassPtr virDomainXMLOptionClass;
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index 4e74c5611b2e..9f38cea831e6 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -1556,6 +1556,8 @@ struct _virDomainNVRAMDef {

 typedef enum {
     VIR_DOMAIN_SHMEM_MODEL_IVSHMEM,
+    VIR_DOMAIN_SHMEM_MODEL_IVSHMEM_PLAIN,
+    VIR_DOMAIN_SHMEM_MODEL_IVSHMEM_DOORBELL,

     VIR_DOMAIN_SHMEM_MODEL_LAST
 } virDomainShmemModel;
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 4e4a1c9cafe9..aa8cff80e8b1 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -8517,6 +8517,13 @@ qemuBuildShmemCommandLine(virLogManagerPtr logManager,
         devstr = qemuBuildShmemDevLegacyStr(def, shmem, qemuCaps);
         break;

+    case VIR_DOMAIN_SHMEM_MODEL_IVSHMEM_PLAIN:
+    case VIR_DOMAIN_SHMEM_MODEL_IVSHMEM_DOORBELL:
+        virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+                       _("%s device is not supported with this QEMU binary"),
+                       virDomainShmemModelTypeToString(shmem->model));
+        break;
+
     case VIR_DOMAIN_SHMEM_MODEL_LAST:
         break;
     }
-- 
2.10.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]