[Libvirt-cim] [PATCHv2 3/5] S390: Avoid the generation of default input and graphics

Viktor Mihajlovski mihajlov at linux.vnet.ibm.com
Thu Aug 29 15:18:51 UTC 2013


KVM guests for the s390 architecture do not support graphics
and input devices. We use the os_info.fv.arch property to
recognize such guests and skip the default device generation
for those.

Signed-off-by: Viktor Mihajlovski <mihajlov at linux.vnet.ibm.com>
---
 src/Virt_VirtualSystemManagementService.c |   12 ++++++++++++
 1 file changed, 12 insertions(+)

V2 Changes:
 suppress for KVM and QEMU s390x domains, was KVM only

diff --git a/src/Virt_VirtualSystemManagementService.c b/src/Virt_VirtualSystemManagementService.c
index 3df878f..301f046 100644
--- a/src/Virt_VirtualSystemManagementService.c
+++ b/src/Virt_VirtualSystemManagementService.c
@@ -583,6 +583,12 @@ static bool default_graphics_device(struct domain *domain)
         if (domain->type == DOMAIN_LXC)
                 return true;
 
+        if ((domain->type == DOMAIN_KVM || domain->type == DOMAIN_QEMU) &&
+            domain->os_info.fv.arch != NULL &&
+            (XSTREQ(domain->os_info.fv.arch, "s390") ||
+             XSTREQ(domain->os_info.fv.arch, "s390x" )))
+                return true;
+
         free(domain->dev_graphics);
         domain->dev_graphics = calloc(1, sizeof(*domain->dev_graphics));
         if (domain->dev_graphics == NULL) {
@@ -605,6 +611,12 @@ static bool default_input_device(struct domain *domain)
         if (domain->type == DOMAIN_LXC)
                 return true;
 
+        if ((domain->type == DOMAIN_KVM || domain->type == DOMAIN_QEMU) &&
+            domain->os_info.fv.arch != NULL &&
+            (XSTREQ(domain->os_info.fv.arch, "s390") ||
+             XSTREQ(domain->os_info.fv.arch, "s390x" )))
+                return true;
+
         free(domain->dev_input);
         domain->dev_input = calloc(1, sizeof(*domain->dev_input));
         if (domain->dev_input == NULL) {
-- 
1.7.9.5




More information about the Libvirt-cim mailing list