[libvirt] [PATCH v2 02/10] qemu: Include {xres, yres} QEMU capabilities for video models

jcfaracco at gmail.com jcfaracco at gmail.com
Fri Aug 30 21:40:54 UTC 2019


From: Julio Faracco <jcfaracco at gmail.com>

New QEMU capabilities for display resolution were added: xres and yres.
Some models supports like VGA, QXL, Virtio and Bochs support set
resolution for driver. The capabilities mentioned above were added into
those models.

Signed-off-by: Julio Faracco <jcfaracco at gmail.com>
---
 src/qemu/qemu_capabilities.c | 16 ++++++++++++++++
 src/qemu/qemu_capabilities.h |  2 ++
 2 files changed, 18 insertions(+)

diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 73300128ea..e6d256a9cd 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -537,6 +537,8 @@ VIR_ENUM_IMPL(virQEMUCaps,
               /* 335 */
               "bochs-display",
               "migration-file-drop-cache",
+              "xres",
+              "yres",
     );
 
 
@@ -1219,6 +1221,8 @@ static struct virQEMUCapsStringFlags virQEMUCapsDevicePropsKVMPit[] = {
 
 static struct virQEMUCapsStringFlags virQEMUCapsDevicePropsVGA[] = {
     { "vgamem_mb", QEMU_CAPS_VGA_VGAMEM },
+    { "xres", QEMU_CAPS_XRES },
+    { "yres", QEMU_CAPS_YRES },
 };
 
 static struct virQEMUCapsStringFlags virQEMUCapsDevicePropsVmwareSvga[] = {
@@ -1229,6 +1233,8 @@ static struct virQEMUCapsStringFlags virQEMUCapsDevicePropsQxl[] = {
     { "vgamem_mb", QEMU_CAPS_QXL_VGAMEM },
     { "vram64_size_mb", QEMU_CAPS_QXL_VRAM64 },
     { "max_outputs", QEMU_CAPS_QXL_MAX_OUTPUTS },
+    { "xres", QEMU_CAPS_XRES },
+    { "yres", QEMU_CAPS_YRES },
 };
 
 static struct virQEMUCapsStringFlags virQEMUCapsDevicePropsVirtioGpu[] = {
@@ -1237,6 +1243,13 @@ static struct virQEMUCapsStringFlags virQEMUCapsDevicePropsVirtioGpu[] = {
     { "disable-legacy", QEMU_CAPS_VIRTIO_PCI_DISABLE_LEGACY },
     { "iommu_platform", QEMU_CAPS_VIRTIO_PCI_IOMMU_PLATFORM },
     { "ats", QEMU_CAPS_VIRTIO_PCI_ATS },
+    { "xres", QEMU_CAPS_XRES },
+    { "yres", QEMU_CAPS_YRES },
+};
+
+static struct virQEMUCapsStringFlags virQEMUCapsDevicePropsBochs[] = {
+    { "xres", QEMU_CAPS_XRES },
+    { "yres", QEMU_CAPS_YRES },
 };
 
 static struct virQEMUCapsStringFlags virQEMUCapsDevicePropsICH9[] = {
@@ -1362,6 +1375,9 @@ static virQEMUCapsObjectTypeProps virQEMUCapsDeviceProps[] = {
     { "virtio-gpu-device", virQEMUCapsDevicePropsVirtioGpu,
       ARRAY_CARDINALITY(virQEMUCapsDevicePropsVirtioGpu),
       QEMU_CAPS_DEVICE_VIRTIO_GPU },
+    { "bochs-display", virQEMUCapsDevicePropsBochs,
+      ARRAY_CARDINALITY(virQEMUCapsDevicePropsBochs),
+      QEMU_CAPS_DEVICE_BOCHS_DISPLAY },
     { "ICH9-LPC", virQEMUCapsDevicePropsICH9,
       ARRAY_CARDINALITY(virQEMUCapsDevicePropsICH9),
       -1 },
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index 68ef6c49b4..5e3d542994 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -518,6 +518,8 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */
     /* 335 */
     QEMU_CAPS_DEVICE_BOCHS_DISPLAY, /* -device bochs-display */
     QEMU_CAPS_MIGRATION_FILE_DROP_CACHE, /* migration with disk cache on is safe for type='file' disks */
+    QEMU_CAPS_XRES, /* -device *,xres= */
+    QEMU_CAPS_YRES, /* -device *,yres= */
 
     QEMU_CAPS_LAST /* this must always be the last item */
 } virQEMUCapsFlags;
-- 
2.20.1




More information about the libvir-list mailing list