[Qemu-devel] Problem with allocation of big files

2011-09-20 Thread Nikita A Menkovich
Hello, I found a strange problem with allocationg big files on drive. For example in guestfish I allocate large disk image for example: $ guestfish > allocate test.img 20G When an image allocating, there is a big slowdown of guest OSes, launched on host machine, and on different drives. For Li

Re: [Qemu-devel] [PATCH] rbd: allow escaping in config string

2011-09-20 Thread Kevin Wolf
Am 19.09.2011 22:35, schrieb Sage Weil: > The config string is variously delimited by =, @, and /, depending on the > field. Allow these characters to be escaped by preceeding them with \. > > Signed-off-by: Sage Weil Thanks, applied to the block branch. Kevin

Re: [Qemu-devel] [PATCH 1/3] trace: Fix print format for "mipsnet_write"

2011-09-20 Thread Stefan Hajnoczi
On Fri, Sep 16, 2011 at 06:59:33PM +0200, Lluís Vilanova wrote: > diff --git a/trace-events b/trace-events > index c09399f..9d1fbbb 100644 > --- a/trace-events > +++ b/trace-events > @@ -454,7 +454,7 @@ milkymist_vgafb_memory_write(uint32_t addr, uint32_t > value) "addr %08x value %08 > mipsnet_s

Re: [Qemu-devel] [PATCH] isapc: give system address space when pci is disabled

2011-09-20 Thread Jan Kiszka
On 2011-09-19 20:49, Hervé Poussineau wrote: > Jan Kiszka a écrit : >> On 2011-09-18 18:04, Hervé Poussineau wrote: >>> Signed-off-by: Hervé Poussineau >>> --- >>> hw/pc_piix.c |2 +- >>> 1 files changed, 1 insertions(+), 1 deletions(-) >>> >>> diff --git a/hw/pc_piix.c b/hw/pc_piix.c >>> ind

Re: [Qemu-devel] [PATCH 00/14] qdev: assign unique names to all devices (part 1)

2011-09-20 Thread Jan Kiszka
On 2011-09-19 16:24, Kevin Wolf wrote: > Am 19.09.2011 16:05, schrieb Anthony Liguori: >> On 09/19/2011 02:26 AM, Jan Kiszka wrote: >>> On 2011-09-16 20:03, Anthony Liguori wrote: So this is a simplification that I plan on running with. For now, I think this series is the right nex

Re: [Qemu-devel] [PATCH 0/2] Make simpletrace work on Windows

2011-09-20 Thread hkran
On 09/09/2011 05:37 PM, Stefan Hajnoczi wrote: The 'simple' trace backend uses pthreads and does not work on Windows. These patches switch from pthreads to glib so that the code builds on all platforms supported by glib. Only one thing I'm unhappy about: the simpletrace write-out thread used to

Re: [Qemu-devel] [PATCH 0/6] QED block conversion

2011-09-20 Thread Kevin Wolf
Am 12.09.2011 16:47, schrieb Devin Nakamura: > This patch series adds support for block conversion to the qed driver. > This depends on my precivious block conversion api series > Devin Nakamura (6): > qed: add qed_find_cluster_sync() > qed: add bdrv_qed_get_conversion_options() > qed: add op

Re: [Qemu-devel] [PATCH 3/6] qed: add open_conversion_target()

2011-09-20 Thread Kevin Wolf
Am 12.09.2011 16:47, schrieb Devin Nakamura: > Signed-off-by: Devin Nakamura > --- > block/qed.c | 57 + > 1 files changed, 57 insertions(+), 0 deletions(-) > > diff --git a/block/qed.c b/block/qed.c > index 16320f5..93827db 100644 > ---

Re: [Qemu-devel] [PATCH 0/2] Make simpletrace work on Windows

2011-09-20 Thread Stefan Hajnoczi
On Tue, Sep 20, 2011 at 05:05:45PM +0800, hkran wrote: > On 09/09/2011 05:37 PM, Stefan Hajnoczi wrote: > >The 'simple' trace backend uses pthreads and does not work on Windows. These > >patches switch from pthreads to glib so that the code builds on all platforms > >supported by glib. > > > >Only

Re: [Qemu-devel] [PATCH 0/6] QED block conversion

2011-09-20 Thread Stefan Hajnoczi
On Tue, Sep 20, 2011 at 10:38:05AM +0200, Kevin Wolf wrote: > Am 12.09.2011 16:47, schrieb Devin Nakamura: > > This patch series adds support for block conversion to the qed driver. > > This depends on my precivious block conversion api series > > Devin Nakamura (6): > > qed: add qed_find_cluster

Re: [Qemu-devel] [PATCH] pci: implement bridge filtering

2011-09-20 Thread Wen Congyang
At 09/14/2011 09:48 AM, Wen Congyang Write: > At 09/05/2011 02:13 AM, Michael S. Tsirkin Write: >> Support bridge filtering on top of the memory >> API as suggested by Avi Kivity: >> >> Create a memory region for the bridge's address space. This region is >> not directly added to system_memory or

Re: [Qemu-devel] [PATCH 6/6] qed: add bdrv_qed_copy_header()

2011-09-20 Thread Kevin Wolf
Am 12.09.2011 16:59, schrieb Devin Nakamura: > Signed-off-by: Devin Nakamura > --- > block/qed.c | 15 +++ > 1 files changed, 15 insertions(+), 0 deletions(-) > > diff --git a/block/qed.c b/block/qed.c > index 341cf9d..caecdff 100644 > --- a/block/qed.c > +++ b/block/qed.c > @@ -15

Re: [Qemu-devel] [PATCH 0/2] Make simpletrace work on Windows

2011-09-20 Thread Zhi Yong Wu
On Tue, Sep 20, 2011 at 5:57 PM, Stefan Hajnoczi wrote: > On Tue, Sep 20, 2011 at 05:05:45PM +0800, hkran wrote: >> On 09/09/2011 05:37 PM, Stefan Hajnoczi wrote: >> >The 'simple' trace backend uses pthreads and does not work on Windows.   >> >These >> >patches switch from pthreads to glib so that

Re: [Qemu-devel] [PATCH 0/2] Make simpletrace work on Windows

2011-09-20 Thread Avi Kivity
On 09/09/2011 12:37 PM, Stefan Hajnoczi wrote: The 'simple' trace backend uses pthreads and does not work on Windows. These patches switch from pthreads to glib so that the code builds on all platforms supported by glib. Only one thing I'm unhappy about: the simpletrace write-out thread used to

[Qemu-devel] [PATCH] MAINTAINERS: claim maintainership for the OMAP devices

2011-09-20 Thread Peter Maydell
Signed-off-by: Peter Maydell --- (1) I've put this in the 'Devices' part of the MAINTAINERS file because OMAP isn't a specific machine; seemed the best fit (2) I'll put together a pullreq with this and the other omap patches later this week or early next. MAINTAINERS |5 + 1 files change

Re: [Qemu-devel] [PATCH 1/2] trace: portable simple trace backend using glib

2011-09-20 Thread Jan Kiszka
On 2011-09-09 11:37, Stefan Hajnoczi wrote: > Convert the simple trace backend to glib so that it works under Windows. > We cannot use pthread directly but glib provides portable abstractions. > Also use glib atomics instead of newish gcc builtins which may not be > supported on Windows toolchains.

Re: [Qemu-devel] Android ginger bread build up on QEMO x-86

2011-09-20 Thread Singh, Navneet
Hi , How can I port Android -x86 on QEMU. From where I can get the gingerbread build and QEMU build to run windows 7 Hp EliteBook 8440p. Please also provide the steps for Installation and running the Gingerbread android. Br Navneet Singh

Re: [Qemu-devel] [RFC 7/8] cutil: add strocat(), to concat a string to an offset in another

2011-09-20 Thread Paolo Bonzini
On 09/19/2011 04:41 PM, Michael Roth wrote: +/* concat first 'offset' chars in 'dest' with 'src' */ +char *strocat(char *buf, const char *src, int offset) +{ +memcpy(&buf[offset], src, strlen(src)); +buf[offset+strlen(src)] = '\0'; This is just strcpy(&buf[offset], src); +return b

Re: [Qemu-devel] [PATCH 1/2] trace: portable simple trace backend using glib

2011-09-20 Thread Paolo Bonzini
On 09/20/2011 12:31 PM, Jan Kiszka wrote: Please avoid restrictive glib thread services. We have qemu_thread abstractions that allow central tuning (will be needed e.g. to adjust scheduling parameters). I think the rationale here was to allow tracing the qemu_thread routines. For your applica

Re: [Qemu-devel] [PATCH 1/2] trace: portable simple trace backend using glib

2011-09-20 Thread Jan Kiszka
On 2011-09-20 12:52, Paolo Bonzini wrote: > On 09/20/2011 12:31 PM, Jan Kiszka wrote: >> Please avoid restrictive glib thread services. We have qemu_thread >> abstractions that allow central tuning (will be needed e.g. to adjust >> scheduling parameters). > > I think the rationale here was to allo

[Qemu-devel] [PULL 00/20] Block patches

2011-09-20 Thread Kevin Wolf
The following changes since commit 530889ff95659d8fea81eb556e5706387fdddfa7: sun4u: don't set up isa_mem_base (2011-09-18 12:00:19 +) are available in the git repository at: git://repo.or.cz/qemu/kevin.git for-anthony Alexander Motin (1): AHCI Port Interrupt Enable register cleanin

[Qemu-devel] [PATCH 02/20] nbd: sync API definitions with upstream

2011-09-20 Thread Kevin Wolf
From: Paolo Bonzini Signed-off-by: Paolo Bonzini Signed-off-by: Kevin Wolf --- nbd.c |2 ++ nbd.h | 11 ++- 2 files changed, 12 insertions(+), 1 deletions(-) diff --git a/nbd.c b/nbd.c index 47ecb22..d32a19e 100644 --- a/nbd.c +++ b/nbd.c @@ -67,6 +67,8 @@ #define NBD_PRINT_DEB

[Qemu-devel] [PATCH 03/20] nbd: support NBD_SET_FLAGS ioctl

2011-09-20 Thread Kevin Wolf
From: Paolo Bonzini The nbd kernel module cannot enable DISCARD requests unless it is informed about it. The flags field in the header is used for this, and this patch adds support for it. Signed-off-by: Paolo Bonzini Signed-off-by: Kevin Wolf --- nbd.c |8 1 files changed, 8 in

[Qemu-devel] [PATCH 01/20] nbd: support feature negotiation

2011-09-20 Thread Kevin Wolf
From: Paolo Bonzini nbd supports writing flags in bytes 24...27 of the header, and uses that for the read-only flag. Add support for it in qemu-nbd. Signed-off-by: Paolo Bonzini Signed-off-by: Kevin Wolf --- block/nbd.c |4 ++-- nbd.c | 32 +--- nbd.h

[Qemu-devel] [PATCH 15/20] rbd: update comment heading

2011-09-20 Thread Kevin Wolf
From: Sage Weil Properly document the configuration string syntax and semantics. Remove (out of date) details about the librbd implementation. Signed-off-by: Sage Weil Signed-off-by: Kevin Wolf --- block/rbd.c | 28 +--- 1 files changed, 13 insertions(+), 15 deletio

Re: [Qemu-devel] [Libguestfs] Problem with allocation of big files

2011-09-20 Thread Richard W.M. Jones
On Tue, Sep 20, 2011 at 11:38:15AM +0400, Nikita A Menkovich wrote: > Hello, > > I found a strange problem with allocationg big files on drive. > > For example in guestfish I allocate large disk image > for example: > > $ guestfish > > allocate test.img 20G > > When an image allocating, there i

[Qemu-devel] [PATCH 17/20] scsi: fix sign extension problems

2011-09-20 Thread Kevin Wolf
From: Paolo Bonzini When assigning a 32-bit value to cmd->xfer (which is 64-bits) it can be erroneously sign extended because the intermediate 32-bit computation is signed. Fix this by standardizing on the ld*_be_p functions. Signed-off-by: Paolo Bonzini Signed-off-by: Kevin Wolf --- hw/scsi

Re: [Qemu-devel] [PATCH] pci: implement bridge filtering

2011-09-20 Thread Avi Kivity
On 09/20/2011 11:09 AM, Wen Congyang wrote: At 09/14/2011 09:48 AM, Wen Congyang Write: > At 09/05/2011 02:13 AM, Michael S. Tsirkin Write: >> Support bridge filtering on top of the memory >> API as suggested by Avi Kivity: >> >> Create a memory region for the bridge's address space. This re

[Qemu-devel] [PATCH 07/20] dma-helpers: allow including from target-independent code

2011-09-20 Thread Kevin Wolf
From: Paolo Bonzini Target-independent code cannot construct sglists, but it can take them from the outside as a black box. Allow this. Signed-off-by: Paolo Bonzini Signed-off-by: Kevin Wolf --- dma.h |8 ++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/dma.h b/dma

Re: [Qemu-devel] [PATCH 2/3] trace: [ust] Do not use 'm' in event argument names (used by ust macros)

2011-09-20 Thread Stefan Hajnoczi
On Fri, Sep 16, 2011 at 06:59:38PM +0200, Lluís Vilanova wrote: > Signed-off-by: Lluís Vilanova > --- > trace-events |4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/trace-events b/trace-events > index 9d1fbbb..b653d70 100644 > --- a/trace-events > +++ b/trace-eve

[Qemu-devel] [PATCH 09/20] scsi-disk: commonize iovec creation between reads and writes

2011-09-20 Thread Kevin Wolf
From: Paolo Bonzini Also, consistently use qiov.size instead of iov.iov_len. Signed-off-by: Paolo Bonzini Signed-off-by: Kevin Wolf --- hw/scsi-disk.c | 42 ++ 1 files changed, 18 insertions(+), 24 deletions(-) diff --git a/hw/scsi-disk.c b/hw/scsi-d

Re: [Qemu-devel] [PATCH] pci: implement bridge filtering

2011-09-20 Thread Michael S. Tsirkin
On Tue, Sep 20, 2011 at 04:09:23PM +0800, Wen Congyang wrote: > At 09/14/2011 09:48 AM, Wen Congyang Write: > > At 09/05/2011 02:13 AM, Michael S. Tsirkin Write: > >> Support bridge filtering on top of the memory > >> API as suggested by Avi Kivity: > >> > >> Create a memory region for the bridge's

[Qemu-devel] [PATCH 06/20] dma-helpers: rename is_write to to_dev

2011-09-20 Thread Kevin Wolf
From: Paolo Bonzini Signed-off-by: Paolo Bonzini Signed-off-by: Kevin Wolf --- dma-helpers.c | 14 +++--- dma.h |2 +- hw/ide/core.c |2 +- hw/ide/macio.c |2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/dma-helpers.c b/dma-helpers.c inde

[Qemu-devel] [PATCH 12/20] posix-aio-compat: Removed unused offset variable

2011-09-20 Thread Kevin Wolf
From: Frediano Ziglio Signed-off-by: Frediano Ziglio Signed-off-by: Kevin Wolf --- posix-aio-compat.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/posix-aio-compat.c b/posix-aio-compat.c index 3193dbf..63a8fae 100644 --- a/posix-aio-compat.c +++ b/posix-aio-comp

Re: [Qemu-devel] [PATCH 2/3] trace: [ust] Do not use 'm' in event argument names (used by ust macros)

2011-09-20 Thread Stefan Hajnoczi
On Fri, Sep 16, 2011 at 06:59:38PM +0200, Lluís Vilanova wrote: > Signed-off-by: Lluís Vilanova > --- > trace-events |4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/trace-events b/trace-events > index 9d1fbbb..b653d70 100644 > --- a/trace-events > +++ b/trace-eve

[Qemu-devel] [PATCH 04/20] raw-posix: Fix bdrv_flush error return values

2011-09-20 Thread Kevin Wolf
bdrv_flush is supposed to use 0/-errno return values Signed-off-by: Kevin Wolf --- block/raw-posix.c |9 - 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/block/raw-posix.c b/block/raw-posix.c index a624f56..305998d 100644 --- a/block/raw-posix.c +++ b/block/raw-posix.

Re: [Qemu-devel] [PATCH 1/2] trace: portable simple trace backend using glib

2011-09-20 Thread Stefan Hajnoczi
On Tue, Sep 20, 2011 at 11:58 AM, Jan Kiszka wrote: > On 2011-09-20 12:52, Paolo Bonzini wrote: >> On 09/20/2011 12:31 PM, Jan Kiszka wrote: >>> Please avoid restrictive glib thread services. We have qemu_thread >>> abstractions that allow central tuning (will be needed e.g. to adjust >>> scheduli

[Qemu-devel] [PATCH 08/20] dma-helpers: rewrite completion/cancellation

2011-09-20 Thread Kevin Wolf
From: Paolo Bonzini This fixes various problems with completion/cancellation: * if the io_func fails to get an AIOCB, the callback wasn't called * If DMA encounters a bounce buffer conflict, and the DMA operation is canceled before the bottom half fires, bad things happen. * memory is not unma

[Qemu-devel] [PATCH 13/20] AHCI Port Interrupt Enable register cleaning on soft reset

2011-09-20 Thread Kevin Wolf
From: Alexander Motin I've found that FreeBSD AHCI driver doesn't work with AHCI hardware emulation of QEMU 0.15.0. I believe the problem is on QEMU's side. As I see, it clears port's Interrupt Enable register each time when reset of any level happens. Is is reasonable for the global controller r

[Qemu-devel] [PATCH 11/20] VMDK: fix leak of extent_file

2011-09-20 Thread Kevin Wolf
From: Fam Zheng Release extent_file on error in vmdk_parse_extents. Added closing files in freeing extents. Signed-off-by: Fam Zheng Signed-off-by: Kevin Wolf --- block/vmdk.c | 14 ++ 1 files changed, 10 insertions(+), 4 deletions(-) diff --git a/block/vmdk.c b/block/vmdk.c in

Re: [Qemu-devel] [PATCH] pci: implement bridge filtering

2011-09-20 Thread Avi Kivity
On 09/20/2011 02:55 PM, Michael S. Tsirkin wrote: > > Hi Michael S. Tsirkin: > I test pci bridge filtering on real hardware, and I find that I can mmap > the resource after I change the memory base and memory limit(The BAR should > be not visible on OS after changing the memory region). > >

[Qemu-devel] [PATCH 19/20] linux-aio: remove process requests callback

2011-09-20 Thread Kevin Wolf
From: Paolo Bonzini Signed-off-by: Paolo Bonzini Signed-off-by: Kevin Wolf --- linux-aio.c | 11 +-- 1 files changed, 1 insertions(+), 10 deletions(-) diff --git a/linux-aio.c b/linux-aio.c index 5265a02..bffa6cd 100644 --- a/linux-aio.c +++ b/linux-aio.c @@ -68,15 +68,6 @@ static v

[Qemu-devel] [PATCH v3 1/2] trace: portable simple trace backend using glib

2011-09-20 Thread stefanha
From: Stefan Hajnoczi Convert the simple trace backend to glib so that it works under Windows. We cannot use pthread directly but glib provides portable abstractions. Also use glib atomics instead of newish gcc builtins which may not be supported on Windows toolchains. Signed-off-by: Stefan Hajn

[Qemu-devel] [PATCH v3 2/2] trace: use binary file open mode in simpletrace

2011-09-20 Thread stefanha
From: Stefan Hajnoczi For Windows portability the simple trace backend must use the 'b' file open mode. This prevents the stdio library from mangling 0x0a/0x0d newline characters. Signed-off-by: Stefan Hajnoczi --- trace/simple.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) di

[Qemu-devel] [PATCH v3 0/2] Make simpletrace work on Windows

2011-09-20 Thread stefanha
From: Stefan Hajnoczi The 'simple' trace backend uses pthreads and does not work on Windows. These patches switch from pthreads to glib so that the code builds on all platforms supported by glib. v3: * Explain that glib threads need to be used directly * Explain the signal masking v2: * Blo

[Qemu-devel] [PATCH 05/20] scsi-generic: do not disable FUA

2011-09-20 Thread Kevin Wolf
From: Paolo Bonzini I found no rationale for this in the logs, and it is quite bad because it will make scsi-generic unsafe WRT power failures. Signed-off-by: Paolo Bonzini Reviewed-by: Christoph Hellwig Signed-off-by: Kevin Wolf --- hw/scsi-generic.c |6 -- 1 files changed, 0 insert

[Qemu-devel] [PATCH 14/20] rbd: ignore failures when reading from default conf location

2011-09-20 Thread Kevin Wolf
From: Sage Weil If we are reading from the default config location, ignore any failures. It is perfectly legal for the user to specify exactly the options they need and to not rely on any config file. Signed-off-by: Sage Weil Signed-off-by: Kevin Wolf --- block/rbd.c | 14 -- 1

[Qemu-devel] [PATCH] fix error: variable 'pid' set but not used

2011-09-20 Thread Paolo Bonzini
/home/pbonzini/work/upstream/qemu/posix-aio-compat.c: In function 'aio_thread': /home/pbonzini/work/upstream/qemu/posix-aio-compat.c:314:11: error: variable 'pid' set but not used [-Werror=unused-but-set-variable] Signed-off-by: Paolo Bonzini --- Kevin, can you add this to your block bra

Re: [Qemu-devel] [PATCH] pci: implement bridge filtering

2011-09-20 Thread Michael S. Tsirkin
On Tue, Sep 20, 2011 at 02:44:26PM +0300, Avi Kivity wrote: > On 09/20/2011 11:09 AM, Wen Congyang wrote: > >At 09/14/2011 09:48 AM, Wen Congyang Write: > >> At 09/05/2011 02:13 AM, Michael S. Tsirkin Write: > >>> Support bridge filtering on top of the memory > >>> API as suggested by Avi Kivity

[Qemu-devel] [PATCH 10/20] scsi-disk: lazily allocate bounce buffer

2011-09-20 Thread Kevin Wolf
From: Paolo Bonzini It will not be needed for reads and writes if the HBA provides a sglist. In addition, this lets scsi-disk refuse commands with an excessive allocation length, as well as limit memory on usual well-behaved guests. Signed-off-by: Paolo Bonzini Signed-off-by: Kevin Wolf --- h

Re: [Qemu-devel] [PATCH] fix error: variable 'pid' set but not used

2011-09-20 Thread Stefan Hajnoczi
On Tue, Sep 20, 2011 at 1:18 PM, Paolo Bonzini wrote: > /home/pbonzini/work/upstream/qemu/posix-aio-compat.c: In function > 'aio_thread': > /home/pbonzini/work/upstream/qemu/posix-aio-compat.c:314:11: error: variable > 'pid' set but not used [-Werror=unused-but-set-variable] > > Signed-off-by: P

Re: [Qemu-devel] [PATCH] pci: implement bridge filtering

2011-09-20 Thread Avi Kivity
On 09/20/2011 03:22 PM, Michael S. Tsirkin wrote: > > Yes. Instead of hitting the BAR, you hit the default mmio handler. Hmm, not sure what's right in that case. But, same if BAR is disabled? Would be nice to make some handler in bridge to get called, to set master abort flag etc. Put an mmi

[Qemu-devel] [PATCH 16/20] rbd: call flush, if available

2011-09-20 Thread Kevin Wolf
From: Sage Weil librbd recently added async writeback and flush support. If the new rbd_flush() call is available, call it. Signed-off-by: Sage Weil Signed-off-by: Kevin Wolf --- block/rbd.c | 12 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/block/rbd.c b/bl

[Qemu-devel] [PATCH 20/20] rbd: allow escaping in config string

2011-09-20 Thread Kevin Wolf
From: Sage Weil The config string is variously delimited by =, @, and /, depending on the field. Allow these characters to be escaped by preceeding them with \. Signed-off-by: Sage Weil Signed-off-by: Kevin Wolf --- block/rbd.c | 29 +++-- 1 files changed, 27 insert

[Qemu-devel] [PATCH 18/20] block: avoid SIGUSR2

2011-09-20 Thread Kevin Wolf
From: Frediano Ziglio Now that iothread is always compiled sending a signal seems only an additional step. This patch also avoid writing to two pipe (one from signal and one in qemu_service_io). Work with kvm enabled or disabled. strace output is more readable (less syscalls). Signed-off-by: F

Re: [Qemu-devel] [PATCH] fix error: variable 'pid' set but not used

2011-09-20 Thread Kevin Wolf
Am 20.09.2011 14:18, schrieb Paolo Bonzini: > /home/pbonzini/work/upstream/qemu/posix-aio-compat.c: In function > 'aio_thread': > /home/pbonzini/work/upstream/qemu/posix-aio-compat.c:314:11: error: variable > 'pid' set but not used [-Werror=unused-but-set-variable] > > Signed-off-by: Paolo Bonzi

Re: [Qemu-devel] [PATCH v8 3/4] block: add block timer and throttling algorithm

2011-09-20 Thread Marcelo Tosatti
On Mon, Sep 19, 2011 at 05:55:41PM +0800, Zhi Yong Wu wrote: > On Wed, Sep 14, 2011 at 6:50 PM, Marcelo Tosatti wrote: > > On Tue, Sep 13, 2011 at 11:09:46AM +0800, Zhi Yong Wu wrote: > >> On Fri, Sep 9, 2011 at 10:44 PM, Marcelo Tosatti > >> wrote: > >> > On Thu, Sep 08, 2011 at 06:11:07PM +080

Re: [Qemu-devel] [PATCH 2/3] trace: [ust] Do not use 'm' in event argument names (used by ust macros)

2011-09-20 Thread Lluís Vilanova
Stefan Hajnoczi writes: > On Fri, Sep 16, 2011 at 06:59:38PM +0200, Lluís Vilanova wrote: >> Signed-off-by: Lluís Vilanova >> --- >> trace-events |4 ++-- >> 1 files changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/trace-events b/trace-events >> index 9d1fbbb..b653d70 100644 >> ---

Re: [Qemu-devel] [ltt-dev] [PATCH 2/3] trace: [ust] Do not use 'm' in event argument names (used by ust macros)

2011-09-20 Thread P DUMAS
* Stefan Hajnoczi (stefa...@gmail.com) wrote: > On Fri, Sep 16, 2011 at 06:59:38PM +0200, Lluís Vilanova wrote: > > Signed-off-by: Lluís Vilanova > > --- > > trace-events |4 ++-- > > 1 files changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/trace-events b/trace-events > > index

Re: [Qemu-devel] [PATCH 04/14] qdev: take ownership of id pointer

2011-09-20 Thread Anthony Liguori
On 09/20/2011 01:36 AM, Gerd Hoffmann wrote: On 09/19/11 18:27, Anthony Liguori wrote: On 09/19/2011 02:34 AM, Gerd Hoffmann wrote: FYI: Keeping the pointer to the QemuOpts has one more reason: It will free the QemuOpts on hot-unplug, which is needed to free the id from QemuOpts point of view,

[Qemu-devel] [PATCH v2 0/3] Remove QEMUFile abuse

2011-09-20 Thread Juan Quintela
Hi v2: Make malc happy release O;-) - learn how to use fwrite/fread correctly O:-) - add errno to all error messages - make checkpatch happy. Except for WARNING: space prohibited between function name and open parenthesis '(' Please apply. v1: QEMUFile is intended to be

[Qemu-devel] [PATCH 1/3] wavaudio: Use stdio instead of QEMUFile

2011-09-20 Thread Juan Quintela
QEMUFile * is only intended for migration nowadays. Using it for anything else just adds pain and a layer of buffers for no good reason. Signed-off-by: Juan Quintela CC: malc --- audio/wavaudio.c | 34 -- 1 files changed, 24 insertions(+), 10 deletions(-) d

[Qemu-devel] [PATCH 2/3] wavcapture: Use stdio instead of QEMUFile

2011-09-20 Thread Juan Quintela
QEMUFile * is only intended for migration nowadays. Using it for anything else just adds pain and a layer of buffers for no good reason. Signed-off-by: Juan Quintela CC: malc --- audio/wavcapture.c | 48 ++-- 1 files changed, 34 insertions(+), 14

[Qemu-devel] [PATCH 3/3] ds1225y: Use stdio instead of QEMUFile

2011-09-20 Thread Juan Quintela
QEMUFile * is only intended for migration nowadays. Using it for anything else just adds pain and a layer of buffers for no good reason. Signed-off-by: Juan Quintela --- hw/ds1225y.c | 28 1 files changed, 16 insertions(+), 12 deletions(-) diff --git a/hw/ds1225y

Re: [Qemu-devel] [PATCH 04/14] qdev: take ownership of id pointer

2011-09-20 Thread Gerd Hoffmann
On 09/20/11 15:04, Anthony Liguori wrote: On 09/20/2011 01:36 AM, Gerd Hoffmann wrote: On 09/19/11 18:27, Anthony Liguori wrote: On 09/19/2011 02:34 AM, Gerd Hoffmann wrote: FYI: Keeping the pointer to the QemuOpts has one more reason: It will free the QemuOpts on hot-unplug, which is needed t

[Qemu-devel] [PATCH 3/7] migration: Check that migration is active before cancel it

2011-09-20 Thread Juan Quintela
Signed-off-by: Juan Quintela --- migration.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/migration.c b/migration.c index 15d001e..c56d29c 100644 --- a/migration.c +++ b/migration.c @@ -132,9 +132,9 @@ int do_migrate_cancel(Monitor *mon, const QDict *qdict, QObject

[Qemu-devel] [PATCH 0/7] Handle errors during migration

2011-09-20 Thread Juan Quintela
Hi This patch series contains error handling for migration. After this series are applied, migrate_cancel after one error don't hang. And we add some error checking left and right. This is the error handling patches that were on the middle of my migration-cleanup of some months ago. migration_

Re: [Qemu-devel] [PATCH] ahci: add port I/O index-data pair

2011-09-20 Thread Kevin Wolf
Am 28.08.2011 20:48, schrieb Alexander Graf: > > On 27.08.2011, at 04:12, Daniel Verkamp wrote: > >> Implement an I/O space index-data register pair as defined by the AHCI >> spec, including the corresponding SATA PCI capability and BAR. >> >> This allows real-mode code to access the AHCI registe

[Qemu-devel] [PATCH 1/7] migration: simplify state assignmente

2011-09-20 Thread Juan Quintela
Once there, make sure that if we already know that there is one error, just call migration_fd_cleanup() with the ERROR state. Signed-off-by: Juan Quintela --- migration.c | 11 +-- 1 files changed, 5 insertions(+), 6 deletions(-) diff --git a/migration.c b/migration.c index f5959b4..9

[Qemu-devel] [PATCH 2/7] migration: only flush when there are no errors

2011-09-20 Thread Juan Quintela
If we have one error while migrating, and then we issuse a "migrate_cancel" command, guest hang. Fix it for flushing only when migration is in MIG_STATE_ACTIVE. In case of error of cancellation, don't flush. We had an infinite loop at buffered_close() while (!s->has_error && s->buffer_s

Re: [Qemu-devel] Memory API code review

2011-09-20 Thread Anthony Liguori
On 09/14/2011 10:07 AM, Avi Kivity wrote: I would like to carry out an online code review of the memory API so that more people are familiar with the internals, and perhaps even to catch some bugs or deficiency. I'd like to use the next kvm conference call slot for this (Tuesday 1400 UTC) since m

[Qemu-devel] [PATCH 7/7] migration: qemu_savevm_iterate has three return values

2011-09-20 Thread Juan Quintela
We were retrying when there was one error, entering a loop. Signed-off-by: Juan Quintela --- migration.c |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/migration.c b/migration.c index 7f8928a..0baed23 100644 --- a/migration.c +++ b/migration.c @@ -362,6 +362,7 @@ v

Re: [Qemu-devel] [PATCH 04/14] qdev: take ownership of id pointer

2011-09-20 Thread Anthony Liguori
On 09/20/2011 08:21 AM, Gerd Hoffmann wrote: On 09/20/11 15:04, Anthony Liguori wrote: On 09/20/2011 01:36 AM, Gerd Hoffmann wrote: On 09/19/11 18:27, Anthony Liguori wrote: On 09/19/2011 02:34 AM, Gerd Hoffmann wrote: FYI: Keeping the pointer to the QemuOpts has one more reason: It will free

[Qemu-devel] [PATCH 6/7] migration: If there is one error, it makes no sense to continue

2011-09-20 Thread Juan Quintela
Signed-off-by: Juan Quintela --- buffered_file.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/buffered_file.c b/buffered_file.c index 5ba3d19..10d14f9 100644 --- a/buffered_file.c +++ b/buffered_file.c @@ -197,7 +197,7 @@ static int buffered_rate_limit(void *opaque)

Re: [Qemu-devel] [PATCH 2/3] wavcapture: Use stdio instead of QEMUFile

2011-09-20 Thread malc
On Tue, 20 Sep 2011, Juan Quintela wrote: > QEMUFile * is only intended for migration nowadays. Using it for > anything else just adds pain and a layer of buffers for no good > reason. I've commited two wav patches with some stylistic and changes. [..snip..] -- mailto:av1...@comtv.ru

Re: [Qemu-devel] [PATCH] ahci: add port I/O index-data pair

2011-09-20 Thread Alexander Graf
On 09/20/2011 03:39 PM, Kevin Wolf wrote: Am 28.08.2011 20:48, schrieb Alexander Graf: On 27.08.2011, at 04:12, Daniel Verkamp wrote: Implement an I/O space index-data register pair as defined by the AHCI spec, including the corresponding SATA PCI capability and BAR. This allows real-mode cod

[Qemu-devel] [PATCH 4/7] savevm: avoid qemu_savevm_state_iterate() to return 1 when qemu file has error.

2011-09-20 Thread Juan Quintela
From: Yoshiaki Tamura When qemu on the receiver gets killed during live migration, if debug is turned on, migrate_fd_put_ready() says, migration: done iterating and proceeds. The reason was qemu_savevm_state_iterate() returning 1 even when qemu file has error. This patch checks qemu_file_has_

[Qemu-devel] [PATCH 5/7] migration: add error handling to migrate_fd_put_notify().

2011-09-20 Thread Juan Quintela
From: Yoshiaki Tamura Although migrate_fd_put_buffer() sets MIG_STATE_ERROR if it failed, since migrate_fd_put_notify() isn't checking error of underlying QEMUFile, those resources are kept open. This patch checks it and calls migrate_fd_error() in case of error. Signed-off-by: Yoshiaki Tamura

Re: [Qemu-devel] [PATCH 04/14] qdev: take ownership of id pointer

2011-09-20 Thread Gerd Hoffmann
Hi, Oh, and not releasing the QemuOpts would also leak memory on each hot-unplug. If you look at my patch, opts is freed at the end of device_add so there is no leak. Ah, ok. Missed that. cheers, Gerd

[Qemu-devel] [PATCH v3 00/23] Refactor and cleanup migration code

2011-09-20 Thread Juan Quintela
Hi this patch applies on top of my previous "migration error" patches. All error handling has been moved to that series, except for "propagate error correctly", without this refactoring, it is quite complicated to apply it. Please, review. Later, Juan. v3: - mor

[Qemu-devel] [PATCH 06/23] migration: Make all posible migration functions static

2011-09-20 Thread Juan Quintela
I have to move two functions postions to avoid forward declarations Signed-off-by: Juan Quintela --- migration.c | 72 +- migration.h | 12 - 2 files changed, 36 insertions(+), 48 deletions(-) diff --git a/migration.c b/migrati

[Qemu-devel] [PATCH 15/23] migration: use global variable directly

2011-09-20 Thread Juan Quintela
We are setting a pointer to a local variable in the previous line, just use the global variable directly. We remove the ->file test because it is already done inside qemu_file_set_rate_limit() function. Signed-off-by: Juan Quintela --- migration.c |6 ++ 1 files changed, 2 insertions(+)

[Qemu-devel] [PATCH 18/23] migration: Use bandwidth_limit directly

2011-09-20 Thread Juan Quintela
Now that current_migration is static, there is no reason for max_throotle variable. Signed-off-by: Juan Quintela --- migration.c | 15 +++ 1 files changed, 7 insertions(+), 8 deletions(-) diff --git a/migration.c b/migration.c index 57cb1f8..b8632e5 100644 --- a/migration.c +++ b/

[Qemu-devel] [PATCH 17/23] migration: make sure we always have a migration state

2011-09-20 Thread Juan Quintela
This cleans up a lot the code as we don't have to check anymore if the variable is NULL or not. We don't make it static, because when we integrate fault tolerance, we can have several migrations at once. Signed-off-by: Juan Quintela --- migration.c | 126 +--

[Qemu-devel] [PATCH 19/23] migration: Export a function that tells if the migration has finished correctly

2011-09-20 Thread Juan Quintela
This will allows us to hide the status values. Signed-off-by: Juan Quintela --- migration.c |4 ++-- migration.h |2 +- ui/spice-core.c |4 +--- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/migration.c b/migration.c index b8632e5..fb95e14 100644 --- a/migrat

Re: [Qemu-devel] [ltt-dev] [PATCH 2/3] trace: [ust] Do not use 'm' in event argument names (used by ust macros)

2011-09-20 Thread Mathieu Desnoyers
* Stefan Hajnoczi (stefa...@gmail.com) wrote: > On Fri, Sep 16, 2011 at 06:59:38PM +0200, Lluís Vilanova wrote: > > Signed-off-by: Lluís Vilanova > > --- > > trace-events |4 ++-- > > 1 files changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/trace-events b/trace-events > > index

Re: [Qemu-devel] [PATCH 2/7] migration: only flush when there are no errors

2011-09-20 Thread Daniel P. Berrange
On Tue, Sep 20, 2011 at 03:24:41PM +0200, Juan Quintela wrote: > If we have one error while migrating, and then we issuse a > "migrate_cancel" command, guest hang. Fix it for flushing only when > migration is in MIG_STATE_ACTIVE. In case of error of cancellation, > don't flush. > > We had an inf

[Qemu-devel] qxl: pthread_yield on QXL_IO_NOTIFY_OOM

2011-09-20 Thread Jan Kiszka
Hi Gerd, can you (or anyone familiar with those bits) comment on pthread_yield() in ioport_write() of hw/qxl.c? Which threads are supposed to run this way? Can't this relation be expressed explicitly? If not, can we use a sleep here (how long?)? The background is that yielding easily breaks into

Re: [Qemu-devel] [ltt-dev] [PATCH 2/3] trace: [ust] Do not use 'm' in event argument names (used by ust macros)

2011-09-20 Thread Mathieu Desnoyers
* Lluís Vilanova (vilan...@ac.upc.edu) wrote: > Stefan Hajnoczi writes: > > > On Fri, Sep 16, 2011 at 06:59:38PM +0200, Lluís Vilanova wrote: > >> Signed-off-by: Lluís Vilanova > >> --- > >> trace-events |4 ++-- > >> 1 files changed, 2 insertions(+), 2 deletions(-) > >> > >> diff --git a/tra

[Qemu-devel] [PATCH 05/23] migration: Refactor MigrationState creation

2011-09-20 Thread Juan Quintela
Signed-off-by: Juan Quintela --- migration-exec.c | 16 +--- migration-fd.c | 16 +--- migration-tcp.c | 15 +-- migration-unix.c | 15 +-- migration.c | 29 + migration.h | 11 +++ 6 file

[Qemu-devel] [PATCH 08/23] migration: Introduce MIG_STATE_NONE

2011-09-20 Thread Juan Quintela
Use MIG_STATE_ACTIVE only when migration has really started Signed-off-by: Juan Quintela --- migration.c |6 +- migration.h | 11 +++ 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/migration.c b/migration.c index 1d7a488..59e8f06 100644 --- a/migration.c +++ b/

Re: [Qemu-devel] [ltt-dev] [PATCH 2/3] trace: [ust] Do not use 'm' in event argument names (used by ust macros)

2011-09-20 Thread Stefan Hajnoczi
2011/9/20 Mathieu Desnoyers : > * Lluís Vilanova (vilan...@ac.upc.edu) wrote: >> Stefan Hajnoczi writes: >> >> > On Fri, Sep 16, 2011 at 06:59:38PM +0200, Lluís Vilanova wrote: >> >> Signed-off-by: Lluís Vilanova >> >> --- >> >> trace-events |    4 ++-- >> >> 1 files changed, 2 insertions(+), 2 de

[Qemu-devel] [PATCH 11/23] migration: Our release callback was just free

2011-09-20 Thread Juan Quintela
We called it from a single place, and always with state != MIG_STATE_ACTIVE. Just remove the whole callback. For users of the notifier, notice that this is exactly the case where they don't care, we are just freeing the state from previous failed migration (it can't be a sucessful one, otherwise

Re: [Qemu-devel] [PATCH 2/7] migration: only flush when there are no errors

2011-09-20 Thread Juan Quintela
"Daniel P. Berrange" wrote: > On Tue, Sep 20, 2011 at 03:24:41PM +0200, Juan Quintela wrote: >> If we have one error while migrating, and then we issuse a >> "migrate_cancel" command, guest hang. Fix it for flushing only when >> migration is in MIG_STATE_ACTIVE. In case of error of cancellation,

Re: [Qemu-devel] qxl: pthread_yield on QXL_IO_NOTIFY_OOM

2011-09-20 Thread Gerd Hoffmann
On 09/20/11 16:27, Jan Kiszka wrote: Hi Gerd, can you (or anyone familiar with those bits) comment on pthread_yield() in ioport_write() of hw/qxl.c? Which threads are supposed to run this way? spice server thread. Can't this relation be expressed explicitly? The thread is created by libsp

[Qemu-devel] [PATCH 09/23] migration: Refactor and simplify error checking in migrate_fd_put_ready

2011-09-20 Thread Juan Quintela
Signed-off-by: Juan Quintela --- migration.c | 19 +-- 1 files changed, 9 insertions(+), 10 deletions(-) diff --git a/migration.c b/migration.c index 59e8f06..9d877a0 100644 --- a/migration.c +++ b/migration.c @@ -368,22 +368,21 @@ static void migrate_fd_put_ready(void *opaque

[Qemu-devel] [PATCH 12/23] migration: Remove get_status() accessor

2011-09-20 Thread Juan Quintela
It is only used inside migration.c, and fields on that struct are accessed all around the place on that file. Signed-off-by: Juan Quintela --- migration.c | 16 +--- migration.h |1 - 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/migration.c b/migration.c inde

Re: [Qemu-devel] qxl: pthread_yield on QXL_IO_NOTIFY_OOM

2011-09-20 Thread Jan Kiszka
On 2011-09-20 16:48, Gerd Hoffmann wrote: > On 09/20/11 16:27, Jan Kiszka wrote: >> Hi Gerd, >> >> can you (or anyone familiar with those bits) comment on pthread_yield() >> in ioport_write() of hw/qxl.c? Which threads are supposed to run this >> way? > > spice server thread. > >> Can't this rel

[Qemu-devel] [PATCH 02/23] migration: Use FdMigrationState instead of MigrationState when possible

2011-09-20 Thread Juan Quintela
Signed-off-by: Juan Quintela --- migration.c | 34 -- migration.h | 16 2 files changed, 24 insertions(+), 26 deletions(-) diff --git a/migration.c b/migration.c index 1a5e25f..007b162 100644 --- a/migration.c +++ b/migration.c @@ -34,7 +34,7

[Qemu-devel] [PATCH 13/23] migration: Remove migration cancel() callback

2011-09-20 Thread Juan Quintela
It is used only in one place Signed-off-by: Juan Quintela --- migration.c |9 - migration.h |1 - 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/migration.c b/migration.c index d63150e..306ac4e 100644 --- a/migration.c +++ b/migration.c @@ -132,12 +132,12 @@ free_

  1   2   >