Re: [PATCH] Allow Qemu to pass maximum head to guest

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

 



Hi Frediano

----- Original Message -----
> 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.

I suspect this to be just a hint, as the guest may still request any configuration.

Isn't it enough to rely on driver/kernel level hints then? (kernel qxl num_heads for ex?)

otherwise, looks ok to me.

> 
> Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
> ---
>  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
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel@xxxxxxxxxxxxxxxxxxxxx
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
> 
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]