[Spice-devel] [PATCH] Allow Qemu to pass maximum head to guest
Frediano Ziglio
fziglio at redhat.com
Mon Jun 8 06:30:16 PDT 2015
Add a max_head field to QXLRom so Qemu can specify the maximum heads it
wants. This to support heads argument in libvirt properly.
Padding fields are added to make the structure multiple of 8 bytes. This
as Qemu append to this structure some fields for mode settings. As
this structure is packed not adding padding could lead to unaligned
memory accesses.
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
spice/qxl_dev.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/spice/qxl_dev.h b/spice/qxl_dev.h
index a3e91a5..b5c97e9 100644
--- a/spice/qxl_dev.h
+++ b/spice/qxl_dev.h
@@ -164,8 +164,14 @@ typedef struct SPICE_ATTR_PACKED QXLRom {
uint16_t padding;
QXLURect heads[64];
} client_monitors_config;
+ uint16_t max_heads; /* valid if flags contains QXL_ROM_FLAG_MAX_HEADS */
+ /* align structure to 8 bytes */
+ uint16_t padding_end1;
+ uint32_t padding_end2;
} QXLRom;
+#define QXL_ROM_FLAG_MAX_HEADS (1<<0)
+
#define CLIENT_MONITORS_CONFIG_CRC32_POLY 0xedb88320
/* qxl-1 compat: fixed */
--
2.1.0
More information about the Spice-devel
mailing list