Re: [Spice-devel] [PATCH spice-server] tests/pki: Use CA/certificate valid until 2048 and with 2048 bits

2018-12-06 Thread Daniel P . Berrangé
On Thu, Dec 06, 2018 at 04:35:56PM +0100, Christophe Fergeau wrote: > On Tue, Dec 04, 2018 at 01:19:31PM +, Frediano Ziglio wrote: > > This changes tests/pki/server-cert.pem and tests/pki/ca-cert.pem to have > > 2048 bits. These certificates were generated using the > > instructions on

Re: [Spice-devel] [PATCH spice-server] tests/pki: Use CA/certificate valid until 2048 and with 2048 bits

2018-12-06 Thread Christophe Fergeau
On Tue, Dec 04, 2018 at 01:19:31PM +, Frediano Ziglio wrote: > This changes tests/pki/server-cert.pem and tests/pki/ca-cert.pem to have > 2048 bits. These certificates were generated using the > instructions on https://www.spice-space.org/spice-user-manual.html > The -subj args were omitted,

Re: [Spice-devel] [PATCH vdagent-linux 3/4] introduce VDAgentConnection

2018-12-06 Thread Victor Toso
Hi, First of all, tested. Seems to work fine! This one I think it can be improved to have a clear design around VDAgentConnection. The other three patches could be merged faster I think, if you want. On Sun, Sep 30, 2018 at 08:05:22PM +0200, Jakub Janků wrote: > 1) VDAgentConnection > > Add

Re: [Spice-devel] [PATCH 1/3] drm/qxl: allow both PRIV and VRAM placement for QXL_GEM_DOMAIN_SURFACE

2018-12-06 Thread Frediano Ziglio
> > On Thu, Dec 06, 2018 at 05:55:58AM -0500, Frediano Ziglio wrote: > > > > > qxl surfaces (used for framebuffers and gem objects) can live in both > > > VRAM and PRIV ttm domains. Update placement setup to include both. Put > > > PRIV first in the list so it is preferred, so VRAM will have

[Spice-devel] [PATCH v2] drm/qxl: use qxl_num_crtc directly

2018-12-06 Thread Gerd Hoffmann
qdev->monitors_config->max_allowed is effectively set by the qxl.num_heads module parameter, stored in the qxl_num_crtc variable. Lets get rid of the indirection and use the variable qxl_num_crtc directly. The kernel doesn't need to dereference pointers each time it needs the value, and when

Re: [Spice-devel] [PATCH] drm/qxl: use qxl_num_crtc directly

2018-12-06 Thread Gerd Hoffmann
> > qdev->monitors_config->max_allowed is effectively set by a module > > parameter. So using the module parameter variable qxl_num_crtc > > directly is better IMO. The kernel doesn't need to dereference pointers > > each time it needs the value, and when reading the code you don't have > > to

Re: [Spice-devel] [PATCH] drm/qxl: use qxl_num_crtc directly

2018-12-06 Thread Frediano Ziglio
> > On Thu, Dec 06, 2018 at 07:53:10AM -0500, Frediano Ziglio wrote: > > > > > > On Thu, Dec 06, 2018 at 05:59:25AM -0500, Frediano Ziglio wrote: > > > > > > > > > > Just use qxl_num_crtc directly everywhere instead of using > > > > > qdev->monitors_config->max_allowed. Drops pointless

Re: [Spice-devel] [PATCH] drm/qxl: use qxl_num_crtc directly

2018-12-06 Thread Gerd Hoffmann
On Thu, Dec 06, 2018 at 07:53:10AM -0500, Frediano Ziglio wrote: > > > > On Thu, Dec 06, 2018 at 05:59:25AM -0500, Frediano Ziglio wrote: > > > > > > > > Just use qxl_num_crtc directly everywhere instead of using > > > > qdev->monitors_config->max_allowed. Drops pointless indirection > > > >

Re: [Spice-devel] qxl: Move more guest resource release to red-parse-qxl

2018-12-06 Thread Frediano Ziglio
> > Hey, > > Currently, after parsing a QXL command through red-parse-qxl, the code which > got the command has to tell red-parse-qxl when it no longer needs the > command, but also to remember to release the command QXL resources > itself. This series moves this 'release resource' logic to >

Re: [Spice-devel] [PATCH] drm/qxl: use qxl_num_crtc directly

2018-12-06 Thread Frediano Ziglio
> > On Thu, Dec 06, 2018 at 05:59:25AM -0500, Frediano Ziglio wrote: > > > > > > Just use qxl_num_crtc directly everywhere instead of using > > > qdev->monitors_config->max_allowed. Drops pointless indirection > > > and also is less confusing. > > > > > > > To me is MORE confusing, why

Re: [Spice-devel] [PATCH] drm/qxl: use qxl_num_crtc directly

2018-12-06 Thread Gerd Hoffmann
On Thu, Dec 06, 2018 at 05:59:25AM -0500, Frediano Ziglio wrote: > > > > Just use qxl_num_crtc directly everywhere instead of using > > qdev->monitors_config->max_allowed. Drops pointless indirection > > and also is less confusing. > > > > To me is MORE confusing, why comparing number of

Re: [Spice-devel] [PATCH 1/3] drm/qxl: allow both PRIV and VRAM placement for QXL_GEM_DOMAIN_SURFACE

2018-12-06 Thread Gerd Hoffmann
On Thu, Dec 06, 2018 at 05:55:58AM -0500, Frediano Ziglio wrote: > > > qxl surfaces (used for framebuffers and gem objects) can live in both > > VRAM and PRIV ttm domains. Update placement setup to include both. Put > > PRIV first in the list so it is preferred, so VRAM will have more room > >

Re: [Spice-devel] [PATCH] drm/qxl: use qxl_num_crtc directly

2018-12-06 Thread Frediano Ziglio
> > Just use qxl_num_crtc directly everywhere instead of using > qdev->monitors_config->max_allowed. Drops pointless indirection > and also is less confusing. > To me is MORE confusing, why comparing number of something with another number? Previously code was comparing number of monitors with

Re: [Spice-devel] [PATCH 1/3] drm/qxl: allow both PRIV and VRAM placement for QXL_GEM_DOMAIN_SURFACE

2018-12-06 Thread Frediano Ziglio
> qxl surfaces (used for framebuffers and gem objects) can live in both > VRAM and PRIV ttm domains. Update placement setup to include both. Put > PRIV first in the list so it is preferred, so VRAM will have more room > for objects which must be allocated there. > > Signed-off-by: Gerd

[Spice-devel] [PATCH 2/3] drm/qxl: use QXL_GEM_DOMAIN_SURFACE for shadow bo.

2018-12-06 Thread Gerd Hoffmann
The shadow bo is used as qxl surface, so allocate it as QXL_GEM_DOMAIN_SURFACE. Should usually be allocated in PRIV ttm domain then, so this reduces VRAM memory pressure. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[Spice-devel] [PATCH 3/3] drm/qxl: use QXL_GEM_DOMAIN_SURFACE for dumb gem objects

2018-12-06 Thread Gerd Hoffmann
dumb buffers are used as qxl surfaces, so allocate them as QXL_GEM_DOMAIN_SURFACE. Should usually be allocated in PRIV ttm domain then, so this reduces VRAM memory pressure. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_dumb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[Spice-devel] [PATCH 1/3] drm/qxl: allow both PRIV and VRAM placement for QXL_GEM_DOMAIN_SURFACE

2018-12-06 Thread Gerd Hoffmann
qxl surfaces (used for framebuffers and gem objects) can live in both VRAM and PRIV ttm domains. Update placement setup to include both. Put PRIV first in the list so it is preferred, so VRAM will have more room for objects which must be allocated there. Signed-off-by: Gerd Hoffmann ---

[Spice-devel] [PATCH] drm/qxl: use qxl_num_crtc directly

2018-12-06 Thread Gerd Hoffmann
Just use qxl_num_crtc directly everywhere instead of using qdev->monitors_config->max_allowed. Drops pointless indirection and also is less confusing. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_display.c | 21 + 1 file changed, 9 insertions(+), 12 deletions(-)

Re: [Spice-devel] [spice-gtk v1 1/4] gtk-session: remove extra clipboard selection check

2018-12-06 Thread Victor Toso
Hi, On Thu, Dec 06, 2018 at 04:30:17AM -0500, Frediano Ziglio wrote: > > Hi, > > > > On Thu, Dec 06, 2018 at 03:54:41AM -0500, Frediano Ziglio wrote: > > > > > > > > From: Victor Toso > > > > > > > > Commit 284c1f2d switched to > > > > spice_main_channel_clipboard_selection_release() which

Re: [Spice-devel] [spice-gtk v1 2/4] gtk-session: prefer early check to agent connectivity

2018-12-06 Thread Victor Toso
Hi, On Thu, Dec 06, 2018 at 04:15:14AM -0500, Frediano Ziglio wrote: > > > > From: Victor Toso > > > > In case the agent is disconnected, we we don't need to create the > > struct RunInfo, GMainLoop and add handlers to some signals. > > > > This patch also removes one goto and related cleanup

Re: [Spice-devel] [spice-gtk v1 1/4] gtk-session: remove extra clipboard selection check

2018-12-06 Thread Frediano Ziglio
> Hi, > > On Thu, Dec 06, 2018 at 03:54:41AM -0500, Frediano Ziglio wrote: > > > > > > From: Victor Toso > > > > > > Commit 284c1f2d switched to > > > spice_main_channel_clipboard_selection_release() which does check if > > > agent is connected and does the right thing (expected) in regards to

Re: [Spice-devel] [spice-gtk v1 2/4] gtk-session: prefer early check to agent connectivity

2018-12-06 Thread Frediano Ziglio
> > From: Victor Toso > > In case the agent is disconnected, we we don't need to create the > struct RunInfo, GMainLoop and add handlers to some signals. > > This patch also removes one goto and related cleanup label. > > Signed-off-by: Victor Toso > --- > src/spice-gtk-session.c | 14

Re: [Spice-devel] [spice-gtk v1 1/4] gtk-session: remove extra clipboard selection check

2018-12-06 Thread Victor Toso
Hi, On Thu, Dec 06, 2018 at 03:54:41AM -0500, Frediano Ziglio wrote: > > > > From: Victor Toso > > > > Commit 284c1f2d switched to > > spice_main_channel_clipboard_selection_release() which does check if > > agent is connected and does the right thing (expected) in regards to > > releasing the

Re: [Spice-devel] [spice-gtk v1 4/4] gtk-session: better variable name

2018-12-06 Thread Victor Toso
Hi, On Thu, Dec 06, 2018 at 03:47:26AM -0500, Frediano Ziglio wrote: > > for (m = 0; m < SPICE_N_ELEMENTS(atom2agent); m++) { > > if (atom2agent[m].vdagent == types[n] && !target_selected[m]) { > > found = TRUE; > > -g_return_val_if_fail(i <

Re: [Spice-devel] [spice-gtk v1 1/4] gtk-session: remove extra clipboard selection check

2018-12-06 Thread Frediano Ziglio
> > From: Victor Toso > > Commit 284c1f2d switched to > spice_main_channel_clipboard_selection_release() which does check if > agent is connected and does the right thing (expected) in regards to > releasing the clipboard by calling agent_clipboard_release() which > does check

Re: [Spice-devel] [spice-gtk v1 4/4] gtk-session: better variable name

2018-12-06 Thread Frediano Ziglio
> > From: Victor Toso > > Not saying it is perfect name but 'i' as index does not state much > after the for loop in g_memdup() and gtk_clipboard_set_with_owner(). > > Using number of elements as indexes is far from unusual so let's > rename it and reduce by one the single letter vars. > >

Re: [Spice-devel] [spice-gtk v1 3/4] gtk-session: remove single goto usage

2018-12-06 Thread Frediano Ziglio
> On Wed, Dec 05, 2018 at 11:06:56AM -0500, Frediano Ziglio wrote: > > > > > > From: Victor Toso > > > > > > Returning TRUE here should be fine. Not much error handling around the > > > label. > > > > About "Returning TRUE here should be fine" not sure why you > > used the "should", any doubt?