Re: [libvirt] [PATCH 3/4] qemu: Generate 'xres' and 'yres' for qxl device.

2019-08-05 Thread Erik Skultety
On Mon, Aug 05, 2019 at 12:30:48PM +0200, Ján Tomko wrote:
> On Mon, Aug 05, 2019 at 08:43:14AM +0200, Erik Skultety wrote:
> > On Sun, Aug 04, 2019 at 10:21:20PM -0300, jcfara...@gmail.com wrote:
> > > From: Julio Faracco 
> > >
> > > Now, QEMU command line can define 'xres' and 'yres' if XML contains both
> > > properties from qxl model.
> > >
> > > Signed-off-by: Julio Faracco 
> > > ---
> > >  src/qemu/qemu_command.c | 4 
> > >  1 file changed, 4 insertions(+)
> > >
> > > diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
> > > index fee51158a9..82430e7e98 100644
> > > --- a/src/qemu/qemu_command.c
> > > +++ b/src/qemu/qemu_command.c
> > > @@ -4713,6 +4713,10 @@ qemuBuildDeviceVideoStr(const virDomainDef *def,
> > >  if (video->heads)
> > >  virBufferAsprintf(&buf, ",max_outputs=%u", video->heads);
> > >  }
> > > +
> > > +if (video->xres && video->yres)
> > > +virBufferAsprintf(&buf, ",xres=%u,yres=%u", video->xres, 
> > > video->yres);
> >
> > Capabilities changes are needed. The support for specifying video resolution
> > was added in qemu 2.10.0, libvirt supports as old as 1.5.0. Unfortunately,
> > device properties listing isn't QAPIfied yet, so we can't probe this 
> > properly.
> >
>
> Not sure how QAPI comes into play here, but we already do probe for
> qxl's other properties and git grep "xres" tests does show hits from
> replies files from 2.10.0 on.

I stand corrected, I must have overlooked, in which case, there shouldn't
really be any problem in querying the property properly.

Erik

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 3/4] qemu: Generate 'xres' and 'yres' for qxl device.

2019-08-05 Thread Ján Tomko

On Mon, Aug 05, 2019 at 08:43:14AM +0200, Erik Skultety wrote:

On Sun, Aug 04, 2019 at 10:21:20PM -0300, jcfara...@gmail.com wrote:

From: Julio Faracco 

Now, QEMU command line can define 'xres' and 'yres' if XML contains both
properties from qxl model.

Signed-off-by: Julio Faracco 
---
 src/qemu/qemu_command.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index fee51158a9..82430e7e98 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -4713,6 +4713,10 @@ qemuBuildDeviceVideoStr(const virDomainDef *def,
 if (video->heads)
 virBufferAsprintf(&buf, ",max_outputs=%u", video->heads);
 }
+
+if (video->xres && video->yres)
+virBufferAsprintf(&buf, ",xres=%u,yres=%u", video->xres, 
video->yres);


Capabilities changes are needed. The support for specifying video resolution
was added in qemu 2.10.0, libvirt supports as old as 1.5.0. Unfortunately,
device properties listing isn't QAPIfied yet, so we can't probe this properly.



Not sure how QAPI comes into play here, but we already do probe for
qxl's other properties and git grep "xres" tests does show hits from
replies files from 2.10.0 on.

Jano


Erik

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


signature.asc
Description: PGP signature
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 3/4] qemu: Generate 'xres' and 'yres' for qxl device.

2019-08-04 Thread Erik Skultety
On Sun, Aug 04, 2019 at 10:21:20PM -0300, jcfara...@gmail.com wrote:
> From: Julio Faracco 
>
> Now, QEMU command line can define 'xres' and 'yres' if XML contains both
> properties from qxl model.
>
> Signed-off-by: Julio Faracco 
> ---
>  src/qemu/qemu_command.c | 4 
>  1 file changed, 4 insertions(+)
>
> diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
> index fee51158a9..82430e7e98 100644
> --- a/src/qemu/qemu_command.c
> +++ b/src/qemu/qemu_command.c
> @@ -4713,6 +4713,10 @@ qemuBuildDeviceVideoStr(const virDomainDef *def,
>  if (video->heads)
>  virBufferAsprintf(&buf, ",max_outputs=%u", video->heads);
>  }
> +
> +if (video->xres && video->yres)
> +virBufferAsprintf(&buf, ",xres=%u,yres=%u", video->xres, 
> video->yres);

Capabilities changes are needed. The support for specifying video resolution
was added in qemu 2.10.0, libvirt supports as old as 1.5.0. Unfortunately,
device properties listing isn't QAPIfied yet, so we can't probe this properly.

Erik

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


[libvirt] [PATCH 3/4] qemu: Generate 'xres' and 'yres' for qxl device.

2019-08-04 Thread jcfaracco
From: Julio Faracco 

Now, QEMU command line can define 'xres' and 'yres' if XML contains both
properties from qxl model.

Signed-off-by: Julio Faracco 
---
 src/qemu/qemu_command.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index fee51158a9..82430e7e98 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -4713,6 +4713,10 @@ qemuBuildDeviceVideoStr(const virDomainDef *def,
 if (video->heads)
 virBufferAsprintf(&buf, ",max_outputs=%u", video->heads);
 }
+
+if (video->xres && video->yres)
+virBufferAsprintf(&buf, ",xres=%u,yres=%u", video->xres, 
video->yres);
+
 } else if (video->type == VIR_DOMAIN_VIDEO_TYPE_VIRTIO) {
 if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_GPU_MAX_OUTPUTS)) {
 if (video->heads)
-- 
2.20.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list