[Spice-devel] [PATCH spice-gtk 1/2] channel-display: Make monitors array contain monitors in id order

Hans de Goede hdegoede at redhat.com
Sat Jan 12 16:11:09 PST 2013


Hi,

On 01/12/2013 01:09 AM, Marc-André Lureau wrote:
> Hi
>
> ----- Mensaje original -----
>>> Ah, I think this is correct as the current model doesn't allow
>>> qxl-0
>>> and qxl-2 outputs enabled, while qxl-1 is disabled.
>>
>> That is not entirely true, currently one cannot do that through an
>> agent message, but one can "easily" do it using the xrandr cmdline
>> utility. So the code is already broken, the xorg driver and
>> qemu/server
>> code can send a QXLMonitorsConfig with non continues id range in
>> there already, it just requires manual configuration inside the
>> guest.
>
> If I remember correctly, that change in the guest/agent will trigger a new monitor config and the client is reconfigured, and it will always have continues monitor id in this case. Can you reproduce an invalid access by playing with 3 monitors and xrandr? I don't recall any problem with that.

Yes if the guest enables/disable monitors the client will send
a new VdagentMonitorsConfig message, with continues ids. But this
is not about the VdagentMonitorsConfig message, it is about
the QXLMonitorsConfig, which is send in the other direction!

And that can already have sparse ids.

IE:
1) user starts vm with only output 1 enabled
2) user enables output 3 using xrandr
3) The client now gets a monitors_config message with
    sparse ids
4) The client will treat this as non sparse (looking at
    the length of the monitors property of the display-channel)
    and show a display-2 window with waiting for connection in
    there, since output 2 is not active
5) This may trigger the client to send a VdagentMonitorsConfig
    message
6) If there is an agent running it will re-configure things
    disabling output 3 and enabling output 2

Note that this is wrong both with and without the agent running:

1) No agent running -> the "display-2 window with waiting for connection"
    stays that way forever
2) Agent running:
    1) There is a wrong intermediate state
    2) The user asked for output3 but gets output2 instead

Regards,

Hans


>
>
>


More information about the Spice-devel mailing list