Re: [Qemu-devel] [Spice-devel] [RFC PATCH spice 1/2] QXL interface: add functions to identify monitors in the guest

2018-10-12 Thread Gerd Hoffmann
On Fri, Oct 12, 2018 at 06:46:37AM -0400, Frediano Ziglio wrote: > > > > Hi, > > > > > > When using qemu_console_get_head() it doesn't work correctly, it would > > > > use the qxl card's data. It would work if spice-server would filter the > > > > list to only include the entries for the given

Re: [Qemu-devel] [Spice-devel] [RFC PATCH spice 1/2] QXL interface: add functions to identify monitors in the guest

2018-10-12 Thread Frediano Ziglio
> > Hi, > > > > When using qemu_console_get_head() it doesn't work correctly, it would > > > use the qxl card's data. It would work if spice-server would filter the > > > list to only include the entries for the given display channel before > > > calling the ->client_monitors_config() callback.

Re: [Qemu-devel] [Spice-devel] [RFC PATCH spice 1/2] QXL interface: add functions to identify monitors in the guest

2018-10-12 Thread Gerd Hoffmann
Hi, > > When using qemu_console_get_head() it doesn't work correctly, it would > > use the qxl card's data. It would work if spice-server would filter the > > list to only include the entries for the given display channel before > > calling the ->client_monitors_config() callback. But it

Re: [Qemu-devel] [Spice-devel] [RFC PATCH spice 1/2] QXL interface: add functions to identify monitors in the guest

2018-10-12 Thread Frediano Ziglio
> On Thu, Oct 11, 2018 at 05:37:46PM +0200, Lukáš Hrázký wrote: > > On Thu, 2018-10-11 at 17:09 +0200, Gerd Hoffmann wrote: > > > > > Ok. We probably should fix interface_client_monitors_config() to use > > > > > the channel_id instead of qemu_console_get_head() then. > > > > > > > > It's not

Re: [Qemu-devel] [Spice-devel] [RFC PATCH spice 1/2] QXL interface: add functions to identify monitors in the guest

2018-10-12 Thread Lukáš Hrázký
On Fri, 2018-10-12 at 11:27 +0200, Gerd Hoffmann wrote: > On Thu, Oct 11, 2018 at 05:37:46PM +0200, Lukáš Hrázký wrote: > > On Thu, 2018-10-11 at 17:09 +0200, Gerd Hoffmann wrote: > > > > > Ok. We probably should fix interface_client_monitors_config() to use > > > > > the channel_id instead of

Re: [Qemu-devel] [Spice-devel] [RFC PATCH spice 1/2] QXL interface: add functions to identify monitors in the guest

2018-10-12 Thread Gerd Hoffmann
On Thu, Oct 11, 2018 at 05:37:46PM +0200, Lukáš Hrázký wrote: > On Thu, 2018-10-11 at 17:09 +0200, Gerd Hoffmann wrote: > > > > Ok. We probably should fix interface_client_monitors_config() to use > > > > the channel_id instead of qemu_console_get_head() then. > > > > > > It's not that simple.

Re: [Qemu-devel] [Spice-devel] [RFC PATCH spice 1/2] QXL interface: add functions to identify monitors in the guest

2018-10-11 Thread Lukáš Hrázký
On Thu, 2018-10-11 at 17:09 +0200, Gerd Hoffmann wrote: > > > Ok. We probably should fix interface_client_monitors_config() to use > > > the channel_id instead of qemu_console_get_head() then. > > > > It's not that simple. This would break the QXL with multiple monitors > > per channel case. >

Re: [Qemu-devel] [Spice-devel] [RFC PATCH spice 1/2] QXL interface: add functions to identify monitors in the guest

2018-10-11 Thread Gerd Hoffmann
> > Ok. We probably should fix interface_client_monitors_config() to use > > the channel_id instead of qemu_console_get_head() then. > > It's not that simple. This would break the QXL with multiple monitors > per channel case. It is that simple. qxl doesn't use that code path and has its own

Re: [Qemu-devel] [Spice-devel] [RFC PATCH spice 1/2] QXL interface: add functions to identify monitors in the guest

2018-10-11 Thread Lukáš Hrázký
On Thu, 2018-10-11 at 15:43 +0200, Gerd Hoffmann wrote: > Hi, > > > > How does all this monitors_config work currently in case multiple > > > display channels are present? > > > > > > There is the QXLInterface->client_monitors_config() callback. > > > > > > There is the

Re: [Qemu-devel] [Spice-devel] [RFC PATCH spice 1/2] QXL interface: add functions to identify monitors in the guest

2018-10-11 Thread Gerd Hoffmann
> > So, do we need this add display_id function at all? > > You mean the addition of IDs in display_id = channel_id + monitor_id? No, I mean spice_qxl_set_path() is enough, the other function is not needed. cheers, Gerd

Re: [Qemu-devel] [Spice-devel] [RFC PATCH spice 1/2] QXL interface: add functions to identify monitors in the guest

2018-10-11 Thread Gerd Hoffmann
Hi, > > How does all this monitors_config work currently in case multiple > > display channels are present? > > > > There is the QXLInterface->client_monitors_config() callback. > > > > There is the spice_qxl_monitors_config_async() function. > > > > Both are linked to a display channel.

Re: [Qemu-devel] [Spice-devel] [RFC PATCH spice 1/2] QXL interface: add functions to identify monitors in the guest

2018-10-11 Thread Lukáš Hrázký
On Thu, 2018-10-11 at 15:20 +0200, Gerd Hoffmann wrote: > > The plan was (and still is) to limit the use cases to the following > > two: > > > > * Legacy QXL on linux with multiple monitors per display channel, but > > only this single display channel. Multiple display channels are not > >

Re: [Qemu-devel] [Spice-devel] [RFC PATCH spice 1/2] QXL interface: add functions to identify monitors in the guest

2018-10-11 Thread Gerd Hoffmann
> The plan was (and still is) to limit the use cases to the following > two: > > * Legacy QXL on linux with multiple monitors per display channel, but > only this single display channel. Multiple display channels are not > supported in this case, so no streaming etc. > > * Limit the number of

Re: [Qemu-devel] [Spice-devel] [RFC PATCH spice 1/2] QXL interface: add functions to identify monitors in the guest

2018-10-11 Thread Lukáš Hrázký
On Thu, 2018-10-11 at 14:27 +0200, Gerd Hoffmann wrote: > > > So, if I remember correctly, Gerd recommended returning this value from > > > the function. But I think it needs more explanation here. What exactly > > > is a "monitor_id" supposed to represent? It is not used in your follow- > > > up

Re: [Qemu-devel] [Spice-devel] [RFC PATCH spice 1/2] QXL interface: add functions to identify monitors in the guest

2018-10-11 Thread Frediano Ziglio
> > > > So, if I remember correctly, Gerd recommended returning this value from > > > the function. But I think it needs more explanation here. What exactly > > > is a "monitor_id" supposed to represent? It is not used in your follow- > > > up qemu patch so it's hard to tell. > > > > It's

Re: [Qemu-devel] [Spice-devel] [RFC PATCH spice 1/2] QXL interface: add functions to identify monitors in the guest

2018-10-11 Thread Lukáš Hrázký
Hi Gerd, On Wed, 2018-10-10 at 12:37 +0200, Gerd Hoffmann wrote: > Hi, > > > > + * Sets the hardware (e.g. PCI) path of the graphics device > > > represented by this QXL interface instance. > > > > So, this comment suggests that the caller might be able to provide a > > path that is not a PCI

Re: [Qemu-devel] [Spice-devel] [RFC PATCH spice 1/2] QXL interface: add functions to identify monitors in the guest

2018-10-11 Thread Gerd Hoffmann
> > So, if I remember correctly, Gerd recommended returning this value from > > the function. But I think it needs more explanation here. What exactly > > is a "monitor_id" supposed to represent? It is not used in your follow- > > up qemu patch so it's hard to tell. > > It's supposed to be the

Re: [Qemu-devel] [Spice-devel] [RFC PATCH spice 1/2] QXL interface: add functions to identify monitors in the guest

2018-10-10 Thread Lukáš Hrázký
On Tue, 2018-10-09 at 14:33 -0500, Jonathon Jongsma wrote: > On Tue, 2018-10-09 at 15:10 +0200, Lukáš Hrázký wrote: > > Adds two functions to let QEMU provide information to identify > > graphics > > devices and their monitors in the guest: > > > > * device path - The path identifying the device

Re: [Qemu-devel] [Spice-devel] [RFC PATCH spice 1/2] QXL interface: add functions to identify monitors in the guest

2018-10-10 Thread Gerd Hoffmann
Hi, > > + * Sets the hardware (e.g. PCI) path of the graphics device > > represented by this QXL interface instance. > > So, this comment suggests that the caller might be able to provide a > path that is not a PCI path. But the implementation below (mostly the > debug output, I suppose...)

Re: [Qemu-devel] [Spice-devel] [RFC PATCH spice 1/2] QXL interface: add functions to identify monitors in the guest

2018-10-09 Thread Jonathon Jongsma
On Tue, 2018-10-09 at 15:10 +0200, Lukáš Hrázký wrote: > Adds two functions to let QEMU provide information to identify > graphics > devices and their monitors in the guest: > > * device path - The path identifying the device on the system (e.g. > PCI > path): > spice_qxl_device_set_path(...)