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

[libvirt] [PATCH 4/4] libxl: support QXL video device



libxl recently gained support for QXL video device.  Support
it in the libxl driver too.

Signed-off-by: Jim Fehlig <jfehlig suse com>
---

Note:
Commit 161212ef in xen.git staging branch provides QXL support in libxl

 src/libxl/libxl_conf.c   | 11 +++++++++++
 src/libxl/libxl_domain.c |  4 ++++
 2 files changed, 15 insertions(+)

diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c
index 5bb0425..f2cffc7 100644
--- a/src/libxl/libxl_conf.c
+++ b/src/libxl/libxl_conf.c
@@ -1736,6 +1736,17 @@ libxlMakeVideo(virDomainDefPtr def, libxl_domain_config *d_config)
             }
             break;
 
+#ifdef LIBXL_HAVE_QXL
+        case VIR_DOMAIN_VIDEO_TYPE_QXL:
+            b_info->u.hvm.vga.kind = LIBXL_VGA_INTERFACE_TYPE_QXL;
+            if (def->videos[0]->vram < 128 * 1024) {
+                virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+                               _("videoram must be at least 128MB for QXL"));
+                return -1;
+            }
+            break;
+#endif
+
         default:
             virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
                            _("video type %s is not supported by libxl"),
diff --git a/src/libxl/libxl_domain.c b/src/libxl/libxl_domain.c
index 68dd28e..c7f0ed9 100644
--- a/src/libxl/libxl_domain.c
+++ b/src/libxl/libxl_domain.c
@@ -324,6 +324,10 @@ libxlDomainDeviceDefPostParse(virDomainDeviceDefPtr dev,
                     dev->data.video->vram = 4 * 1024;
             }
             break;
+        case VIR_DOMAIN_VIDEO_TYPE_QXL:
+            if (dev->data.video->vram == 0)
+                dev->data.video->vram = 128 * 1024;
+            break;
         }
     }
 
-- 
1.8.4.5


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