[Qemu-devel] [PATCH 3/3] hw/qxl: support client monitor configuration via device

2012-09-12 Thread Alon Levy
Until now we used only the agent to change the monitor count and each monitor resolution. This patch introduces the qemu part of using the device as the mediator instead of the agent via virtio-serial. Spice (>=0.11.5) calls the new QXLInterface::client_monitors_config, which returns wether the in

Re: [Qemu-devel] [PATCH 3/3] hw/qxl: support client monitor configuration via device

2012-09-11 Thread Alon Levy
> Hi, > > On 09/11/2012 03:05 PM, Alon Levy wrote: > >>> ok, I'm missing something here. (and trying to catch up via Vol > >>> 3A > >>> is taking too long). > >>> I thought the order is: > >>> (1) qemu raises interrupt > >>> (2) qemu calls kvm ioctl > >>> (3) guest interrupt handler > >>> (4) gues

Re: [Qemu-devel] [PATCH 3/3] hw/qxl: support client monitor configuration via device

2012-09-11 Thread Hans de Goede
Hi, On 09/11/2012 03:05 PM, Alon Levy wrote: ok, I'm missing something here. (and trying to catch up via Vol 3A is taking too long). I thought the order is: (1) qemu raises interrupt (2) qemu calls kvm ioctl (3) guest interrupt handler (4) guest clears interrupt by writing ~0 to qxl ram_header->

Re: [Qemu-devel] [PATCH 3/3] hw/qxl: support client monitor configuration via device

2012-09-11 Thread Alon Levy
> > ok, I'm missing something here. (and trying to catch up via Vol 3A > > is taking too long). > > I thought the order is: > > (1) qemu raises interrupt > > (2) qemu calls kvm ioctl > > (3) guest interrupt handler > > (4) guest clears interrupt by writing ~0 to qxl > > ram_header->int_mask. > > (5

Re: [Qemu-devel] [PATCH 3/3] hw/qxl: support client monitor configuration via device

2012-09-11 Thread Gerd Hoffmann
> ok, I'm missing something here. (and trying to catch up via Vol 3A is taking > too long). > I thought the order is: > (1) qemu raises interrupt > (2) qemu calls kvm ioctl > (3) guest interrupt handler > (4) guest clears interrupt by writing ~0 to qxl ram_header->int_mask. > (5) qemu detects this

Re: [Qemu-devel] [PATCH 3/3] hw/qxl: support client monitor configuration via device

2012-09-11 Thread Alon Levy
> Hi, > > > This will need spice-server <-> qemu/hw/qxl.c coordination, but I > > assume we > > will need some changes there anyway to set > > QXL_INTERRUPT_CLIENT_MONITORS_CONFIG, > > the qemu/hw/qxl.c function patching the MonitorsConfig into the > > romspace, > > and setting the irq in int_pend

Re: [Qemu-devel] [PATCH 3/3] hw/qxl: support client monitor configuration via device

2012-09-11 Thread Gerd Hoffmann
Hi, > This will need spice-server <-> qemu/hw/qxl.c coordination, but I assume we > will need some changes there anyway to set > QXL_INTERRUPT_CLIENT_MONITORS_CONFIG, > the qemu/hw/qxl.c function patching the MonitorsConfig into the romspace, > and setting the irq in int_pending, could return wh

Re: [Qemu-devel] [PATCH 3/3] hw/qxl: support client monitor configuration via device

2012-09-11 Thread Hans de Goede
Hi, On 09/11/2012 02:03 PM, Alon Levy wrote: Hi, Sorry for top posting, but trying to summarize this thread here. I must say I like Gerd's approach, as it unifies code paths mostly, instead of having yet another interface where we do 2 way capabilities negotiation, with all the extra test matr

Re: [Qemu-devel] [PATCH 3/3] hw/qxl: support client monitor configuration via device

2012-09-11 Thread Alon Levy
> > Hi, > > > > Sorry for top posting, but trying to summarize this thread here. > > > > I must say I like Gerd's approach, as it unifies code paths mostly, > > instead of having yet another interface where we do 2 way > > capabilities > > negotiation, with all the extra test matrix entries that

Re: [Qemu-devel] [PATCH 3/3] hw/qxl: support client monitor configuration via device

2012-09-11 Thread Gerd Hoffmann
On 09/11/12 13:29, Alon Levy wrote: >> Hi, >> I don't think an explicit handshake via QXL_IO_CLIENT_MONITORS_CONFIG_DONE is a good idea. >>> >>> Why? I don't see the below as being better - it just moves the >>> checking to the guest, and racily. >> >> It is more robust. > > I sugge

Re: [Qemu-devel] [PATCH 3/3] hw/qxl: support client monitor configuration via device

2012-09-11 Thread Alon Levy
> Hi, > > Sorry for top posting, but trying to summarize this thread here. > > I must say I like Gerd's approach, as it unifies code paths mostly, > instead of having yet another interface where we do 2 way > capabilities > negotiation, with all the extra test matrix entries that would entice > f

Re: [Qemu-devel] [PATCH 3/3] hw/qxl: support client monitor configuration via device

2012-09-11 Thread Hans de Goede
Hi, Sorry for top posting, but trying to summarize this thread here. I must say I like Gerd's approach, as it unifies code paths mostly, instead of having yet another interface where we do 2 way capabilities negotiation, with all the extra test matrix entries that would entice for full testing,

Re: [Qemu-devel] [PATCH 3/3] hw/qxl: support client monitor configuration via device

2012-09-11 Thread Alon Levy
> Hi, > > >> I don't think an explicit handshake via > >> QXL_IO_CLIENT_MONITORS_CONFIG_DONE is a good idea. > > > > Why? I don't see the below as being better - it just moves the > > checking to the guest, and racily. > > It is more robust. I suggested a way for it to be as robust - I take rob

Re: [Qemu-devel] [PATCH 3/3] hw/qxl: support client monitor configuration via device

2012-09-11 Thread Gerd Hoffmann
Hi, >> I don't think an explicit handshake via >> QXL_IO_CLIENT_MONITORS_CONFIG_DONE is a good idea. > > Why? I don't see the below as being better - it just moves the checking to > the guest, and racily. It is more robust. We don't have to keep state in qxl for the handshake, one less oppor

Re: [Qemu-devel] [PATCH 3/3] hw/qxl: support client monitor configuration via device

2012-09-11 Thread Alon Levy
> On 09/11/12 08:56, Alon Levy wrote: > > Until now we used only the agent to change the monitor count and > > each > > monitor resolution. This patch introduces the qemu part of using > > the > > device as the mediator instead of the agent via virtio-serial. > > > > Spice (>=0.11.5) calls the new

Re: [Qemu-devel] [PATCH 3/3] hw/qxl: support client monitor configuration via device

2012-09-11 Thread Gerd Hoffmann
On 09/11/12 08:56, Alon Levy wrote: > Until now we used only the agent to change the monitor count and each > monitor resolution. This patch introduces the qemu part of using the > device as the mediator instead of the agent via virtio-serial. > > Spice (>=0.11.5) calls the new QXLInterface::clien

[Qemu-devel] [PATCH 3/3] hw/qxl: support client monitor configuration via device

2012-09-10 Thread Alon Levy
Until now we used only the agent to change the monitor count and each monitor resolution. This patch introduces the qemu part of using the device as the mediator instead of the agent via virtio-serial. Spice (>=0.11.5) calls the new QXLInterface::client_monitors_config, generating an interrupt QXL