Re: [Spice-devel] [PATCH 19/21] sysemu: add vm_start_hold/release

2013-11-29 Thread Paolo Bonzini
Il 18/11/2013 13:25, Marc-André Lureau ha scritto: +static int start_hold; + +void vm_start_hold(void) +{ +start_hold++; +} + +void vm_start_release(void) +{ +start_hold--; +vm_start(); +} + void vm_start(void) { +if (start_hold != 0) { +return; +}

Re: [Spice-devel] [Xen-devel] [PATCH] libxl: Spice usbredirection support for upstream qemu

2013-07-07 Thread Paolo Bonzini
Il 04/07/2013 19:17, Andreas Färber ha scritto: Also if at some point you try to use, e.g., q35 rather than i440fx machine, it might have EHCI by default and the snippet would be instantiating a duplicate one. I.e., the three levels of dependency could be separated more clearly: PCI, USB,

Re: [Spice-devel] [Xen-devel] [PATCH] libxl: Spice usbredirection support for upstream qemu

2013-07-07 Thread Paolo Bonzini
- Messaggio originale - Da: Fabio Fantoni fabio.fant...@m2r.biz A: Paolo Bonzini pbonz...@redhat.com Cc: Andreas Färber afaer...@suse.de, Stefano Stabellini stefano.stabell...@eu.citrix.com, xen-de...@lists.xensource.com, Wei Liu wei.l...@citrix.com, Ian Campbell ian.campb

Re: [Spice-devel] [Xen-devel] [PATCH] libxl: Spice usbredirection support for upstream qemu

2013-07-07 Thread Paolo Bonzini
Il 05/07/2013 11:27, Fabio Fantoni ha scritto: What is the best parameters for adding usb2 controller, those who had already done? About usb1 controller implementation parameter in xen is only with -usb, is correct or need something better? -usb is USB 1.0 on pc and USB 2.0 on q35. The

Re: [Spice-devel] [PATCH 07/12] block: save the associated child in BlockDriverState

2013-06-21 Thread Paolo Bonzini
Il 21/06/2013 10:36, Marc-André Lureau ha scritto: Hi On Fri, Jun 21, 2013 at 12:25 AM, Paolo Bonzini pbonz...@redhat.com mailto:pbonz...@redhat.com wrote: Il 20/06/2013 19:46, Marc-André Lureau ha scritto: This allows the Spice block driver to eject the associated device

Re: [Spice-devel] [PATCH 07/12] block: save the associated child in BlockDriverState

2013-06-21 Thread Paolo Bonzini
Il 21/06/2013 15:30, Marc-André Lureau ha scritto: Getting to the bottom BlockDriverState to be able to eject change it. (it could also be named the parent, but other parts of the code suggest the child name) There is already an interface for eject/change, which is the

Re: [Spice-devel] [PATCH 07/12] block: save the associated child in BlockDriverState

2013-06-20 Thread Paolo Bonzini
Il 20/06/2013 19:46, Marc-André Lureau ha scritto: This allows the Spice block driver to eject the associated device. The child can change when you have for example a streaming operation. What exactly are you trying to do here (I guess I'll understand more when I get to the later patches)? Can

Re: [Spice-devel] [PATCH 2/3] build: Use glib2

2012-11-24 Thread Paolo Bonzini
Il 23/11/2012 16:58, Christophe Fergeau ha scritto: +PKG_CHECK_MODULES([GLIB2], [glib-2.0 = 2.22]) +SPICE_REQUIRES+= glib-2.0 = 2.22 + Note that QEMU only requires 2.12, or 2.20 on Windows. Paolo ___ Spice-devel mailing list

Re: [Spice-devel] [PATCH 1/7] spice-ppc: Adds powerppc compilation support

2012-08-09 Thread Paolo Bonzini
Il 07/08/2012 20:39, Erlon Cruz ha scritto: -AC_MSG_CHECKING(for x86 or x86-64 platform) +AC_MSG_CHECKING(for x86,x86-64 or powerpc64 platform) case $host_cpu in i386|i486|i586|i686|i786|k6|k7|arm|armv7) variant=32 @@ -64,13 +64,19 @@ case $host_cpu in x86_64) variant=64

Re: [Spice-devel] [PATCHv2 win-agent 2/9] mingw: use standard main() entry function

2012-05-23 Thread Paolo Bonzini
Il 22/05/2012 14:50, Christophe Fergeau ha scritto: @@ -1226,9 +1230,9 @@ int _tmain(int argc, TCHAR* argv[], TCHAR* envp[]) } VDService* vdservice = VDService::get(); if (argc 1) { -if (lstrcmpi(argv[1], TEXT(install)) == 0) { +if (strcmp(argv[1],

Re: [Spice-devel] [PATCH 6/7] Respect IOV_MAX if defined

2012-02-17 Thread Paolo Bonzini
On 02/17/2012 10:08 AM, Alon Levy wrote: Isn't this another candidate for ifdeferry? It actually applies to Linux too, except that IOV_MAX is 1024. See in fs/read_write.c 709 static ssize_t do_readv_writev(int type, struct file *file, 710const struct iovec

Re: [Spice-devel] [PATCH 5/7] red_worker: reimplement event loop using poll()

2012-02-17 Thread Paolo Bonzini
On 02/17/2012 02:18 PM, Alon Levy wrote: - guaranteed bitrot in the poll() path :) Yeah, I guess you are right. I'm worried since I don't know the difference in performance between epoll and poll You can assume it to be zero unless you have a lot of descriptors (50 is probably not enough)

Re: [Spice-devel] [PATCH 01/17] Death to all TABs

2012-01-12 Thread Paolo Bonzini
On 01/12/2012 12:32 PM, Alon Levy wrote: autogen.sh| 42 +- client/demarshallers.h|2 +- client/glz_decoder_config.h | 12 +- client/red_channel.h | 14 +- client/red_gdi_canvas.h |2 +- client/red_peer.h |2

Re: [Spice-devel] [PATCH 4/5] server: introduce dispatcher

2011-11-07 Thread Paolo Bonzini
On 11/06/2011 05:49 PM, Alon Levy wrote: +while (read_size size) { +ret = read(fd, buf + read_size, size - read_size); +if (ret == -1) { +if (errno != EINTR) { +if (errno == EAGAIN !block) { +return 0; +} +

Re: [Spice-devel] [PATCH v2 2/6] server: introduce dispatcher

2011-11-07 Thread Paolo Bonzini
On 11/07/2011 01:05 PM, Alon Levy wrote: +void dispatcher_handle_recv_read(Dispatcher *dispatcher) +{ +while (dispatcher_handle_single_read(dispatcher)) { +} +} This will busy-wait if no messages are ready. dispatcher_handle_single_read returns 0 when it fails to read a

Re: [Spice-devel] [RFC 2/3] server: introduce dispatcher

2011-11-02 Thread Paolo Bonzini
On 11/01/2011 09:10 AM, Alon Levy wrote: +/* + * read_with_eintr + * helper. reads until size bytes accumulated in buf, if an error other then + * EINTR is encountered returns -1, otherwise returns 0. + */ +int read_with_eintr(int fd, void *buf, size_t size) +{ +int read_size = 0; +int

Re: [Spice-devel] [RFC 2/3] server: introduce dispatcher

2011-11-02 Thread Paolo Bonzini
On 11/02/2011 04:05 PM, Alon Levy wrote: On Wed, Nov 02, 2011 at 02:57:45PM +0100, Paolo Bonzini wrote: On 11/01/2011 09:10 AM, Alon Levy wrote: +/* + * read_with_eintr + * helper. reads until size bytes accumulated in buf, if an error other then + * EINTR is encountered returns -1, otherwise

Re: [Spice-devel] [PATCH] monitor: Protect outbuf from concurrent access

2011-09-02 Thread Paolo Bonzini
On 09/02/2011 05:18 PM, Gerd Hoffmann wrote: Can you just use a bottom half to defer this work to the I/O thread? Bottom half scheduling has to be signal safe which means it will also be thread safe. Not that straight forward as I would have to pass arguments to the bottom half. Can you

Re: [Spice-devel] [PATCH 1/5] use _setjmp/_longjmp to speed up coroutine switching

2011-08-17 Thread Paolo Bonzini
On 08/17/2011 06:17 AM, Christophe Fergeau wrote: Hey, ACK series, but I haven't read the winfiber code really carefully (since I know nothing about it). I compared it with the implementation in QEMU and it seems good. Paolo ___ Spice-devel

Re: [Spice-devel] [RfC fix] async thread fix - handle EAGAIN/EINTR, remove fprintf

2011-07-04 Thread Paolo Bonzini
On 06/24/2011 02:52 PM, Alon Levy wrote: ret = read(d-aio_pipe[0],io, sizeof(io)); +if (ret 0 (errno == EAGAIN || errno == EINTR)) { +continue; +} This means you'd be busy waiting if you get EAGAIN. If you really need EAGAIN, perhaps there is another

Re: [Spice-devel] [Qemu-devel] paravirtual mouse/tablet

2011-01-13 Thread Paolo Bonzini
On 01/13/2011 05:39 PM, Anthony Liguori wrote: On 01/13/2011 10:14 AM, Avi Kivity wrote: On 01/13/2011 05:52 PM, Anthony Liguori wrote: /* host-guest, sent before any other events */ typedef struct qemu_pvtablet_init { uint32_t res_x; /* x axis resolution */ uint32_t res_y; /* y axis

Re: [Spice-devel] qemu stuck (locking issue ?)

2010-11-29 Thread Paolo Bonzini
On 11/29/2010 01:32 PM, Hans de Goede wrote: I didn't do any serious testing with the iothread enabled (yet). Last time I tried enabling iothread caused problems even without spice so I didn't bother. Was a few months ago though, so things can have changed meanwhile ... Ok, I just enabled