Re: [Spice-devel] [PATCH spice-server 2/2] stream-device: Handle capabilities

2018-03-20 Thread Uri Lublin
On 03/19/2018 06:46 PM, Frediano Ziglio wrote: Handle capabilities from guest device. Send capability to the guest when device is opened. Currently there's no capabilities set on the message sent. On the tests we need to discard the capability message before reading the error. Signed-off-by: Fre

Re: [Spice-devel] [PATCH spice-server 2/2] stream-device: Handle capabilities

2018-03-20 Thread Uri Lublin
On 03/20/2018 01:28 PM, Frediano Ziglio wrote: Looks good, with minor nits. On 19 Mar 2018, at 17:46, Frediano Ziglio wrote: Handle capabilities from guest device. Send capability to the guest when device is opened. Currently there's no capabilities set on the message sent. On the tests we n

[Spice-devel] [spice-vdagnet (linux) PATCH] x11-randr: do not assume each output has ncrtc=1

2018-03-20 Thread Uri Lublin
This was true for virtual graphic cards, but not true for device-assigned graphic cards. For example NVIDIA M2000 has 8. Still we currently pick only a single crtc for each output (but looping over them to find an active one) Signed-off-by: Uri Lublin --- src/vdagent/x11-randr.c | 15 ++

Re: [Spice-devel] [PATCH spice-server 2/2] stream-device: Handle capabilities

2018-03-20 Thread Frediano Ziglio
> > Looks good, with minor nits. > > > On 19 Mar 2018, at 17:46, Frediano Ziglio wrote: > > > > Handle capabilities from guest device. > > Send capability to the guest when device is opened. > > Currently there's no capabilities set on the message sent. > > On the tests we need to discard the c

Re: [Spice-devel] [PATCH spice-server] stream-channel: Implements monitors_config

2018-03-20 Thread Frediano Ziglio
> > On 19 Mar 2018, at 11:39, Frediano Ziglio wrote: > > > >> > >> On 03/13/2018 08:21 AM, Frediano Ziglio wrote: > >>> Although not necessary for a single monitor DisplayChannel implementation > >>> this make the DiisplayChannels more coherent from the client > >>> point of view. > >>> > >>> S

Re: [Spice-devel] [PATCH spice-common 1/2] Add --enable-extra-checks option

2018-03-20 Thread Frediano Ziglio
> > On 19 Mar 2018, at 14:46, Frediano Ziglio wrote: > > > > Allow to enable code to do additional or expensive checks. > > “Allow to enable…” -> “Add configuration option enabling expensive checks” > We decided extra after researching on different projects. I think extra is better, not only e

Re: [Spice-devel] [PATCH spice-common 3/3] Avoid integer overflow computing image sizes

2018-03-20 Thread Frediano Ziglio
> > If you have declared right types from the previous patch, is this really > necessary? > Previous patch affects other code paths. > > On 19 Mar 2018, at 11:06, Frediano Ziglio wrote: > > > > Use always 64, sizes can be 32x32. > > > > Signed-off-by: Frediano Ziglio > > --- > > python_modu

Re: [Spice-devel] [PATCH spice-common 1/3] Fix integer overflows computing sizes

2018-03-20 Thread Frediano Ziglio
> > > On 19 Mar 2018, at 11:06, Frediano Ziglio wrote: > > > > Make code safe using both 32 and 64 bit machine. > > Consider that this code can be compiled for machines with 32 bit. > > There are some arrays length which are 32 bit. > > > > If size_t this can cause easily an overflow. For insta

Re: [Spice-devel] [PATCH spice-common 3/3] Avoid integer overflow computing image sizes

2018-03-20 Thread Christophe de Dinechin
If you have declared right types from the previous patch, is this really necessary? > On 19 Mar 2018, at 11:06, Frediano Ziglio wrote: > > Use always 64, sizes can be 32x32. > > Signed-off-by: Frediano Ziglio > --- > python_modules/demarshal.py | 14 ++ > python_modules/marshal.py

Re: [Spice-devel] [PATCH spice-common 1/3] Fix integer overflows computing sizes

2018-03-20 Thread Christophe de Dinechin
> On 19 Mar 2018, at 11:06, Frediano Ziglio wrote: > > Make code safe using both 32 and 64 bit machine. > Consider that this code can be compiled for machines with 32 bit. > There are some arrays length which are 32 bit. > > If size_t this can cause easily an overflow. For instance message_len

Re: [Spice-devel] [PATCH spice-server] stream-channel: Implements monitors_config

2018-03-20 Thread Christophe de Dinechin
> On 19 Mar 2018, at 11:39, Frediano Ziglio wrote: > >> >> On 03/13/2018 08:21 AM, Frediano Ziglio wrote: >>> Although not necessary for a single monitor DisplayChannel implementation >>> this make the DiisplayChannels more coherent from the client >>> point of view. >>> >>> Signed-off-by: Fr

Re: [Spice-devel] [PATCH spice-server 2/2] Use --enable-extra-checks option provided by spice-common

2018-03-20 Thread Christophe de Dinechin
See my comments on the spice-common patch. > On 19 Mar 2018, at 14:46, Frediano Ziglio wrote: > > Reuse option from common code. > Also reuse spice_extra_checks constant instead of using the preprocessor > macro directly. > > Signed-off-by: Frediano Ziglio > --- > configure.ac |

Re: [Spice-devel] [PATCH spice-common 1/2] Add --enable-extra-checks option

2018-03-20 Thread Christophe de Dinechin
> On 19 Mar 2018, at 14:46, Frediano Ziglio wrote: > > Allow to enable code to do additional or expensive checks. “Allow to enable…” -> “Add configuration option enabling expensive checks” > The option should be used by higher level libraries. > By default the option is disabled. > > Signed-

Re: [Spice-devel] [PATCH spice-server 2/2] stream-device: Handle capabilities

2018-03-20 Thread Christophe de Dinechin
Looks good, with minor nits. > On 19 Mar 2018, at 17:46, Frediano Ziglio wrote: > > Handle capabilities from guest device. > Send capability to the guest when device is opened. > Currently there's no capabilities set on the message sent. > On the tests we need to discard the capability message