[Spice-devel] cannot boot from virtio / no -qxl option

2010-05-18 Thread Frédéric Grelot
Hi all, I'm trying to set up Spice on a Fedora 13 (still beta) server. I'm using libvirt to set up my guests, qemu-spice from kraxel repo, and a small wrapper script of mine to make libvirt work (basically, it changes the version line when I run "qemu-spice -help" to make it understandable by l

Re: [Spice-devel] Questions on security.

2010-05-18 Thread Robert Relyea
On 05/17/2010 06:01 AM, Alexander Larsson wrote: > On Mon, 2010-05-03 at 16:56 -0700, Robert Relyea wrote: > >> Hi all, >> >> I've been asked to look at the security of the spice protocol. I've >> looked at the project a bit already and have a few potential things to >> talk about, but I wanted

[Spice-devel] [PATCH 32/39] zap migration code

2010-05-18 Thread Gerd Hoffmann
Drop all code which depends on accessing the migration file handle. Signed-off-by: Gerd Hoffmann --- server/reds.c | 642 + server/vd_interface.h |7 +- 2 files changed, 11 insertions(+), 638 deletions(-) diff --git a/server/reds.c b/

[Spice-devel] [PATCH 20/39] VDInterface: redesign.

2010-05-18 Thread Gerd Hoffmann
VDInterface has been renamed to SpiceBaseInterface. Dropped base_version element, shlib versioning should be used instead. Dropped id element, it is passed to spice_server_add_interface() instead. Now SpiceBaseInterface has static information only, multiple interface instances can share it. Adde

[Spice-devel] [PATCH 26/39] SoundInterfaces: redesign

2010-05-18 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- server/reds.c | 30 +- server/snd_worker.c | 160 server/snd_worker.h |8 +- server/vd_interface.h | 84 +- 4 files changed, 141 insertions(+), 141 deletions(-)

[Spice-devel] [PATCH 35/39] zap MigrationInterface

2010-05-18 Thread Gerd Hoffmann
Remove remaining MigrationInterface bits. Signed-off-by: Gerd Hoffmann --- server/reds.c | 16 server/vd_interface.h | 11 --- 2 files changed, 0 insertions(+), 27 deletions(-) diff --git a/server/reds.c b/server/reds.c index 3c832b5..891cd74 100644 --- a/se

[Spice-devel] [PATCH 03/39] zap CoreInterface->next()

2010-05-18 Thread Gerd Hoffmann
Interfaces must be registered after spice_server_init(). The "next" callback is used to discover interfaces registered before spice_server_init(). Which is a empty list and thus pretty pointless. Remove it. Signed-off-by: Gerd Hoffmann --- server/reds.c |7 --- server/vd_interf

[Spice-devel] [PATCH 25/39] TabletInterface: redesign

2010-05-18 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- server/reds.c | 41 ++--- server/reds.h |4 server/vd_interface.h | 27 +-- 3 files changed, 47 insertions(+), 25 deletions(-) diff --git a/server/reds.c b/server/reds.c ind

[Spice-devel] [PATCH 24/39] QXL: redesign.

2010-05-18 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- server/red_dispatcher.c | 36 ++-- server/red_dispatcher.h |2 +- server/red_worker.c | 38 +++--- server/red_worker.h |2 +- server/reds.c | 20 +++-

[Spice-devel] [PATCH 31/39] replace worker load/save with loadvm_commands, allow keeping surface content

2010-05-18 Thread Gerd Hoffmann
Add worker->loadvm_commands. qemu will uses this to send a series of commands needed to restore state after savevm/loadvm and migration. That will be one create-surface command per surface and one cursor-set command for the local pointer. The worker->save/load functions are not needed any more. L

[Spice-devel] [PATCH 38/39] zap vd_interface.h

2010-05-18 Thread Gerd Hoffmann
move over content to spice.h Signed-off-by: Gerd Hoffmann --- server/Makefile.am |2 - server/red_channel.h |2 +- server/red_dispatcher.c|2 +- server/red_tunnel_worker.h |2 +- server/red_worker.c|2 +- server/snd_worker.c|2 +- server/

[Spice-devel] [PATCH 30/39] surface: keep metadata (aka create command) in device memory.

2010-05-18 Thread Gerd Hoffmann
With this patch applied the spice server will not release surface create commands for the whole lifecycle of the surface. When the surface is destroyed both create and destroy commands are released. This has the effect that the surface metadata (size, depth, ...) is kept in qxl device memory. Th

[Spice-devel] [PATCH 28/39] vdi port: redesign.

2010-05-18 Thread Gerd Hoffmann
Pretty straight forward. One thing we should think about is if and how we are going to deal with multiple ports here? With vdi port using virtio-serial as communication channel to the guest it is easy to have multiple ports, i.e. we might want to use a second instance for clipboard data. That im

[Spice-devel] [PATCH 33/39] [debug] migration troubleshooting

2010-05-18 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- client/application.cpp |2 +- server/reds.c |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client/application.cpp b/client/application.cpp index 4eb8ac8..74f5543 100644 --- a/client/application.cpp +++ b/client/application.

[Spice-devel] [PATCH 39/39] add spice-experimental.h

2010-05-18 Thread Gerd Hoffmann
Supposed to be used for work-in-progress bits, where interfaces are not finalized yet. Moved over vdi port interface, tunnel interface and spice client migration functions. Signed-off-by: Gerd Hoffmann --- server/Makefile.am |2 + server/red_tunnel_worker.h |2 - server/reds.c

[Spice-devel] [PATCH 22/39] KeyboardInterface: redesign.

2010-05-18 Thread Gerd Hoffmann
This is the direction I wanna take with all interfaces: Clearly separate interface (aka version information and function pointers) and state information. SpiceKbdInterface defines the interface, SpiceKbdInstance maintains per-instance state information. Keyboard hasn't much beside a pointer to S

[Spice-devel] [PATCH 36/39] NetWireInterface: redesign

2010-05-18 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- server/red_tunnel_worker.h |2 +- server/reds.c | 14 -- server/reds.h |4 server/vd_interface.h | 29 + 4 files changed, 30 insertions(+), 19 deletions(-) diff --git a/serve

[Spice-devel] [PATCH 34/39] migration: new api

2010-05-18 Thread Gerd Hoffmann
Add new API for migration, based on what RHEL-6 has. Signed-off-by: Gerd Hoffmann --- server/reds.c | 107 ++--- server/spice.h| 12 + server/vd_interface.h |7 --- 3 files changed, 87 insertions(+), 39 deletions(-) diff --g

[Spice-devel] [PATCH 37/39] vd_interface.h cleanups.

2010-05-18 Thread Gerd Hoffmann
Drop leftover bits which are not used any more. Rename DrawArea to QXLDrawArea. Signed-off-by: Gerd Hoffmann --- server/reds.c | 16 server/snd_worker.c |2 -- server/vd_interface.h | 39 +++ 3 files changed, 3 insertions(+),

[Spice-devel] [PATCH 27/39] constify SpiceBaseInterface

2010-05-18 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- server/reds.c |4 ++-- server/vd_interface.h |2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/server/reds.c b/server/reds.c index a5e6c1b..71ce409 100644 --- a/server/reds.c +++ b/server/reds.c @@ -4039,7 +4039,7 @@ static voi

[Spice-devel] [PATCH 16/39] new watch api: switch channels

2010-05-18 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- server/red_channel.c | 41 - 1 files changed, 20 insertions(+), 21 deletions(-) diff --git a/server/red_channel.c b/server/red_channel.c index dbfbd42..3f46147 100644 --- a/server/red_channel.c +++ b/server/red_channel.c

[Spice-devel] [PATCH 18/39] minor timer interface cleanups.

2010-05-18 Thread Gerd Hoffmann
Make the timer interface largely look like the watch interface. Simliar naming convention for the functions (timer_*) and a opaque SpiceTimer type. Signed-off-by: Gerd Hoffmann --- server/red_tunnel_worker.c |5 ++--- server/reds.c | 40

[Spice-devel] [PATCH 23/39] MouseInterface: redesign

2010-05-18 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- server/reds.c | 30 -- server/reds.h |4 server/vd_interface.h | 25 - 3 files changed, 40 insertions(+), 19 deletions(-) diff --git a/server/reds.c b/server/reds.c index 1eee21d..8

[Spice-devel] [PATCH 17/39] new watch api: kill old api

2010-05-18 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- server/reds.c |2 -- server/vd_interface.h |5 - 2 files changed, 0 insertions(+), 7 deletions(-) diff --git a/server/reds.c b/server/reds.c index 6f5957f..ff90f5d 100644 --- a/server/reds.c +++ b/server/reds.c @@ -494,8 +494,6 @@ static void

[Spice-devel] [PATCH 21/39] s/CoreInterface/SpiceCoreInterface/

2010-05-18 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- server/red_channel.c |3 ++- server/red_channel.h |5 +++-- server/red_tunnel_worker.c |5 +++-- server/red_tunnel_worker.h |2 +- server/reds.c | 14 -- server/reds.h |2 +- server/spice.h

[Spice-devel] [PATCH 29/39] kill spice_server_set_mouse_absolute

2010-05-18 Thread Gerd Hoffmann
Not needed. Just register/unregister the tablet interface instead. Signed-off-by: Gerd Hoffmann --- server/reds.c |9 - server/spice.h |2 -- 2 files changed, 0 insertions(+), 11 deletions(-) diff --git a/server/reds.c b/server/reds.c index 01f610d..9b42cbf 100644 --- a/server

[Spice-devel] [PATCH 19/39] shlib major

2010-05-18 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- configure.ac |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/configure.ac b/configure.ac index 94cd65f..0958b6d 100644 --- a/configure.ac +++ b/configure.ac @@ -26,7 +26,7 @@ AC_PROG_LIBTOOL AM_PROG_CC_C_O AC_C_BIGENDIAN -SPICE_LT_VE

[Spice-devel] [PATCH 15/39] new watch api: switch sound

2010-05-18 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- server/snd_worker.c | 32 +--- 1 files changed, 21 insertions(+), 11 deletions(-) diff --git a/server/snd_worker.c b/server/snd_worker.c index 66dc856..d5f5f37 100644 --- a/server/snd_worker.c +++ b/server/snd_worker.c @@ -239,7 +23

[Spice-devel] [PATCH 05/39] zap qterm interfaces

2010-05-18 Thread Gerd Hoffmann
old way to handle monitor, obsolete. Signed-off-by: Gerd Hoffmann --- server/reds.c | 688 - server/vd_interface.h | 50 2 files changed, 0 insertions(+), 738 deletions(-) diff --git a/server/reds.c b/server/reds.c index a84fe04..a

[Spice-devel] [PATCH 14/39] new watch api: switch migration

2010-05-18 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- server/reds.c | 59 + 1 files changed, 30 insertions(+), 29 deletions(-) diff --git a/server/reds.c b/server/reds.c index cd4fd57..6f5957f 100644 --- a/server/reds.c +++ b/server/reds.c @@ -3246,6 +3246,7

[Spice-devel] [PATCH 10/39] new watch api: switch liasync read

2010-05-18 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- server/reds.c | 24 +++- server/reds.h |1 + 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/server/reds.c b/server/reds.c index 8ce07a0..80f5fca 100644 --- a/server/reds.c +++ b/server/reds.c @@ -298,7 +298,6 @@ typedef

[Spice-devel] [PATCH 09/39] new watch api: switch listening sockets

2010-05-18 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- server/reds.c | 34 -- 1 files changed, 20 insertions(+), 14 deletions(-) diff --git a/server/reds.c b/server/reds.c index 50753c0..8ce07a0 100644 --- a/server/reds.c +++ b/server/reds.c @@ -245,6 +245,8 @@ typedef struct RedsSt

[Spice-devel] [PATCH 07/39] fix visibility

2010-05-18 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- server/reds.c | 50 ++ server/reds.h |2 ++ 2 files changed, 28 insertions(+), 24 deletions(-) diff --git a/server/reds.c b/server/reds.c index 88f6a72..50753c0 100644 --- a/server/reds.c +++ b/server/reds.c

[Spice-devel] [PATCH 06/39] zap CoreInterface->{term_printf,log}

2010-05-18 Thread Gerd Hoffmann
Was used to print stuff to the qemu monitor. Fundamentally incompatible with QMP. Remove. Signed-off-by: Gerd Hoffmann --- server/reds.c | 48 +--- server/vd_interface.h |4 2 files changed, 5 insertions(+), 47 deletions(-) diff --

[Spice-devel] [PATCH 13/39] new watch api: switch inputs

2010-05-18 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- server/reds.c | 50 +- 1 files changed, 25 insertions(+), 25 deletions(-) diff --git a/server/reds.c b/server/reds.c index e50ae63..cd4fd57 100644 --- a/server/reds.c +++ b/server/reds.c @@ -2277,31 +2277,31 @@ s

[Spice-devel] [PATCH 12/39] new watch api: switch ssl accept

2010-05-18 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- server/reds.c | 24 +++- 1 files changed, 19 insertions(+), 5 deletions(-) diff --git a/server/reds.c b/server/reds.c index 6a21d6e..e50ae63 100644 --- a/server/reds.c +++ b/server/reds.c @@ -491,7 +491,12 @@ static int reds_ssl_free(RedsSt

[Spice-devel] [PATCH 11/39] new watch api: switch main channel

2010-05-18 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- server/reds.c | 40 +--- 1 files changed, 21 insertions(+), 19 deletions(-) diff --git a/server/reds.c b/server/reds.c index 80f5fca..6a21d6e 100644 --- a/server/reds.c +++ b/server/reds.c @@ -364,7 +364,6 @@ typedef struct

[Spice-devel] [PATCH 08/39] introduce new watch api

2010-05-18 Thread Gerd Hoffmann
This patch adds a new file handle watch interface to libspice, featuring three callbacks: (1) watch_add() -- create a new file watch. (2) watch_update_mask() -- change event mask. spice frequently enables/disables write notification. (3) watch_remove() -- remove

[Spice-devel] [PATCH 02/39] channel security cleanup

2010-05-18 Thread Gerd Hoffmann
- drop spice_channel_name_t enum, use spice-protocol defines instead. - switch spice_server_set_channel_security() channel parameter from enum to string. - drop spice_server_set_default_channel_security(), use spice_server_set_channel_security with channel == NULL instead. Signed-off-by: Gerd

[Spice-devel] [PATCH 01/39] zap spice_parse_args + spice_usage_str

2010-05-18 Thread Gerd Hoffmann
First step to throw out the old interface. Signed-off-by: Gerd Hoffmann --- server/reds.c | 333 server/spice.h |3 - 2 files changed, 0 insertions(+), 336 deletions(-) diff --git a/server/reds.c b/server/reds.c index fdada68..42b88

[Spice-devel] [PATCH 04/39] zap CoreInterface->(un)register_change_notifiers()

2010-05-18 Thread Gerd Hoffmann
spice_server_add_interface() and spice_server_remove_interface() can be used instead. Signed-off-by: Gerd Hoffmann --- server/reds.c |4 server/vd_interface.h |4 2 files changed, 0 insertions(+), 8 deletions(-) diff --git a/server/reds.c b/server/reds.c index bfd4847.

[Spice-devel] [PATCH 00/39] libspice-server api patch series

2010-05-18 Thread Gerd Hoffmann
Hi, Next version. Also available here: http://cgit.freedesktop.org/~kraxel/spice/log/?h=api.v7 Changes: * misc tweaks according to review comments. * also convert tunnel interface to the new api. * drop vd_interface.h, move bits over to spice.h * create spice-experimental.h for

[Spice-devel] [PATCH] add QXL_SURF_FLAG_KEEP_DATA

2010-05-18 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- spice/qxl_dev.h |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/spice/qxl_dev.h b/spice/qxl_dev.h index 80e5e08..6182953 100644 --- a/spice/qxl_dev.h +++ b/spice/qxl_dev.h @@ -155,7 +155,9 @@ typedef struct SPICE_ATTR_PACKED QXLMemSlot

Re: [Spice-devel] [PATCH 00/35] new libspice-server API patches.

2010-05-18 Thread Alexander Larsson
On Mon, 2010-05-17 at 20:59 +0200, Gerd Hoffmann wrote: > Hi, > > > I reviewed the patches up to 31. Some minor issues were pointed out in > > separate mails, but generally i think this looks good and should go in > > now. > > Yes, I agree on it. Sort the remaining minor bits, then merge. > > >

Re: [Spice-devel] [PATCH 31/35] replace worker load/save with loadvm_commands, allow keeping surface content

2010-05-18 Thread Alexander Larsson
On Mon, 2010-05-17 at 20:37 +0200, Gerd Hoffmann wrote: > On 05/17/10 11:54, Alexander Larsson wrote: > > >> @@ -9138,7 +9086,7 @@ static inline void > >> handle_dev_create_primary_surface(RedWorker *worker) > >> } > >> > >> red_create_surface(worker, 0, surface.width, surface.height,

Re: [Spice-devel] [PATCH 28/35] vdi port: redesign.

2010-05-18 Thread Gerd Hoffmann
Yes, you need an additional interface for throttle/unthrottle then. Works too. I don't mind much which way we pick. Two notes: * I need to check with virtio-serial, but it seems to me that when we throttle we should be able to access the pointer provided by havedata. I don't think virtio-

Re: [Spice-devel] [PATCH] don't use alpha channel bitmap for primary surface operations

2010-05-18 Thread Alexander Larsson
On Tue, 2010-05-18 at 04:56 -0400, Alon Levy wrote: > This is an idea suggested by izik, I just tested it a little so far. > > Basically the test for alpha in QXLGetBitmap is done even when the target > is a primary surface (side note: our driver only supports a single monitor > right now, and har

Re: [Spice-devel] [PATCH 28/35] vdi port: redesign.

2010-05-18 Thread Alon Levy
- "Gerd Hoffmann" wrote: > Hi, > > > I'm not sure how that should be done. My main dislike of the current > interface > > is that it forces either a copy from the driver to an intermediate, > like > > the code I had checked in, or it forces spice-server to consume > everything it gets. > >

Re: [Spice-devel] [PATCH 28/35] vdi port: redesign.

2010-05-18 Thread Gerd Hoffmann
Hi, I'm not sure how that should be done. My main dislike of the current interface is that it forces either a copy from the driver to an intermediate, like the code I had checked in, or it forces spice-server to consume everything it gets. No, it isn't all or nothing. You can delay the int

[Spice-devel] [PATCH] don't use alpha channel bitmap for primary surface operations

2010-05-18 Thread Alon Levy
This is an idea suggested by izik, I just tested it a little so far. Basically the test for alpha in QXLGetBitmap is done even when the target is a primary surface (side note: our driver only supports a single monitor right now, and hardcoding '0' there also sucks, it should basically be 0..num_mo

Re: [Spice-devel] [PATCH 28/35] vdi port: redesign.

2010-05-18 Thread Alon Levy
- "Gerd Hoffmann" wrote: > > To check this I'll have to compile the vdi_port driver, since back > > porting the spice_vmc.c file from qemu-kvm-rhel6 would be too much > > work (there is not virtio-serial in current qemu used in upstrea > > spice). But I'll try to do it and send the patch ove

Re: [Spice-devel] [PATCH 28/35] vdi port: redesign.

2010-05-18 Thread Gerd Hoffmann
To check this I'll have to compile the vdi_port driver, since back porting the spice_vmc.c file from qemu-kvm-rhel6 would be too much work (there is not virtio-serial in current qemu used in upstrea spice). But I'll try to do it and send the patch over. qemu on freedesktop.org has both vdi-port