Re: [Qemu-devel] Stop using which in ./configure

2010-01-20 Thread Loïc Minier
On Tue, Jan 19, 2010, Stefan Weil wrote: I did not test the whole patch, but I think this would be better: +type $local_command /dev/null 21 Attaching an updated patch Thanks -- Loïc Minier From 1c0b63fb9fc735a6d367a65a6ed1b998942fb6a4 Mon Sep 17 00:00:00 2001 From:

Re: [Qemu-devel] [PATCH 07/10] qcow2: Improve error handling in update_refcount

2010-01-20 Thread Kevin Wolf
Am 19.01.2010 19:51, schrieb Christoph Hellwig: On Mon, Jan 18, 2010 at 01:11:33PM +0100, Kevin Wolf wrote: If update_refcount fails, try to undo any changes made so far to avoid inconsistencies in the image file. Signed-off-by: Kevin Wolf kw...@redhat.com --- block/qcow2-refcount.c | 32

Re: [Qemu-devel] [PATCH 08/10] qcow2: Allow updating no refcounts

2010-01-20 Thread Kevin Wolf
Am 19.01.2010 19:53, schrieb Christoph Hellwig: #endif -if (length = 0) +if (length 0) { return -EINVAL; +} + start = offset ~(s-cluster_size - 1); last = (offset + length - 1) ~(s-cluster_size - 1); for(cluster_offset = start; cluster_offset =

Re: [Qemu-devel] [PATCH 10/10] qcow2: Don't ignore qcow2_alloc_clusters return value

2010-01-20 Thread Kevin Wolf
Am 19.01.2010 19:58, schrieb Christoph Hellwig: On Mon, Jan 18, 2010 at 01:11:36PM +0100, Kevin Wolf wrote: @@ -55,6 +55,9 @@ int qcow2_grow_l1_table(BlockDriverState *bs, int min_size) /* write new table (align to cluster) */ new_l1_table_offset = qcow2_alloc_clusters(bs,

Re: [Qemu-devel] Re: [PATCH 07/17] block/vvfat.c: fix warnings with _FORTIFY_SOURCE

2010-01-20 Thread Daniel P. Berrange
On Wed, Jan 20, 2010 at 08:19:26AM +0200, Kirill A. Shutemov wrote: On Wed, Jan 20, 2010 at 1:56 AM, Juan Quintela quint...@redhat.com wrote: From: Kirill A. Shutemov kir...@shutemov.name CC    block/vvfat.o cc1: warnings being treated as errors block/vvfat.c: In function

Re: [Qemu-devel] Re: [PATCH v2 2/4] Clean-up a little bit the RW related bits of BDRV_O_FLAGS. BDRV_O_RDONLY gone (and so is BDRV_O_ACCESS). Default value for bdrv_flags (0/zero) is READ-ONLY. Need to

2010-01-20 Thread Michael S. Tsirkin
On Wed, Jan 20, 2010 at 08:26:56AM +0100, Markus Armbruster wrote: Jamie Lokier ja...@shareable.org writes: Michael S. Tsirkin wrote: On Mon, Jan 18, 2010 at 11:34:59AM +0100, Markus Armbruster wrote: BDRV_O_RDWR is a flag, just like BDRV_SNAPSHOT. We don't have BDRV_DONT_SNAPSHOT,

Re: [Qemu-devel] Re: [PATCH 07/17] block/vvfat.c: fix warnings with _FORTIFY_SOURCE

2010-01-20 Thread Kirill A. Shutemov
On Wed, Jan 20, 2010 at 12:33 PM, Daniel P. Berrange berra...@redhat.com wrote: On Wed, Jan 20, 2010 at 08:19:26AM +0200, Kirill A. Shutemov wrote: On Wed, Jan 20, 2010 at 1:56 AM, Juan Quintela quint...@redhat.com wrote: From: Kirill A. Shutemov kir...@shutemov.name CC    block/vvfat.o

Re: [Qemu-devel] Re: Stop using which in ./configure

2010-01-20 Thread Loïc Minier
On Tue, Jan 19, 2010, Måns Rullgård wrote: [...] Why the extra variable? Using $1 directly seems just as obvious to me. [...] I'm attaching an updated patch which doesn't use this variable. Should be applied after the sdl-config patch. Is the full path of these tools really important?

Re: [Qemu-devel] [PATCH] block: prevent multiwrite_merge from creating too large iovecs

2010-01-20 Thread Kevin Wolf
Am 19.01.2010 22:15, schrieb Christoph Hellwig: If we go over the maximum number of iovecs support by syscall we get back EINVAL from the kernel which translate to I/O errors for the guest. Signed-off-by: Christoph Hellwig h...@lst.de Is this really enough? We don't check for IOV_MAX in any

Re: [Qemu-devel] Re: [PATCH 07/17] block/vvfat.c: fix warnings with _FORTIFY_SOURCE

2010-01-20 Thread Kevin Wolf
Am 20.01.2010 12:09, schrieb Kirill A. Shutemov: On Wed, Jan 20, 2010 at 12:33 PM, Daniel P. Berrange berra...@redhat.com wrote: On Wed, Jan 20, 2010 at 08:19:26AM +0200, Kirill A. Shutemov wrote: On Wed, Jan 20, 2010 at 1:56 AM, Juan Quintela quint...@redhat.com wrote: From: Kirill A.

[Qemu-devel] [PATCH v2 3/6] monitor: convert do_memory_save() to QError

2010-01-20 Thread Markus Armbruster
Signed-off-by: Markus Armbruster arm...@redhat.com --- monitor.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/monitor.c b/monitor.c index c22901f..e63d0a7 100644 --- a/monitor.c +++ b/monitor.c @@ -1317,7 +1317,7 @@ static void do_memory_save(Monitor *mon, const

[Qemu-devel] [PATCH v2 1/6] monitor: Don't check for mon_get_cpu() failure

2010-01-20 Thread Markus Armbruster
mon_get_cpu() can't return null pointer, because it passes its return value to cpu_synchronize_state() first, which crashes if its argument is null. Remove the (pretty cheesy) handling of this non-existing error. Signed-off-by: Markus Armbruster arm...@redhat.com --- monitor.c | 39

[Qemu-devel] [PATCH v2 5/6] QError: New QERR_INVALID_CPU_INDEX

2010-01-20 Thread Markus Armbruster
Signed-off-by: Markus Armbruster arm...@redhat.com --- qerror.c |4 qerror.h |3 +++ 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/qerror.c b/qerror.c index 2f657f4..6c2aba0 100644 --- a/qerror.c +++ b/qerror.c @@ -81,6 +81,10 @@ static const QErrorStringTable

[Qemu-devel] [PATCH v2 0/6] Convert memsave, pmemsave, cpu to QObject+QError

2010-01-20 Thread Markus Armbruster
First patch is cleanup to get rid of an error that can't happen. Rest are straightforward conversions. v2: Renames suggested by Luiz, typo fixed, rebased Markus Armbruster (6): monitor: Don't check for mon_get_cpu() failure QError: New QERR_OPEN_FILE_FAILED monitor: convert

[Qemu-devel] [PATCH v2 4/6] monitor: convert do_physical_memory_save() to QError

2010-01-20 Thread Markus Armbruster
Signed-off-by: Markus Armbruster arm...@redhat.com --- monitor.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/monitor.c b/monitor.c index e63d0a7..816f6fd 100644 --- a/monitor.c +++ b/monitor.c @@ -1344,7 +1344,7 @@ static void do_physical_memory_save(Monitor *mon,

[Qemu-devel] [PATCH v2 2/6] QError: New QERR_OPEN_FILE_FAILED

2010-01-20 Thread Markus Armbruster
Signed-off-by: Markus Armbruster arm...@redhat.com --- qerror.c |4 qerror.h |3 +++ 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/qerror.c b/qerror.c index 5f8fc5d..2f657f4 100644 --- a/qerror.c +++ b/qerror.c @@ -73,6 +73,10 @@ static const QErrorStringTable

Re: [Qemu-devel] Re: [PATCH v2 2/4] Clean-up a little bit the RW related bits of BDRV_O_FLAGS. BDRV_O_RDONLY gone (and so is BDRV_O_ACCESS). Default value for bdrv_flags (0/zero) is READ-ONLY. Need to

2010-01-20 Thread Markus Armbruster
Michael S. Tsirkin m...@redhat.com writes: On Wed, Jan 20, 2010 at 08:26:56AM +0100, Markus Armbruster wrote: Jamie Lokier ja...@shareable.org writes: Michael S. Tsirkin wrote: On Mon, Jan 18, 2010 at 11:34:59AM +0100, Markus Armbruster wrote: BDRV_O_RDWR is a flag, just like

Re: [Qemu-devel] Re: [PATCH 07/17] block/vvfat.c: fix warnings with _FORTIFY_SOURCE

2010-01-20 Thread Markus Armbruster
Kevin Wolf kw...@redhat.com writes: Am 20.01.2010 12:09, schrieb Kirill A. Shutemov: On Wed, Jan 20, 2010 at 12:33 PM, Daniel P. Berrange berra...@redhat.com wrote: On Wed, Jan 20, 2010 at 08:19:26AM +0200, Kirill A. Shutemov wrote: On Wed, Jan 20, 2010 at 1:56 AM, Juan Quintela

[Qemu-devel] Re: Stop using which in ./configure

2010-01-20 Thread Paolo Bonzini
On 01/20/2010 12:37 PM, Loïc Minier wrote: +# not found +IFS=$local_ifs If you do this, you should set IFS to space-tab-lf at the beginning of the script, like this: IFS= or this (better because it does not rely on embedding whitespace characters within the line): IFS=`printf

Re: [Qemu-devel] Re: [PATCH v2 2/4] Clean-up a little bit the RW related bits of BDRV_O_FLAGS. BDRV_O_RDONLY gone (and so is BDRV_O_ACCESS). Default value for bdrv_flags (0/zero) is READ-ONLY. Need to

2010-01-20 Thread Michael S. Tsirkin
On Wed, Jan 20, 2010 at 01:09:29PM +0100, Markus Armbruster wrote: Michael S. Tsirkin m...@redhat.com writes: On Wed, Jan 20, 2010 at 08:26:56AM +0100, Markus Armbruster wrote: Jamie Lokier ja...@shareable.org writes: Michael S. Tsirkin wrote: On Mon, Jan 18, 2010 at 11:34:59AM

Re: [Qemu-devel] Re: [PATCH 07/17] block/vvfat.c: fix warnings with _FORTIFY_SOURCE

2010-01-20 Thread Kirill A. Shutemov
On Wed, Jan 20, 2010 at 2:15 PM, Markus Armbruster arm...@redhat.com wrote: Kevin Wolf kw...@redhat.com writes: Am 20.01.2010 12:09, schrieb Kirill A. Shutemov: On Wed, Jan 20, 2010 at 12:33 PM, Daniel P. Berrange berra...@redhat.com wrote: On Wed, Jan 20, 2010 at 08:19:26AM +0200, Kirill A.

[Qemu-devel] [PATCH] QMP: Fix asynchronous events delivery

2010-01-20 Thread Luiz Capitulino
Commit f039a563f200beee80cc10fd70b21ea396979dab introduces a regression as monitor_protocol_event() will return in the first user Monitor it finds in the QLIST_FOREACH() loop. The right thing to do is to only delivery an asynchronous event if the 'mon' is a QMP Monitor. The aforementioned

[Qemu-devel] Re: Stop using which in ./configure

2010-01-20 Thread Juan Quintela
Loïc Minier l...@dooz.org wrote: On Tue, Jan 19, 2010, Måns Rullgård wrote: [...] Why the extra variable? Using $1 directly seems just as obvious to me. [...] I'm attaching an updated patch which doesn't use this variable. Should be applied after the sdl-config patch. Is the full path

Re: [Qemu-devel] Re: [PATCH 07/17] block/vvfat.c: fix warnings with _FORTIFY_SOURCE

2010-01-20 Thread Markus Armbruster
Kirill A. Shutemov kir...@shutemov.name writes: On Wed, Jan 20, 2010 at 2:15 PM, Markus Armbruster arm...@redhat.com wrote: Kevin Wolf kw...@redhat.com writes: Am 20.01.2010 12:09, schrieb Kirill A. Shutemov: On Wed, Jan 20, 2010 at 12:33 PM, Daniel P. Berrange berra...@redhat.com wrote:

Re: [Qemu-devel] Re: [PATCH v2 2/4] Clean-up a little bit the RW related bits of BDRV_O_FLAGS. BDRV_O_RDONLY gone (and so is BDRV_O_ACCESS). Default value for bdrv_flags (0/zero) is READ-ONLY. Need to

2010-01-20 Thread Markus Armbruster
Michael S. Tsirkin m...@redhat.com writes: On Wed, Jan 20, 2010 at 01:09:29PM +0100, Markus Armbruster wrote: Michael S. Tsirkin m...@redhat.com writes: On Wed, Jan 20, 2010 at 08:26:56AM +0100, Markus Armbruster wrote: Jamie Lokier ja...@shareable.org writes: Michael S. Tsirkin

[Qemu-devel] Re: Stop using which in ./configure

2010-01-20 Thread Paolo Bonzini
On 01/20/2010 01:49 PM, Juan Quintela wrote: + if prog_exist awk -a \ + prog_exist grep; then + if prog_exist texi2html -a \ + prog_exist pod2man ; then -a is wrong here. BTW, it's evil for test too because its precedence rules WRT ! and -f/-n/-z/-x/etc. are broken.

Re: [Qemu-devel] [PATCH v2 0/6] Convert memsave, pmemsave, cpu to QObject+QError

2010-01-20 Thread Luiz Capitulino
On Wed, 20 Jan 2010 13:07:29 +0100 Markus Armbruster arm...@redhat.com wrote: First patch is cleanup to get rid of an error that can't happen. Rest are straightforward conversions. Looks good to me.

Re: [Qemu-devel] Re: [PATCH v2 2/4] Clean-up a little bit the RW related bits of BDRV_O_FLAGS. BDRV_O_RDONLY gone (and so is BDRV_O_ACCESS). Default value for bdrv_flags (0/zero) is READ-ONLY. Need to

2010-01-20 Thread Jamie Lokier
Michael S. Tsirkin wrote: On Wed, Jan 20, 2010 at 08:26:56AM +0100, Markus Armbruster wrote: Jamie Lokier ja...@shareable.org writes: Michael S. Tsirkin wrote: On Mon, Jan 18, 2010 at 11:34:59AM +0100, Markus Armbruster wrote: BDRV_O_RDWR is a flag, just like BDRV_SNAPSHOT. We

[Qemu-devel] [PATCH][rtc hack]: reduce number of reinjects on ACK

2010-01-20 Thread Gleb Natapov
Windows 7 BSODs under load with HAL_RTC_IRQF_WILL_NOT_CLEAR error. It happens here: hal!HalpRtcUnmaskClock: 8281b93a 8bffmov edi,edi 8281b93c 56 pushesi 8281b93d 33f6xor esi,esi 8281b93f 6a0cpush0Ch 8281b941 e8b2ff call

[Qemu-devel] [PATCH 1/3] net: Make inet_strfamily() public

2010-01-20 Thread Luiz Capitulino
So that it can be used by other subsystems. Signed-off-by: Luiz Capitulino lcapitul...@redhat.com --- qemu-sockets.c |2 +- qemu_socket.h |1 + 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/qemu-sockets.c b/qemu-sockets.c index 8850516..720de22 100644 ---

[Qemu-devel] [PATCH 0/3]: Small VNC related cleanup

2010-01-20 Thread Luiz Capitulino
This series makes VNC events code use inet_strfamily() from qemu-socket instead of duplicating code, as suggested by Gerd. Thanks.

[Qemu-devel] [PATCH 2/3] net: inet_strfamily(): Better unknown family report

2010-01-20 Thread Luiz Capitulino
Returning is a bit meaningless, let's call it unknown. Signed-off-by: Luiz Capitulino lcapitul...@redhat.com --- qemu-sockets.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/qemu-sockets.c b/qemu-sockets.c index 720de22..d912fed 100644 --- a/qemu-sockets.c +++

[Qemu-devel] [PATCH 3/3] vnc: Use inet_strfamily()

2010-01-20 Thread Luiz Capitulino
Signed-off-by: Luiz Capitulino lcapitul...@redhat.com --- vnc.c | 22 +- 1 files changed, 1 insertions(+), 21 deletions(-) diff --git a/vnc.c b/vnc.c index c7d6652..cc2a26e 100644 --- a/vnc.c +++ b/vnc.c @@ -100,26 +100,6 @@ char *vnc_socket_remote_addr(const char *format,

Re: [Qemu-devel] Re: Stop using which in ./configure

2010-01-20 Thread Loïc Minier
On Wed, Jan 20, 2010, Paolo Bonzini wrote: On 01/20/2010 12:37 PM, Loïc Minier wrote: +# not found +IFS=$local_ifs If you do this, you should set IFS to space-tab-lf at the beginning of the script, like this: IFS= Are you saying that I can't backup/restore IFS without

Re: [Qemu-devel] Re: [PATCH 07/17] block/vvfat.c: fix warnings with _FORTIFY_SOURCE

2010-01-20 Thread Kirill A. Shutemov
On Wed, Jan 20, 2010 at 3:03 PM, Markus Armbruster arm...@redhat.com wrote: Kirill A. Shutemov kir...@shutemov.name writes: No, compiler can't add anything between. 'char' is always byte-aligned. You got some reading to do then. Do you want to say that it's not true? Could you provide an

Re: [Qemu-devel] Re: Stop using which in ./configure

2010-01-20 Thread Loïc Minier
On Wed, Jan 20, 2010, Juan Quintela wrote: +prog_exist() { +prog=$1 +type $1 /dev/null 2 /dev/null +} You set prog but you use $1; also, it seems vars in functions should be prefixed with local_ in qemu's ./configure. I was told not to use a local var here though. - if test

Re: [Qemu-devel] Re: [PATCH 07/17] block/vvfat.c: fix warnings with _FORTIFY_SOURCE

2010-01-20 Thread Kirill A. Shutemov
2010/1/20 Gleb Natapov g...@redhat.com: On Wed, Jan 20, 2010 at 02:03:04PM +0100, Markus Armbruster wrote: Kirill A. Shutemov kir...@shutemov.name writes: No, compiler can't add anything between. 'char' is always byte-aligned. You got some reading to do then. To be fair this structure is

[Qemu-devel] [PATCH v2 00/10] qcow2 error path fixes

2010-01-20 Thread Kevin Wolf
In qcow2 (and partly also in general block code), error handling doesn't quite do what it should. In some places, errors are silently ignored. In other places, the error code in not passed to the called but rather turned into false, NULL or -EIO. Besides reporting the right error to the user,

[Qemu-devel] [PATCH v2 01/10] qcow2: Fix error handling in qcow2_grow_l1_table

2010-01-20 Thread Kevin Wolf
Return the appropriate error value instead of always using EIO. Don't free the L1 table on errors, we still need it. Signed-off-by: Kevin Wolf kw...@redhat.com --- block/qcow2-cluster.c | 10 ++ 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/block/qcow2-cluster.c

[Qemu-devel] [PATCH v2 02/10] qcow2: Fix error handling in qcow_save_vmstate

2010-01-20 Thread Kevin Wolf
Don't assume success but pass the bdrv_pwrite return value on. Signed-off-by: Kevin Wolf kw...@redhat.com --- block/qcow2.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index 6622eba..e06f4dd 100644 --- a/block/qcow2.c +++

[Qemu-devel] [PATCH v2 03/10] qcow2: Return 0/-errno in get_cluster_table

2010-01-20 Thread Kevin Wolf
Switching to 0/-errno allows it to distinguish different error cases. Signed-off-by: Kevin Wolf kw...@redhat.com --- block/qcow2-cluster.c | 30 ++ 1 files changed, 18 insertions(+), 12 deletions(-) diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c index

[Qemu-devel] [PATCH v2 06/10] qcow2: Fix error handling in grow_refcount_table

2010-01-20 Thread Kevin Wolf
Return the appropriate error code instead of -EIO. Signed-off-by: Kevin Wolf kw...@redhat.com --- block/qcow2-refcount.c |9 ++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c index 3a2d44a..6f449c6 100644 ---

[Qemu-devel] [PATCH v2 05/10] block: Return original error codes in bdrv_pread/write

2010-01-20 Thread Kevin Wolf
Don't assume -EIO but return the real error. Signed-off-by: Kevin Wolf kw...@redhat.com --- block.c | 34 ++ 1 files changed, 18 insertions(+), 16 deletions(-) diff --git a/block.c b/block.c index 115e591..a4c4953 100644 --- a/block.c +++ b/block.c @@ -717,6

[Qemu-devel] [PATCH v2 07/10] qcow2: Improve error handling in update_refcount

2010-01-20 Thread Kevin Wolf
If update_refcount fails, try to undo any changes made so far to avoid inconsistencies in the image file. Signed-off-by: Kevin Wolf kw...@redhat.com --- block/qcow2-refcount.c | 32 +--- 1 files changed, 25 insertions(+), 7 deletions(-) diff --git

[Qemu-devel] [PATCH v2 08/10] qcow2: Allow updating no refcounts

2010-01-20 Thread Kevin Wolf
There's absolutely no problem with updating the refcounts of 0 clusters. At least snapshot code is doing this and would fail once the result of update_refcount isn't ignored any more. Signed-off-by: Kevin Wolf kw...@redhat.com --- block/qcow2-refcount.c |6 +- 1 files changed, 5

[Qemu-devel] [PATCH v2 09/10] qcow2: Don't ignore update_refcount return value

2010-01-20 Thread Kevin Wolf
update_refcount can return errors that need to be handled by the callers. Signed-off-by: Kevin Wolf kw...@redhat.com --- block/qcow2-refcount.c | 31 +++ 1 files changed, 23 insertions(+), 8 deletions(-) diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c

[Qemu-devel] [PATCH v2 10/10] qcow2: Don't ignore qcow2_alloc_clusters return value

2010-01-20 Thread Kevin Wolf
Now that qcow2_alloc_clusters can return error codes, we must handle them in the callers of qcow2_alloc_clusters. Signed-off-by: Kevin Wolf kw...@redhat.com --- block/qcow2-cluster.c | 19 +-- block/qcow2-refcount.c |6 ++ block/qcow2-snapshot.c | 11 ++- 3

Re: [Qemu-devel] Re: Stop using which in ./configure

2010-01-20 Thread Loïc Minier
On Wed, Jan 20, 2010, Loïc Minier wrote: I'm attaching a new patch which changes the tests a bit; I would prefer if someone with access to a Solaris build environment would do this though. Sorry, there was a typo in the new patch, a test was reversed; updated patch attached. -- Loïc

Re: [Qemu-devel] Re: [PATCH 07/17] block/vvfat.c: fix warnings with _FORTIFY_SOURCE

2010-01-20 Thread Gleb Natapov
On Wed, Jan 20, 2010 at 04:02:19PM +0200, Kirill A. Shutemov wrote: 2010/1/20 Gleb Natapov g...@redhat.com: On Wed, Jan 20, 2010 at 02:03:04PM +0100, Markus Armbruster wrote: Kirill A. Shutemov kir...@shutemov.name writes: No, compiler can't add anything between. 'char' is always

[Qemu-devel] Re: Stop using which in ./configure

2010-01-20 Thread Paolo Bonzini
On 01/20/2010 02:49 PM, Loïc Minier wrote: On Wed, Jan 20, 2010, Paolo Bonzini wrote: On 01/20/2010 12:37 PM, Loïc Minier wrote: +# not found +IFS=$local_ifs If you do this, you should set IFS to space-tab-lf at the beginning of the script, like this: IFS= Are you saying that

[Qemu-devel] Re: [PATCH] QMP: Fix asynchronous events delivery

2010-01-20 Thread Adam Litke
On Wed, 2010-01-20 at 10:37 -0200, Luiz Capitulino wrote: Commit f039a563f200beee80cc10fd70b21ea396979dab introduces a regression as monitor_protocol_event() will return in the first user Monitor it finds in the QLIST_FOREACH() loop. The right thing to do is to only delivery an asynchronous

Re: [Qemu-devel] [PATCH] Add definitions for current cpu models..

2010-01-20 Thread Anthony Liguori
On 01/19/2010 06:15 PM, Chris Wright wrote: * Anthony Liguori (anth...@codemonkey.ws) wrote: On 01/19/2010 02:03 PM, Chris Wright wrote: * Anthony Liguori (anth...@codemonkey.ws) wrote: I'm very much against having -cpu Nehalem. The whole point of this is to make things

Re: [Qemu-devel] [PATCH] Add definitions for current cpu models..

2010-01-20 Thread Gleb Natapov
On Wed, Jan 20, 2010 at 08:21:44AM -0600, Anthony Liguori wrote: On 01/19/2010 06:15 PM, Chris Wright wrote: * Anthony Liguori (anth...@codemonkey.ws) wrote: On 01/19/2010 02:03 PM, Chris Wright wrote: * Anthony Liguori (anth...@codemonkey.ws) wrote: I'm very much against having -cpu

Re: [Qemu-devel] Re: [PATCH 07/17] block/vvfat.c: fix warnings with _FORTIFY_SOURCE

2010-01-20 Thread Markus Armbruster
[Some quoted material restored] Kirill A. Shutemov kir...@shutemov.name writes: On Wed, Jan 20, 2010 at 3:03 PM, Markus Armbruster arm...@redhat.com wrote: Kirill A. Shutemov kir...@shutemov.name writes: On Wed, Jan 20, 2010 at 2:15 PM, Markus Armbruster arm...@redhat.com wrote: Kevin Wolf

Re: [Qemu-devel] [PATCH] Documentation: Add missing documentation for qdev related command line options

2010-01-20 Thread Anthony Liguori
On 01/16/2010 11:19 AM, Stefan Weil wrote: The command line options -device, -nodefaults, -readconfig, -writeconfig had entries for command line help, but documentation for texi and derived formats (man, html, info) was missing. This also required moving @end table to the end of qemu-options.hx

Re: [Qemu-devel] [PATCH v2 1/4] Make CDROM a read-only drive

2010-01-20 Thread Anthony Liguori
On 01/17/2010 08:48 AM, Naphtali Sprei wrote: Signed-off-by: Naphtali Spreinsp...@redhat.com Applied. Thanks. Regards, Anthony Liguori --- vl.c |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/vl.c b/vl.c index 06cb40d..76ef8ca 100644 --- a/vl.c +++

Re: [Qemu-devel] [PATCH 1/8] virtio: Remove duplicate macro definition for max. virtqueues, bump up the max

2010-01-20 Thread Anthony Liguori
On 01/19/2010 01:06 PM, Amit Shah wrote: VIRTIO_PCI_QUEUE_MAX is redefined in hw/virtio.c. Let's just keep it in hw/virtio.h. Also, bump up the value of the maximum allowed virtqueues to 64. This is in preparation to allow multiple ports per virtio-console device. Signed-off-by: Amit

Re: [Qemu-devel] [PATCH] block: prevent multiwrite_merge from creating too large iovecs

2010-01-20 Thread Anthony Liguori
On 01/19/2010 03:15 PM, Christoph Hellwig wrote: If we go over the maximum number of iovecs support by syscall we get back EINVAL from the kernel which translate to I/O errors for the guest. Signed-off-by: Christoph Hellwigh...@lst.de Applied. Thanks. Regards, Anthony Liguori Index:

Re: [Qemu-devel] [PATCH][rtc hack]: reduce number of reinjects on ACK

2010-01-20 Thread Anthony Liguori
On 01/20/2010 07:37 AM, Gleb Natapov wrote: Windows 7 BSODs under load with HAL_RTC_IRQF_WILL_NOT_CLEAR error. It happens here: hal!HalpRtcUnmaskClock: 8281b93a 8bffmov edi,edi 8281b93c 56 pushesi 8281b93d 33f6xor esi,esi 8281b93f 6a0c

Re: [Qemu-devel] [PATCH 1/3] net: Make inet_strfamily() public

2010-01-20 Thread Anthony Liguori
On 01/20/2010 07:42 AM, Luiz Capitulino wrote: So that it can be used by other subsystems. Signed-off-by: Luiz Capitulinolcapitul...@redhat.com Applied. Thanks. Regards, Anthony Liguori --- qemu-sockets.c |2 +- qemu_socket.h |1 + 2 files changed, 2 insertions(+), 1

Re: [Qemu-devel] [PATCH] QMP: Fix asynchronous events delivery

2010-01-20 Thread Anthony Liguori
On 01/20/2010 06:37 AM, Luiz Capitulino wrote: Commit f039a563f200beee80cc10fd70b21ea396979dab introduces a regression as monitor_protocol_event() will return in the first user Monitor it finds in the QLIST_FOREACH() loop. The right thing to do is to only delivery an asynchronous event if the

Re: [Qemu-devel] [PATCH] block: fix cache flushing in bdrv_commit

2010-01-20 Thread Anthony Liguori
On 01/17/2010 05:32 AM, Christoph Hellwig wrote: On Thu, Jan 14, 2010 at 11:21:15AM +0100, Kevin Wolf wrote: Anthony, you seem to have missed the v2 patch that considered my review comments. Can you please apply the diff between v1 and v2 on top? Here is the differences in patch

Re: [Qemu-devel] Re: [PATCH 07/17] block/vvfat.c: fix warnings with _FORTIFY_SOURCE

2010-01-20 Thread malc
On Wed, 20 Jan 2010, Kirill A. Shutemov wrote: 2010/1/20 Gleb Natapov g...@redhat.com: On Wed, Jan 20, 2010 at 02:03:04PM +0100, Markus Armbruster wrote: Kirill A. Shutemov kir...@shutemov.name writes: No, compiler can't add anything between. 'char' is always byte-aligned. You got

Re: [Qemu-devel] Re: [PATCH 07/17] block/vvfat.c: fix warnings with _FORTIFY_SOURCE

2010-01-20 Thread Anthony Liguori
On 01/20/2010 12:19 AM, Kirill A. Shutemov wrote: On Wed, Jan 20, 2010 at 1:56 AM, Juan Quintelaquint...@redhat.com wrote: From: Kirill A. Shutemovkir...@shutemov.name CCblock/vvfat.o cc1: warnings being treated as errors block/vvfat.c: In function 'commit_one_file':

[Qemu-devel] [PATCH v2 4/8] monitor: Use argument type 'b' for migrate_set_speed()

2010-01-20 Thread Markus Armbruster
Before, it used type 's', which strips quotes and interprets escapes, and is quite inappropriate for QMP. Signed-off-by: Markus Armbruster arm...@redhat.com --- migration.c | 18 +++--- qemu-monitor.hx |2 +- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git

[Qemu-devel] [PATCH v2 3/8] monitor: New argument type 'b'

2010-01-20 Thread Markus Armbruster
This is a double value with optional suffixes G, g, M, m, K, k. We'll need this to get migrate_set_speed() QMP-ready. Signed-off-by: Markus Armbruster arm...@redhat.com --- monitor.c | 58 ++ 1 files changed, 58 insertions(+), 0

[Qemu-devel] [PATCH v2 0/8] Convert migrate_set_speed, migrate_set_downtime to QObject

2010-01-20 Thread Markus Armbruster
These conversions take a few extra steps, because do_migrate_set_speed() and do_migrate_set_downtime() interpret their string argument as floating-point number + optional unit suffix. This is quite inappropriate for QMP. Markus Armbruster (8): monitor: Document argument type 'M' QDict: New

[Qemu-devel] [PATCH v2 2/8] QDict: New qdict_get_double()

2010-01-20 Thread Markus Armbruster
Helper function just like qdict_get_int(), just for QFloat/double. Signed-off-by: Markus Armbruster arm...@redhat.com --- qdict.c | 15 +++ qdict.h |1 + 2 files changed, 16 insertions(+), 0 deletions(-) diff --git a/qdict.c b/qdict.c index ba8eef0..de278b1 100644 ---

[Qemu-devel] [PATCH v2 5/8] monitor: convert do_migrate_set_speed() to QObject

2010-01-20 Thread Markus Armbruster
Signed-off-by: Markus Armbruster arm...@redhat.com --- migration.c |2 +- migration.h |2 +- qemu-monitor.hx |2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/migration.c b/migration.c index 4e7a1ea..e8802ba 100644 --- a/migration.c +++ b/migration.c @@

[Qemu-devel] [PATCH v2 8/8] monitor: convert do_migrate_set_downtime() to QObject

2010-01-20 Thread Markus Armbruster
Signed-off-by: Markus Armbruster arm...@redhat.com --- migration.c |3 ++- migration.h |3 ++- qemu-monitor.hx |2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/migration.c b/migration.c index c7763f6..2dfb4cd 100644 --- a/migration.c +++ b/migration.c @@

[Qemu-devel] [PATCH v2 1/8] monitor: Document argument type 'M'

2010-01-20 Thread Markus Armbruster
Was forgotten in commit b6e098d7. Signed-off-by: Markus Armbruster arm...@redhat.com --- monitor.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/monitor.c b/monitor.c index b9166c3..775fe3f 100644 --- a/monitor.c +++ b/monitor.c @@ -68,6 +68,8 @@ * 's'

[Qemu-devel] [PATCH v2 7/8] monitor: Use argument type 'T' for migrate_set_downtime()

2010-01-20 Thread Markus Armbruster
Before, it used type 's', which strips quotes and interprets escapes, and is quite inappropriate for QMP. Signed-off-by: Markus Armbruster arm...@redhat.com --- migration.c | 15 ++- qemu-monitor.hx |2 +- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git

[Qemu-devel] [PATCH v2 6/8] monitor: New argument type 'T'

2010-01-20 Thread Markus Armbruster
This is a double value with optional suffixes ms, us, ns. We'll need this to get migrate_set_downtime() QMP-ready. Signed-off-by: Markus Armbruster arm...@redhat.com --- monitor.c | 16 +++- 1 files changed, 15 insertions(+), 1 deletions(-) diff --git a/monitor.c b/monitor.c

[Qemu-devel] Re: [PATCH v2 0/8] Convert migrate_set_speed, migrate_set_downtime to QObject

2010-01-20 Thread Markus Armbruster
Please ignore the v2 in the subject, it's an accident.

[Qemu-devel] [PATCH] make: qemu-img depends on config-host.h

2010-01-20 Thread Anthony Liguori
Fixes mingw32 build out of tree. Signed-off-by: Anthony Liguori aligu...@us.ibm.com --- Makefile |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/Makefile b/Makefile index b1bbe6d..60d5c66 100644 --- a/Makefile +++ b/Makefile @@ -126,7 +126,7 @@ bt-host.o: QEMU_CFLAGS +=

Re: [Qemu-devel] Re: [PATCH 07/17] block/vvfat.c: fix warnings with _FORTIFY_SOURCE

2010-01-20 Thread Jamie Lokier
Kirill A. Shutemov wrote: On Wed, Jan 20, 2010 at 3:03 PM, Markus Armbruster arm...@redhat.com wrote: Kirill A. Shutemov kir...@shutemov.name writes: No, compiler can't add anything between. 'char' is always byte-aligned. You got some reading to do then. Do you want to say that it's

[Qemu-devel] [PATCH] ide save/restore current transfer fields

2010-01-20 Thread Marcelo Tosatti
If migration takes place between write of the bmdma address register and write of the command register (to initiate DMA), the destination will not properly start the DMA op, hanging the guest: ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen ata1.00: cmd

Re: [Qemu-devel] [PATCH] block: prevent multiwrite_merge from creating too large iovecs

2010-01-20 Thread Christoph Hellwig
On Wed, Jan 20, 2010 at 12:37:51PM +0100, Kevin Wolf wrote: Am 19.01.2010 22:15, schrieb Christoph Hellwig: If we go over the maximum number of iovecs support by syscall we get back EINVAL from the kernel which translate to I/O errors for the guest. Signed-off-by: Christoph Hellwig

[Qemu-devel] [PATCH] fix savevm command without id or tag

2010-01-20 Thread Marcelo Tosatti
savevm without id or tag segfaults in: (gdb) bt #0 0x7f600a83bf8a in __strcmp_sse42 () from /lib64/libc.so.6 #1 0x004745b6 in bdrv_snapshot_find (bs=value optimized out, sn_info=0x7fff996be280, name=0x0) at savevm.c:1631 #2 0x00475c80 in del_existing_snapshots

Re: [Qemu-devel] [PATCH] block: prevent multiwrite_merge from creating too large iovecs

2010-01-20 Thread Kevin Wolf
Am 20.01.2010 17:24, schrieb Christoph Hellwig: On Wed, Jan 20, 2010 at 12:37:51PM +0100, Kevin Wolf wrote: Am 19.01.2010 22:15, schrieb Christoph Hellwig: If we go over the maximum number of iovecs support by syscall we get back EINVAL from the kernel which translate to I/O errors for the

[Qemu-devel] [PATCH v2 0/5]: Convert pci_info() to QObject

2010-01-20 Thread Luiz Capitulino
Hi, This new version addresses Markus's comments. changelog - V1 - V2 - Make class_info's key 'desc' optional - Better indentation - Doc fixes V0 - V1 - Coding style fixes - Make 'BAR' and 'IRQ' keys lowercase - Add 'irq' key to the documentation Thanks.

[Qemu-devel] [PATCH 1/5] QList: Introduce QLIST_FOREACH_ENTRY()

2010-01-20 Thread Luiz Capitulino
Iterate over QList entries, it's needed to call qlist_entry_obj() to retrieve the stored QObject. I'm not sure if it's ok to have this, because it's not as easy as qlist_iter() and the QListEntry data type is now exposed to the users, which means we have one more struct to be maintained when we

[Qemu-devel] [PATCH 2/5] QDict: Introduce qdict_get_qdict()

2010-01-20 Thread Luiz Capitulino
A helper to retrieve a QDict from a QDict. Signed-off-by: Luiz Capitulino lcapitul...@redhat.com --- qdict.c | 13 + qdict.h |1 + 2 files changed, 14 insertions(+), 0 deletions(-) diff --git a/qdict.c b/qdict.c index ba8eef0..c6a5a42 100644 --- a/qdict.c +++ b/qdict.c @@

[Qemu-devel] [PATCH 3/5] PCI: Convert pci_info() to QObject

2010-01-20 Thread Luiz Capitulino
The returned QObject is a QList of all buses. Each bus is represented by a QDict, which has a key with a QList of all PCI devices attached to it. Each device is represented by a QDict. IMPORTANT: support for printing PCI bridge information and its devices is NOT part of this commit, it's going to

[Qemu-devel] [PATCH 4/5] PCI: do_pci_info(): PCI bridge support

2010-01-20 Thread Luiz Capitulino
This commit adds the pci_bridge key to the PCI device QDict, it also adds support for printing it in the user protocol. IMPORTANT: This code is being added separately because I could NOT test it properly. According to Michael Tsirkin, it depends on ultrasparc and it would take time to do the

[Qemu-devel] [PATCH 5/5] PCI: do_pci_info(): PCI bridge devices support

2010-01-20 Thread Luiz Capitulino
This commit completes the do_pci_info() conversion to QObject by adding support to PCI bridge devices. This is done by recursively adding devices in the pci_bridge key. IMPORTANT: This code is being added separately because I could NOT test it properly. According to Michael Tsirkin, it depends

RE: [Qemu-devel] [PATCH v2 1/8] monitor: Document argument type 'M'

2010-01-20 Thread Krumme, Chris
-Original Message- From: qemu-devel-bounces+chris.krumme=windriver@nongnu.org [mailto:qemu-devel-bounces+chris.krumme=windriver@nongnu.o rg] On Behalf Of Markus Armbruster Sent: Wednesday, January 20, 2010 10:08 AM To: qemu-devel@nongnu.org Subject: [Qemu-devel] [PATCH v2

Re: [Qemu-devel] [PATCH] fix savevm command without id or tag

2010-01-20 Thread Kevin Wolf
Am 20.01.2010 17:26, schrieb Marcelo Tosatti: savevm without id or tag segfaults in: (gdb) bt #0 0x7f600a83bf8a in __strcmp_sse42 () from /lib64/libc.so.6 #1 0x004745b6 in bdrv_snapshot_find (bs=value optimized out, sn_info=0x7fff996be280, name=0x0) at savevm.c:1631 #2

Re: [Qemu-devel] Re: Stop using which in ./configure

2010-01-20 Thread Loïc Minier
On Wed, Jan 20, 2010, Paolo Bonzini wrote: Are you saying that I can't backup/restore IFS without setting it first? Yes, it affects the behavior of read for example: $ echo a b c | (read a b c; echo $a; echo $b; echo $c) a b c $ IFS= $ echo a b c | (read a b c; echo $a; echo $b; echo

[Qemu-devel] Re: [PATCH] ide save/restore current transfer fields

2010-01-20 Thread Juan Quintela
Marcelo Tosatti mtosa...@redhat.com wrote: If migration takes place between write of the bmdma address register and write of the command register (to initiate DMA), the destination will not properly start the DMA op, hanging the guest: ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6

[Qemu-devel] [PATCH] ide save/restore current transfer fields

2010-01-20 Thread Juan Quintela
From: Marcelo Tosatti mtosa...@redhat.com If migration takes place between write of the bmdma address register and write of the command register (to initiate DMA), the destination will not properly start the DMA op, hanging the guest: ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6

Re: [Qemu-devel] [PATCH v2 0/4] Modifications to the drives' readonly attribute

2010-01-20 Thread Christoph Hellwig
Looking at the version of this that landed in git I don't think the read-only handling is entirely clean after this. - we now normally set the read_only flag from bdrv_open2 when we do not have the O_RDWR flag set - but the block drivers also mess with it: o raw-posix superflously

[Qemu-devel] [PATCH v2 1/2] block: clean up bdrv_open2 structure a bit

2010-01-20 Thread Christoph Hellwig
Check the whitelist as early as possible instead of continuing the setup, and move all the error handling code to the end of the function. Signed-off-by: Christoph Hellwig h...@lst.de Index: qemu/block.c === --- qemu.orig/block.c

[Qemu-devel] [PATCH v2 2/2] block: kill BDRV_O_CREAT

2010-01-20 Thread Christoph Hellwig
The BDRV_O_CREAT option is unused inside qemu and partially duplicates the bdrv_create method. Remove it, and the -C option to qemu-io which isn't used in qemu-iotests anyway. Signed-off-by: Christoph Hellwig h...@lst.de Index: qemu/block.h

Re: [Qemu-devel] [PATCH v2 1/8] monitor: Document argument type 'M'

2010-01-20 Thread Markus Armbruster
Krumme, Chris chris.kru...@windriver.com writes: Hello Markus, Not sure of the best answer, but thought there should be some discussion. You mention Mebibyte, which according to the all knowing Wikipedia, is abbreviated Mi. I understand that if you will only support one, then maybe you

[Qemu-devel] [PATCH 1/6] tcg: Document double-word support opcodes.

2010-01-20 Thread Richard Henderson
The internal opcodes brcond2, add2, sub2, mulu2 were undocumented. Place these in a new section that clearly indicates that they are not to be emitted by translators. Signed-off-by: Richard Henderson r...@twiddle.net --- tcg/README | 23 +++ 1 files changed, 23

[Qemu-devel] [PATCH 0/6] tcg conditional set, round 6

2010-01-20 Thread Richard Henderson
Changes v5-v6: * Update x86-64 post P_REXB changes. Changes v4-v5: * Document double-word support opcodes in a new section of the README, as requested by Aurelien. * Shorten the branch-to-next in the EQ case of i386 brcond2, as pointed out by Laurent. r~ Richard Henderson (6):

[Qemu-devel] [PATCH 2/6] tcg: Generic support for conditional set

2010-01-20 Thread Richard Henderson
Defines setcond_{i32,i64} and setcond2_i32 for 64-on-32-bit. Signed-off-by: Richard Henderson r...@twiddle.net --- tcg/README| 13 + tcg/tcg-op.h | 47 +++ tcg/tcg-opc.h |3 +++ tcg/tcg.c | 21 +++-- 4

[Qemu-devel] [PATCH 6/6] tcg-x86_64: Implement setcond.

2010-01-20 Thread Richard Henderson
Signed-off-by: Richard Henderson r...@twiddle.net --- tcg/x86_64/tcg-target.c | 38 +- 1 files changed, 33 insertions(+), 5 deletions(-) diff --git a/tcg/x86_64/tcg-target.c b/tcg/x86_64/tcg-target.c index cbaabef..6e7a6a4 100644 ---

[Qemu-devel] [PATCH 4/6] tcg-i386: Implement small forward branches.

2010-01-20 Thread Richard Henderson
There are places, like brcond2, where we know that the destination of a forward branch will be within 127 bytes. Add the R_386_PC8 relocation type to support this. Add a flag to tcg_out_jxx and tcg_out_brcond* to enable it. Set the flag in the brcond2 label_next branches; pass along the input

  1   2   >