[Spice-devel] [PATCH 35/35] spice: Ensure flush_resources() flushes the ring if possible

2010-09-09 Thread alexl
From: Alexander Larsson The driver may be waiting on the ring, so we need to always flush the ring on interface_flush_resources, independent of d->num_free_res. Additionally, the num_free_res check is changed to >= to make sure we don't stall if it passes QXL_FREE_BUNCH_SIZE. --- hw/qxl.c | 1

[Spice-devel] [PATCH 34/35] qxl: add guestdebug property

2010-09-09 Thread alexl
From: Gerd Hoffmann --- hw/qxl.c |6 +- hw/qxl.h |1 + 2 files changed, 6 insertions(+), 1 deletions(-) diff --git a/hw/qxl.c b/hw/qxl.c index 991858e..63a96e8 100644 --- a/hw/qxl.c +++ b/hw/qxl.c @@ -140,6 +140,7 @@ static void init_qxl_rom(PCIQXLDevice *d) rom->magic

[Spice-devel] [PATCH 33/35] [temporary] qxl: disable cursor callbacks

2010-09-09 Thread alexl
From: Gerd Hoffmann Will deadlock in case cursor rendering is triggered via QXL_IO_UPDATE_AREA. --- hw/qxl-render.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/hw/qxl-render.c b/hw/qxl-render.c index b92c68c..2b1c6e7 100644 --- a/hw/qxl-render.c +++ b/hw/qxl-rende

[Spice-devel] [PATCH 32/35] [rhel6 compat]: qxl: compat io size

2010-09-09 Thread alexl
From: Gerd Hoffmann --- hw/qxl.c |9 +++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/hw/qxl.c b/hw/qxl.c index 6c76bdc..991858e 100644 --- a/hw/qxl.c +++ b/hw/qxl.c @@ -1162,6 +1162,7 @@ static int qxl_init(PCIDevice *dev) ram_addr_t ram_size = msb_mask(qxl->vga

[Spice-devel] [PATCH 31/35] [rhel6 compat] add rhel6.0.0 machine type

2010-09-09 Thread alexl
From: Gerd Hoffmann --- hw/pc_piix.c | 56 1 files changed, 56 insertions(+), 0 deletions(-) diff --git a/hw/pc_piix.c b/hw/pc_piix.c index 12359a7..ef746d3 100644 --- a/hw/pc_piix.c +++ b/hw/pc_piix.c @@ -35,6 +35,7 @@ #include "sysem

[Spice-devel] [PATCH 30/35] qxl: migration fix #1

2010-09-09 Thread alexl
From: Gerd Hoffmann The pointer to the modes table must be updated in post-load when migrating between spice 0.4 and spice 0.6. Note: rhel-6.0.z needs that one too. --- hw/qxl.c | 18 +++--- 1 files changed, 11 insertions(+), 7 deletions(-) diff --git a/hw/qxl.c b/hw/qxl.c index

[Spice-devel] [PATCH 29/35] [rhel6 compat] fix xsave patch

2010-09-09 Thread alexl
From: Gerd Hoffmann --- target-i386/machine.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/target-i386/machine.c b/target-i386/machine.c index d76a0e6..5c73a2a 100644 --- a/target-i386/machine.c +++ b/target-i386/machine.c @@ -474,8 +474,8 @@ static const VMStateDesc

[Spice-devel] [PATCH 28/35] [rhel6 compat] drop xsave migration support.

2010-09-09 Thread alexl
From: Gerd Hoffmann --- target-i386/machine.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/target-i386/machine.c b/target-i386/machine.c index 5f8376c..d76a0e6 100644 --- a/target-i386/machine.c +++ b/target-i386/machine.c @@ -469,11 +469,13 @@ static const VMStateDe

[Spice-devel] [PATCH 27/35] spice-vmc: compiler warning fix on fprintf

2010-09-09 Thread alexl
From: Alon Levy --- hw/spice-vmc.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/spice-vmc.c b/hw/spice-vmc.c index 1255d46..b9c5eb6 100644 --- a/hw/spice-vmc.c +++ b/hw/spice-vmc.c @@ -182,7 +182,7 @@ static void vmc_print_optional_subtypes(void) fprintf(stde

[Spice-devel] [PATCH 26/35] [debug] loadvm logging

2010-09-09 Thread alexl
From: Gerd Hoffmann --- arch_init.c |9 - savevm.c|6 ++ 2 files changed, 14 insertions(+), 1 deletions(-) diff --git a/arch_init.c b/arch_init.c index e468c0c..2003bd6 100644 --- a/arch_init.c +++ b/arch_init.c @@ -346,6 +346,7 @@ int ram_load(QEMUFile *f, void *opaque,

[Spice-devel] [PATCH 25/35] [rhel6 compat] adjust vga ram size

2010-09-09 Thread alexl
From: Gerd Hoffmann --- hw/vga_int.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/vga_int.h b/hw/vga_int.h index beb5423..0ac09e2 100644 --- a/hw/vga_int.h +++ b/hw/vga_int.h @@ -226,7 +226,7 @@ void vga_init_vbe(VGACommonState *s); extern const uint8_t sr_mask[8

[Spice-devel] [PATCH 24/35] [wip] spice: client migration.

2010-09-09 Thread alexl
From: Gerd Hoffmann Handle spice client migration, i.e. inform a spice client connected about the new host and connection parameters, so it can move over the connection automatically. --- monitor.c |1 + qemu-monitor.hx | 11 +++ ui/qemu-spice.h |2 + ui/spice-core.c | 91 +

[Spice-devel] [PATCH 23/35] [ElectricFence] use memalign instead of posix_memalign

2010-09-09 Thread alexl
From: Gerd Hoffmann --- osdep.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/osdep.c b/osdep.c index dbf872a..14323b7 100644 --- a/osdep.c +++ b/osdep.c @@ -100,7 +100,12 @@ void *qemu_memalign(size_t alignment, size_t size) #if defined(_POSIX_C_SOURCE) && !defin

[Spice-devel] [PATCH 22/35] spice: add virtio-serial based spice vmchannel backend.

2010-09-09 Thread alexl
From: Gerd Hoffmann Adds the spicevmc device. This is a communication channel between the spice client and the guest. It is used to send display information and mouse events from the spice clients to the guest. --- Makefile.target |1 + hw/spice-vmc.c | 262 ++

[Spice-devel] [PATCH 21/35] spice: add audio

2010-09-09 Thread alexl
From: Gerd Hoffmann Add support for the spice audio interface. The driver is first in the driver list, but can_be_default is set only in case spice is active. So if you are using spice the spice audio driver is the default one, otherwise whatever comes first after spice in the list. Overriding

[Spice-devel] [PATCH 19/35] spice: add config options

2010-09-09 Thread alexl
From: Gerd Hoffmann Add more spice config options (requires spice >= 0.6.0) streaming-video agent-mouse playback-compression --- qemu-config.c |9 + qemu-options.hx |9 + ui/spice-core.c | 29 - 3 files changed, 46 insertions(+), 1 deletio

[Spice-devel] [PATCH 18/35] spice: add config options for the listening address

2010-09-09 Thread alexl
From: Gerd Hoffmann Make listening address configurable. Also add options to force using IPv4 or IPv6. --- qemu-config.c |9 + qemu-options.hx |7 +++ ui/spice-core.c | 13 +++-- 3 files changed, 27 insertions(+), 2 deletions(-) diff --git a/qemu-config.c b/qemu

[Spice-devel] [PATCH 17/35] spice: add config options for channel security.

2010-09-09 Thread alexl
From: Gerd Hoffmann This allows to enforce tls or plaintext usage for certain spice channels. --- qemu-config.c |6 ++ qemu-options.hx |8 ui/spice-core.c | 25 + 3 files changed, 39 insertions(+), 0 deletions(-) diff --git a/qemu-config.c b/qemu

[Spice-devel] [PATCH 16/35] spice: make compression configurable.

2010-09-09 Thread alexl
From: Yonit Halperin --- qemu-config.c |9 ++ qemu-options.hx |9 ++ ui/spice-core.c | 77 +- 3 files changed, 93 insertions(+), 2 deletions(-) diff --git a/qemu-config.c b/qemu-config.c index e90a9ec..b305286 100644 --- a/

[Spice-devel] [PATCH 15/35] spice: tls support

2010-09-09 Thread alexl
From: Gerd Hoffmann Add options to the -spice command line switch to setup tls. --- qemu-config.c | 24 +++ qemu-options.hx | 18 ++- ui/spice-core.c | 67 +++--- 3 files changed, 104 insertions(+), 5 deletions(-

[Spice-devel] [PATCH 14/35] all vga: refuse hotplugging.

2010-09-09 Thread alexl
From: Gerd Hoffmann Try to pci hotplug a vga card, watch qemu die with hw_error(). This patch fixes it. --- hw/cirrus_vga.c |4 hw/vga-pci.c|4 hw/vmware_vga.c |4 3 files changed, 12 insertions(+), 0 deletions(-) diff --git a/hw/cirrus_vga.c b/hw/cirrus_vga.c ind

[Spice-devel] [PATCH 13/35] switch vmware_vga to pci vgabios

2010-09-09 Thread alexl
From: Gerd Hoffmann --- hw/vmware_vga.c |7 +-- 1 files changed, 1 insertions(+), 6 deletions(-) diff --git a/hw/vmware_vga.c b/hw/vmware_vga.c index 12bff48..682f287 100644 --- a/hw/vmware_vga.c +++ b/hw/vmware_vga.c @@ -114,14 +114,12 @@ struct pci_vmsvga_state_s { # define SVGA_IO_B

[Spice-devel] [PATCH 12/35] switch stdvga to pci vgabios

2010-09-09 Thread alexl
From: Gerd Hoffmann --- hw/vga-pci.c |7 +++ 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/hw/vga-pci.c b/hw/vga-pci.c index 2315f70..eef0e3c 100644 --- a/hw/vga-pci.c +++ b/hw/vga-pci.c @@ -103,11 +103,10 @@ static int pci_vga_initfn(PCIDevice *dev) bios_to

[Spice-devel] [PATCH 10/35] spice: add tablet support

2010-09-09 Thread alexl
From: Gerd Hoffmann Add support for the spice tablet interface. The tablet interface will be registered (and then used by the spice client) as soon as a absolute pointing device is available and used by the guest, i.e. you'll have to configure your guest with '-usbdevice tablet'. --- ui/spice-d

[Spice-devel] [PATCH 09/35] spice: simple display

2010-09-09 Thread alexl
From: Gerd Hoffmann With that patch applied you'll actually see the guests screen in the spice client. This does *not* bring qxl and full spice support though. This is basically the qxl vga mode made more generic, so it plays together with any qemu-emulated gfx card. You can display stdvga or c

[Spice-devel] [PATCH 08/35] spice: add mouse

2010-09-09 Thread alexl
From: Gerd Hoffmann Open mouse channel. Now you can move the guests mouse pointer. No tablet / absolute positioning (yet) though. --- ui/spice-input.c | 52 1 files changed, 52 insertions(+), 0 deletions(-) diff --git a/ui/spice-input.c b/

[Spice-devel] [PATCH 07/35] spice: add keyboard

2010-09-09 Thread alexl
From: Gerd Hoffmann Open keyboard channel. Now you can type into the spice client and the keyboard events are sent to your guest. You'll need some other display like vnc to actually see the guest responding to them though. --- Makefile.objs|2 +- ui/qemu-spice.h |1 + ui/spice-cor

[Spice-devel] [PATCH 06/35] spice: core bits

2010-09-09 Thread alexl
From: Gerd Hoffmann Add -spice command line switch. Has support setting passwd and port for now. With this patch applied the spice client can successfully connect to qemu. You can't do anything useful yet though. --- Makefile.objs |2 + qemu-config.c | 18 + qemu-config.h |

[Spice-devel] [PATCH 05/35] add spice into the configure file

2010-09-09 Thread alexl
From: Gerd Hoffmann --- configure | 35 +++ 1 files changed, 35 insertions(+), 0 deletions(-) diff --git a/configure b/configure index 0639b33..b391165 100755 --- a/configure +++ b/configure @@ -320,6 +320,7 @@ pkgversion="" check_utests="no" user_pie="no" z

[Spice-devel] [PATCH 04/35] configure: add logging

2010-09-09 Thread alexl
From: Gerd Hoffmann Write compile commands and messages to config.log. Useful for debugging configure. --- configure |7 +-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 146dac0..0639b33 100755 --- a/configure +++ b/configure @@ -16,15 +16,18

[Spice-devel] [PATCH 03/35] add pflib: PixelFormat conversion library.

2010-09-09 Thread alexl
From: Gerd Hoffmann --- Makefile.objs |1 + pflib.c | 213 + pflib.h | 20 ++ 3 files changed, 234 insertions(+), 0 deletions(-) create mode 100644 pflib.c create mode 100644 pflib.h diff --git a/Makefile.objs b/Ma

[Spice-devel] [PATCH 02/35] Use machine_init() to register virtfs config options.

2010-09-09 Thread alexl
From: Gerd Hoffmann --- fsdev/qemu-fsdev.c |9 + vl.c |5 - 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/fsdev/qemu-fsdev.c b/fsdev/qemu-fsdev.c index ad69b0e..280b8f5 100644 --- a/fsdev/qemu-fsdev.c +++ b/fsdev/qemu-fsdev.c @@ -16,6 +16,7 @@

[Spice-devel] [PATCH 01/35] Use display types for local display only.

2010-09-09 Thread alexl
From: Gerd Hoffmann This patch drops DT_VNC. The display types are only used to select select the local display (i.e. curses, sdl, coca, ...). Remote displays (for now only vnc, spice will follow) can be enabled independently. --- sysemu.h |1 - vl.c | 24 +--- 2

[Spice-devel] [PATCH 00/35] *** SUBJECT HERE ***

2010-09-09 Thread alexl
From: Alexander Larsson *** BLURB HERE *** Alexander Larsson (1): spice: Ensure flush_resources() flushes the ring if possible Alon Levy (1): spice-vmc: compiler warning fix on fprintf Gerd Hoffmann (32): Use display types for local display only. Use machine_init() to register virtfs c

[Spice-devel] [PATCH 1/1] spice: Ensure flush_resources() flushes the ring if possible

2010-09-09 Thread alexl
From: Alexander Larsson The driver may be waiting on the ring, so we need to always flush the ring on interface_flush_resources, independent of d->num_free_res. Additionally, the num_free_res check is changed to >= to make sure we don't stall if it passes QXL_FREE_BUNCH_SIZE. --- hw/qxl.c | 1

[Spice-devel] [PATCH 0/1] Fix resource flushing in

2010-09-09 Thread alexl
From: Alexander Larsson This fixes a potential timeout issue in the guest driver. Alexander Larsson (1): spice: Ensure flush_resources() flushes the ring if possible hw/qxl.c | 12 +++- 1 files changed, 7 insertions(+), 5 deletions(-) __

[Spice-devel] [PATCH 2/2] server: Ensure we flush the release pipe after an oom

2010-09-09 Thread alexl
From: Alexander Larsson We really need to flush the ring to ensure that we push something on the release ring. If we don't do this and the ring is not pushed for other reasons we will timeout in the guest driver waiting for the ring. --- server/red_worker.c |1 + 1 files changed, 1 insertion

[Spice-devel] [PATCH 1/2] Release more drawables on OOM

2010-09-09 Thread alexl
From: Alexander Larsson We've changed how resources are released so they are now being freed continuosly, rather than on OOM, since we want to free as early possible to avoid fragmentation. So, OOM situations should be a bit less common now and signify a real memory shortage, so we should try to

[Spice-devel] [PATCH 0/2] Better OOM handling

2010-09-09 Thread alexl
From: Alexander Larsson Here are some patches with stuff i found while tracking the resource leak. Alexander Larsson (2): Release more drawables on OOM server: Ensure we flush the release pipe after an oom server/red_worker.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) __

[Spice-devel] [PATCH 3/3] Sync dll version with inf file

2010-09-09 Thread alexl
From: Alexander Larsson It seems we bumped the inf file version without changing the version encoded in the dll. --- display/driver.rc |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/display/driver.rc b/display/driver.rc index 20b0f4f..e5ebfa2 100644 --- a/display/dri

[Spice-devel] [PATCH 2/3] Protect release_ring with malloc_sem

2010-09-09 Thread alexl
From: Alexander Larsson We need to protect the release ring against concurrent access, so we need a semaphore for it. Since we already hold the malloc_sem in almost all cases we access the ring we just extend its use to cover all the places its used. --- display/qxldd.h |2 +- display/res.c

[Spice-devel] [PATCH 1/3] Don't leak resources

2010-09-09 Thread alexl
From: Alexander Larsson Ensure we break from the release loop if num_to_release got to zero. This fixes a leak of resources as we otherwise threw away the whole list of things to free and started on the next one. --- display/res.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) dif

[Spice-devel] [PATCH 0/3] Windows driver updates, including resource leak fix

2010-09-09 Thread alexl
From: Alexander Larsson I finally found the resource leak. It was a driver bug. Here is the fix plus an initial start on driver threadsafety and some cleanup. Please review. Alexander Larsson (3): Don't leak resources Protect release_ring with malloc_sem Sync dll version with inf file d

Re: [Spice-devel] leaking drawables

2010-09-09 Thread Gerd Hoffmann
Hi, Eventually we reach the case where prod is 6 (and lets say cons is still 0). We put stuff in item 6, then SPICE_RING_PUSH increasing prod to 7, initialize item 7. No overwrite here. Then when prod is 7 we keep appending to the item 7 list, but never push it because prod - cons + 1 = 7 - 0

Re: [Spice-devel] leaking drawables

2010-09-09 Thread Alexander Larsson
On Thu, 2010-09-09 at 09:31 +0200, Gerd Hoffmann wrote: > > There is one special thing in the release ring usage though. As you > know qxl builds up a linked lists there, where the heads are in the > ring. qxl does also store the head of the list which it currently > builds into the ring, but

Re: [Spice-devel] leaking drawables

2010-09-09 Thread Gerd Hoffmann
On 09/08/10 21:24, Alexander Larsson wrote: On Tue, 2010-09-07 at 17:08 +0200, Gerd Hoffmann wrote: Hi, This happens for several consecutive resource releases. Looking at what actually gets released by the driver we see that the resources are freed in the same order as they were release, its j