Re: [PATCH spice-server 2/2] QXL devices must be registered before Stream Devices

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

 



On Wed, 2019-02-13 at 09:19 -0500, Frediano Ziglio wrote:
> > 
> > Stream devices assume that all QXL devices are registered with the
> > server before we receive any communications from the stream device.
> > This
> > is due to the fact that QXL display channel IDs are assigned
> > directly
> > from the QXL device ID, whereas Stream display channels are
> > assigned
> > channel IDs based on the next free ID. If the stream channel is
> > created first, it will find that 0 is the first available display
> > ID and
> > use that for its channel ID. Then when QXL device #0 is registered,
> > it
> > will also create a display channel with channel ID 0, and they will
> > conflict.
> 
> Interesting, should not be checked somewhere and detected as API
> violation?
> 
> Frediano


Maybe. Right now qemu always registers QXL devices immediately after
qemu starts. And obviously we can't communicate via the stream device
until the guest is fully up and running. So I think there's essentially
no way for the bug to happen with current code. I think QXL channels
will always get created before stream channels. But for completeness it
probably would be good to add a check somewhere. 

The alternative is to disconnect the QXL ID from the channel ID. In
other words, QXL display channels would use the next available channel
ID (just like the stream channels do) instead of using the qxl->id as
the channel_id. But I don't know if such a change would violate any
other assumptions in the code.

Jonathon

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




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