Re: [Qemu-devel] [PATCH V5 1/4] Implement sync modes for drive-backup.

2013-07-19 Thread Ian Main
On Fri, Jul 19, 2013 at 04:11:13PM -0600, Eric Blake wrote: > On 07/19/2013 03:49 PM, Ian Main wrote: > >>> +++ b/qapi-schema.json > >>> @@ -1807,6 +1807,10 @@ > >>> # @format: #optional the format of the new destination, default is to > >>> # probe if @mode is 'existing', else the forma

Re: [Qemu-devel] [RFC PATCH v1 3/3] device_tree: qemu_fdt_setprop: Fixup error reporting

2013-07-19 Thread Peter Crosthwaite
Ping! If theres not objections to the change pattern id like to proceed with the full change. Regards, Peter On Fri, Jul 12, 2013 at 2:29 PM, wrote: > From: Peter Crosthwaite > > There are a mix of usages of the qemu_fdt_* API calls, some which > wish to assert and abort QEMU on failure and s

Re: [Qemu-devel] [PATCH 4/4] exec: fix incorrect assumptions in memory_access_size

2013-07-19 Thread Luiz Capitulino
On Fri, 19 Jul 2013 22:07:58 +0200 Paolo Bonzini wrote: > access_size_min can be 1 because erroneous accesses must not crash > QEMU, they should trigger exceptions in the guest or just return > garbage (depending on the CPU). I am not sure I understand the > comment: placing a 4-byte field at th

[Qemu-devel] [PATCH V7 06/13] monitor: avoid direct use of global variable *mon_cmds

2013-07-19 Thread Wenchao Xia
New member *cmd_table is added in structure Monitor to avoid direct usage of *mon_cmds. Now monitor have an associated command table, when global variable *info_cmds is also discarded, structure Monitor would gain full control about how to deal with user input. Signed-off-by: Wenchao Xia --- mon

[Qemu-devel] [PATCH V7 08/13] monitor: refine parse_cmdline()

2013-07-19 Thread Wenchao Xia
Since this function will be used by help_cmd() later, so improve it to make it more generic and easier to use. free_cmdline_args() is added to as paired function to free the result. One change of this function is that, when the valid args in input exceed the limit of MAX_ARGS, it fails now, instea

[Qemu-devel] [PATCH V7 05/13] monitor: avoid use of global *cur_mon in readline_completion()

2013-07-19 Thread Wenchao Xia
Now all completion functions do not use *cur_mon any more, instead they use rs->mon. In short, structure ReadLineState decide where the complete action would be taken now. Tested with the case that qemu have two telnet monitors, auto completion function works normal. Signed-off-by: Wenchao Xia -

[Qemu-devel] [PATCH V7 04/13] monitor: avoid use of global *cur_mon in monitor_find_completion()

2013-07-19 Thread Wenchao Xia
Parameter *mon is added, and local variable *mon added in previous patch is removed. The caller readline_completion(), pass rs->mon as value, which should be initialized in readline_init() called by monitor_init(). Signed-off-by: Wenchao Xia --- include/monitor/readline.h |3 ++- monitor.c

[Qemu-devel] [PATCH V7 03/13] monitor: avoid use of global *cur_mon in block_completion_it()

2013-07-19 Thread Wenchao Xia
Signed-off-by: Wenchao Xia --- monitor.c | 18 ++ 1 files changed, 14 insertions(+), 4 deletions(-) diff --git a/monitor.c b/monitor.c index 0f92bca..10ebabc 100644 --- a/monitor.c +++ b/monitor.c @@ -4086,14 +4086,21 @@ static void file_completion(Monitor *mon, const char *in

[Qemu-devel] [PATCH V7 13/13] monitor: improve auto complete of "help" for single command in sub group

2013-07-19 Thread Wenchao Xia
Now special case "help *" in auto completion can work with sub commands, such as "help info u*". Signed-off-by: Wenchao Xia --- monitor.c |6 ++ 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/monitor.c b/monitor.c index ea3ed96..95fa918 100644 --- a/monitor.c +++ b/monito

[Qemu-devel] [PATCH V7 10/13] monitor: refine monitor_find_completion()

2013-07-19 Thread Wenchao Xia
In order to support sub command in auto completion, an reentrant function is needed, so monitor_find_completion() is splitted into two parts. The first part does parsing of user input which need to be done only once, the second part does the auto completion job according to the parsing result, whic

[Qemu-devel] [PATCH V7 12/13] monitor: allow "help" show message for single command in sub group

2013-07-19 Thread Wenchao Xia
A new parameter type 'S' is introduced to allow user input any string. "help info block" works normal now. Signed-off-by: Wenchao Xia --- hmp-commands.hx |2 +- monitor.c | 27 +++ 2 files changed, 28 insertions(+), 1 deletions(-) diff --git a/hmp-commands.hx

[Qemu-devel] [PATCH V7 01/13] monitor: avoid use of global *cur_mon in cmd_completion()

2013-07-19 Thread Wenchao Xia
A new local variable *mon is added in monitor_find_completion() to make compile pass, which will be removed later in convertion patch for monitor_find_completion(). Signed-off-by: Wenchao Xia --- monitor.c | 13 +++-- 1 files changed, 7 insertions(+), 6 deletions(-) diff --git a/monit

[Qemu-devel] [PATCH V7 00/13] monitor: support sub command group in auto completion and help

2013-07-19 Thread Wenchao Xia
This series make auto completion and help functions works normal for sub command, by using reentrant functions. In order to do that, global variables are not directly used in those functions any more. With this series, cmd_table is a member of structure Monitor so it is possible to create a monitor

[Qemu-devel] [PATCH V7 07/13] monitor: code move for parse_cmdline()

2013-07-19 Thread Wenchao Xia
help_cmd() need this function later, so move it. get_str() is called by parse_cmdline() so it is moved also. Some code style error reported by check script, is also fixed. Signed-off-by: Wenchao Xia --- monitor.c | 191 +++-- 1 files chang

[Qemu-devel] [PATCH V7 11/13] monitor: support sub command in auto completion

2013-07-19 Thread Wenchao Xia
This patch allow auto completion work normal for sub command case, "info block [DEVICE]" can auto complete now, by re-enter the completion function. In original code "info" is treated as a special case, now it is treated as a sub command group, global variable info_cmds is not used any more. "help

[Qemu-devel] [PATCH V7 02/13] monitor: avoid use of global *cur_mon in file_completion()

2013-07-19 Thread Wenchao Xia
Signed-off-by: Wenchao Xia --- monitor.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/monitor.c b/monitor.c index b88c02b..0f92bca 100644 --- a/monitor.c +++ b/monitor.c @@ -4030,7 +4030,7 @@ static void cmd_completion(Monitor *mon, const char *name, const char

[Qemu-devel] [PATCH V7 09/13] monitor: support sub command in help

2013-07-19 Thread Wenchao Xia
The old code in help_cmd() use global 'info_cmds' and treat it as a special case. Actually 'info_cmds' is an sub command group of 'mon_cmds', in order to avoid direct use of it, help_cmd() need to change its work mechanism to support sub command and not treat it as a special case any more. To supp

Re: [Qemu-devel] BUG: Re: [PATCH v3 11/14] ioport: Switch dispatching to memory core layer

2013-07-19 Thread Alexey Kardashevskiy
On 07/20/2013 10:55 AM, Alexey Kardashevskiy wrote: > On 07/20/2013 01:48 AM, Alexey Kardashevskiy wrote: >> Ok. So. >> >> What broke is... >> I could try explaining but backtraces are lot better :) >> >> Shortly - virtio_pci_config_ops.endianness was ignored before (was bad but >> we had a workaro

Re: [Qemu-devel] BUG: Re: [PATCH v3 11/14] ioport: Switch dispatching to memory core layer

2013-07-19 Thread Alexey Kardashevskiy
On 07/20/2013 01:48 AM, Alexey Kardashevskiy wrote: > Ok. So. > > What broke is... > I could try explaining but backtraces are lot better :) > > Shortly - virtio_pci_config_ops.endianness was ignored before (was bad but > we had a workaround in spapr_io_ops), now it works so double swap happens >

Re: [Qemu-devel] [PATCH V5 3/8] qmp: add internal snapshot support in qmp_transaction

2013-07-19 Thread Wenchao Xia
于 2013-7-19 18:13, Kevin Wolf 写道: Am 19.07.2013 um 11:19 hat Wenchao Xia geschrieben: 于 2013-7-18 20:22, Kevin Wolf 写道: Am 11.07.2013 um 07:46 hat Wenchao Xia geschrieben: Unlike savevm, the qmp_transaction interface will not generate snapshot name automatically, saving trouble to return infor

Re: [Qemu-devel] [PATCH v2 00/17] Add qemu-img subcommand to dump file metadata

2013-07-19 Thread Wenchao Xia
于 2013-7-19 20:14, Paolo Bonzini 写道: Il 19/07/2013 12:48, Wenchao Xia ha scritto: I think dump of allocated info in qemu-img in this series, can do dirty change tracking job for backing chain snapshot now, qemu's QMP interface is not very needed. Only thing not perfect, is that it talks wi

Re: [Qemu-devel] [PATCH v3 1/2] hw/loader: Support ramdisk with u-boot header

2013-07-19 Thread Sören Brinkmann
On Sat, Jul 20, 2013 at 12:20:48AM +0100, Peter Maydell wrote: > On 19 July 2013 18:53, Sören Brinkmann wrote: > > On Fri, Jul 19, 2013 at 06:46:57PM +0100, Peter Maydell wrote: > >> On 19 July 2013 18:39, Sören Brinkmann wrote: > >> > On Fri, Jul 19, 2013 at 01:04:20PM +0100, Peter Maydell wrote

Re: [Qemu-devel] [PATCH v3 1/2] hw/loader: Support ramdisk with u-boot header

2013-07-19 Thread Peter Maydell
On 19 July 2013 18:53, Sören Brinkmann wrote: > On Fri, Jul 19, 2013 at 06:46:57PM +0100, Peter Maydell wrote: >> On 19 July 2013 18:39, Sören Brinkmann wrote: >> > On Fri, Jul 19, 2013 at 01:04:20PM +0100, Peter Maydell wrote: >> >> On 8 July 2013 23:40, Soren Brinkmann wrote: >> >> > + >> >> >

Re: [Qemu-devel] [PATCH V5 1/4] Implement sync modes for drive-backup.

2013-07-19 Thread Ian Main
On Fri, Jul 19, 2013 at 01:41:10PM -0600, Eric Blake wrote: > On 07/19/2013 11:03 AM, Ian Main wrote: > > This patch adds sync-modes to the drive-backup interface and > > implements the FULL, NONE and TOP modes of synchronization. > > > > > Signed-off-by: Ian Main > > --- > > block/backup.c

Re: [Qemu-devel] [PATCH v2 14/17] raw-posix: return get_block_status data and flags

2013-07-19 Thread Eric Blake
On 07/16/2013 10:29 AM, Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini > --- > block/raw-posix.c | 17 ++--- > 1 file changed, 10 insertions(+), 7 deletions(-) > > +++ b/block/raw-posix.c > @@ -1089,7 +1089,7 @@ static int64_t coroutine_fn > raw_co_get_block_status(BlockDriver

[Qemu-devel] [PULL 0/4] Memory API fixes for soft freeze

2013-07-19 Thread Paolo Bonzini
Anthony, The following changes since commit 6453a3a69488196f26d12654c6b148446abdf3d6: Merge remote-tracking branch 'quintela/migration.next' into staging (2013-07-15 14:49:16 -0500) are available in the git repository at: git://github.com/bonzini/qemu.git iommu-for-anthony for you to fetc

[Qemu-devel] [PATCH 4/4] exec: fix incorrect assumptions in memory_access_size

2013-07-19 Thread Paolo Bonzini
access_size_min can be 1 because erroneous accesses must not crash QEMU, they should trigger exceptions in the guest or just return garbage (depending on the CPU). I am not sure I understand the comment: placing a 4-byte field at the last byte of a region makes no sense (unless impl.unaligned is t

Re: [Qemu-devel] [PATCH v2 16/17] block: add default get_block_status implementation for protocols

2013-07-19 Thread Eric Blake
On 07/16/2013 10:29 AM, Paolo Bonzini wrote: > Protocols return raw data, so you can assume the offsets to pass > through unchanged. > > Signed-off-by: Paolo Bonzini > --- > block.c | 6 +- > 1 file changed, 5 insertions(+), 1 deletion(-) Reviewed-by: Eric Blake -- Eric Blake eblake re

[Qemu-devel] [PATCH 2/4] memory: actually set the owner

2013-07-19 Thread Paolo Bonzini
Brown paper bag for me. Originally commit 803c0816 came before commit 2c9b15c. When the order was inverted, I left in the NULL initialization of mr->owner. Reviewed-by: Hu Tao Signed-off-by: Paolo Bonzini --- memory.c | 1 - 1 file changed, 1 deletion(-) diff --git a/memory.c b/memory.c inde

Re: [Qemu-devel] [PATCH v2 2/2] full introspection support for QMP

2013-07-19 Thread Eric Blake
On 07/17/2013 02:36 PM, Luiz Capitulino wrote: >> We need to parse all commands json definition, and generated a >> dynamical tree, QMP infrastructure will convert the tree to >> json string and return to QMP client. >> >> So here I defined a 'DataObject' type in qapi-schema.json, >> it's used to d

Re: [Qemu-devel] [PATCH v2 2/2] full introspection support for QMP

2013-07-19 Thread Eric Blake
On 07/16/2013 04:37 AM, Amos Kong wrote: > Introduces new monitor command to query QMP schema information, > the return data is a dynamical and nested dict/list, it contains s/dynamical/dynamic/ > the useful metadata to help management to check feature support, > QMP commands detail, etc. > > I

[Qemu-devel] [PATCH 3/4] memory: Return -1 again on reads from unsigned regions

2013-07-19 Thread Paolo Bonzini
From: Jan Kiszka This restore the behavior prior to b018ddf633 which accidentally changed the return code to 0. Specifically guests probing for register existence were affected by this. Signed-off-by: Jan Kiszka Signed-off-by: Paolo Bonzini --- memory.c | 2 +- 1 file changed, 1 insertion(+),

Re: [Qemu-devel] [PATCH V4 1/4] Implement sync modes for drive-backup.

2013-07-19 Thread Ian Main
On Thu, Jul 18, 2013 at 01:54:45PM -0600, Eric Blake wrote: > On 07/18/2013 01:06 PM, Ian Main wrote: > > On Thu, Jul 18, 2013 at 11:19:43AM -0600, Eric Blake wrote: > >> On 07/17/2013 02:04 PM, Ian Main wrote: > >>> This patch adds sync-modes to the drive-backup interface and > >>> implements the

Re: [Qemu-devel] [PATCH V5 1/4] Implement sync modes for drive-backup.

2013-07-19 Thread Eric Blake
On 07/19/2013 11:03 AM, Ian Main wrote: > This patch adds sync-modes to the drive-backup interface and > implements the FULL, NONE and TOP modes of synchronization. > > Signed-off-by: Ian Main > --- > block/backup.c| 91 > +++ > blockdev.

Re: [Qemu-devel] [PATCH] memory: Fix zero-sized memory region print

2013-07-19 Thread Paolo Bonzini
Il 19/07/2013 20:42, Alex Williamson ha scritto: > if mr->size == 0, then > > int128_get64(int128_sub(mr->size, int128_make64(1))) => assert(!a.hi) > > Also, use int128_one(). > > Signed-off-by: Alex Williamson Reviewed-by: Paolo Bonzini > --- > memory.c |8 ++-- > 1 file changed, 6

Re: [Qemu-devel] [PATCH V5 1/4] Implement sync modes for drive-backup.

2013-07-19 Thread Eric Blake
On 07/19/2013 03:49 PM, Ian Main wrote: >>> +++ b/qapi-schema.json >>> @@ -1807,6 +1807,10 @@ >>> # @format: #optional the format of the new destination, default is to >>> # probe if @mode is 'existing', else the format of the source >>> # >>> +# @sync: what parts of the disk image shou

Re: [Qemu-devel] [PATCH v2 15/17] raw-posix: detect XFS unwritten extents

2013-07-19 Thread Eric Blake
On 07/16/2013 10:29 AM, Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini > --- > block/raw-posix.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/block/raw-posix.c b/block/raw-posix.c > index d011cfd..1b41ea3 100644 > --- a/block/raw-posix.c > +++ b/block/raw-posix.c > @@ -1128,6

Re: [Qemu-devel] [PATCH v2 17/17] block: look for zero blocks in bs->file

2013-07-19 Thread Eric Blake
On 07/16/2013 10:29 AM, Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini > --- > block.c | 10 +- > 1 file changed, 9 insertions(+), 1 deletion(-) > Reviewed-by: Eric Blake -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org si

[Qemu-devel] [PATCH 1/4] exec.c: Pass correct pointer type to qemu_ram_ptr_length

2013-07-19 Thread Paolo Bonzini
From: Peter Maydell Commit e3127ae0 introduced a problem where we're passing a hwaddr* to qemu_ram_ptr_length() but it wants a ram_addr_t*; this will cause problems on 32 bit hosts and in any case provokes a clang warning on MacOSX: CCarm-softmmu/exec.o exec.c:2164:46: warning: incompatibl

Re: [Qemu-devel] [PATCH V4 3/4] Add backing drive while performing backup.

2013-07-19 Thread Paolo Bonzini
Il 19/07/2013 03:13, Fam Zheng ha scritto: >>> > > Also set target->backing_file and target->backing_format here? Paolo? >> > >> > I don't think so, it is temporary while the job runs so that the NBD >> > server can already return the actual data. > OK. > > For NBD export, it's also going to have

Re: [Qemu-devel] BUG: make check -> ERROR:tests/boot-order-test.c:43:test_a_boot_order

2013-07-19 Thread Markus Armbruster
Alex Bligh writes: > Using current master: 24943978cbe79634a9a8b02a20efb25b29b3ab49 > > 'make check' gives: > > ERROR:tests/boot-order-test.c:43:test_a_boot_order: assertion failed > (actual == expected_boot): (0x1230 == 0x) > GTester: last random seed: R02Se371669dcb0a3274fa9c170e226

Re: [Qemu-devel] [RFC 0/3] Determinitic behaviour with icount.

2013-07-19 Thread Frederic Konrad
On 18/07/2013 18:35, Paolo Bonzini wrote: Il 18/07/2013 18:31, Frederic Konrad ha scritto: On 18/07/2013 17:35, Paolo Bonzini wrote: Il 18/07/2013 17:06, Peter Maydell ha scritto: On 18 July 2013 16:02, wrote: As I said in the last email, we have issues with determinism with icount. We are

[Qemu-devel] [PATCH] memory: Fix zero-sized memory region print

2013-07-19 Thread Alex Williamson
if mr->size == 0, then int128_get64(int128_sub(mr->size, int128_make64(1))) => assert(!a.hi) Also, use int128_one(). Signed-off-by: Alex Williamson --- memory.c |8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/memory.c b/memory.c index c8f9a2b..6e17c21 100644 ---

[Qemu-devel] [PATCH V5 3/4] Add backing drive while performing backup.

2013-07-19 Thread Ian Main
This patch adds the original source drive as a backing drive to our target image so that the target image will appear complete during backup. This is especially useful for SYNC_MODE_NONE as it allows export via NBD to have a complete point-in-time snapshot available for export. Signed-off-by: Ian

Re: [Qemu-devel] [PATCH] aes: Remove unused code (NDEBUG, u16)

2013-07-19 Thread Stefan Weil
Am 29.06.2013 17:10, schrieb Stefan Weil: > The current code includes assert.h very early (from qemu-common.h), > so the definition of NDEBUG was without any effect. > > In the initial version from 2004, NDEBUG was used to disable the assertions. > Those assertions are not in time critical code, so

Re: [Qemu-devel] [PATCH] PPC: dbdma: macio: Fix format specifiers (build regression)

2013-07-19 Thread Stefan Weil
Am 19.07.2013 00:40, schrieb Alexander Graf: > On 18.07.2013, at 21:49, Stefan Weil wrote: > >> Am 16.07.2013 07:54, schrieb Stefan Weil: >>> Am 12.07.2013 18:48, schrieb Stefan Weil: Fix a number of warnings for 32 bit builds (tested on MingW and Linux): CChw/ide/macio.o q

Re: [Qemu-devel] [PATCH v2 13/17] block: use bdrv_has_zero_init to return BDRV_BLOCK_ZERO

2013-07-19 Thread Eric Blake
On 07/16/2013 10:29 AM, Paolo Bonzini wrote: > Alternatively, this could use a "discard zeroes data" flag returned > by bdrv_get_info. > > Signed-off-by: Paolo Bonzini > --- > block.c | 8 +++- > 1 file changed, 7 insertions(+), 1 deletion(-) Reviewed-by: Eric Blake -- Eric Blake eblak

Re: [Qemu-devel] Commit 23326164ae (exec: Support 64-bit op...) triggers assertion

2013-07-19 Thread Richard Henderson
On 07/19/2013 10:28 AM, Luiz Capitulino wrote: > Hi, > > Reproducer: > > # ./qemu-qmp -drive file=disks/test.img,if=virtio,cache=none,aio=native \ > -enable-kvm -m 1G -monitor stdio -usb -usbdevice host:1.43 > QEMU 1.5.50 monitor - type 'help' for more information > (qemu) qemu-qmp: > /home/l

[Qemu-devel] [PATCH V5 1/4] Implement sync modes for drive-backup.

2013-07-19 Thread Ian Main
This patch adds sync-modes to the drive-backup interface and implements the FULL, NONE and TOP modes of synchronization. FULL performs as before copying the entire contents of the drive while preserving the point-in-time using CoW. NONE only copies new writes to the target drive. TOP copies change

Re: [Qemu-devel] [PATCH v2 17/17] block: look for zero blocks in bs->file

2013-07-19 Thread Paolo Bonzini
Il 19/07/2013 09:33, Stefan Hajnoczi ha scritto: > On Tue, Jul 16, 2013 at 06:29:28PM +0200, Paolo Bonzini wrote: >> diff --git a/block.c b/block.c >> index 557ce29..2d7d71f 100644 >> --- a/block.c >> +++ b/block.c >> @@ -2977,7 +2977,7 @@ static int64_t coroutine_fn >> bdrv_co_get_block_status(Bl

[Qemu-devel] [PATCH V5 4/4] Change default to qcow2 for sync mode none.

2013-07-19 Thread Ian Main
qcow2 supports backing files so it makes sense to default to qcow2 for MIRROR_SYNC_MODE_NONE so that we can use the source as a backing drive and export it via nbd. Defaulting FULL and TOP to SYNC_MODE_NONE breaks tests but that could be fixed if we wanted it. Signed-off-by: Ian Main --- blockd

Re: [Qemu-devel] [PATCH v2 12/17] qemu-img: add a "map" subcommand

2013-07-19 Thread Eric Blake
On 07/16/2013 10:29 AM, Paolo Bonzini wrote: > This command dumps the metadata of an entire chain, in either tabular or JSON > format. > > Signed-off-by: Paolo Bonzini > --- > v1->v2: mention encrypted clusters, use PRId64 > > qemu-img-cmds.hx | 6 ++ > qemu-img.c | 185 > +

Re: [Qemu-devel] Commit 23326164ae (exec: Support 64-bit op...) triggers assertion

2013-07-19 Thread Luiz Capitulino
On Fri, 19 Jul 2013 12:06:42 -0700 Richard Henderson wrote: > On 07/19/2013 10:28 AM, Luiz Capitulino wrote: > > Hi, > > > > Reproducer: > > > > # ./qemu-qmp -drive file=disks/test.img,if=virtio,cache=none,aio=native \ > > -enable-kvm -m 1G -monitor stdio -usb -usbdevice host:1.43 > > QEMU 1

[Qemu-devel] [PATCH V5 0/4] Implement sync modes for drive-backup.

2013-07-19 Thread Ian Main
This patch adds sync modes on top of the work that Stefan Hajnoczi has done. These patches apply on kevin/block with '[PATCH] block: add drive_backup HMP command' also applied. Hopefully all is in order as this is my first QEMU patch. Many thanks to Stephan and Fam Zheng for their help. V2: -

[Qemu-devel] [PATCH V5 2/4] Add tests for sync modes 'TOP' and 'NONE'

2013-07-19 Thread Ian Main
This patch adds tests for sync modes top and none. Signed-off-by: Ian Main --- tests/qemu-iotests/055| 67 --- tests/qemu-iotests/055.out| 4 +-- tests/qemu-iotests/group | 2 +- tests/qemu-iotests/iotests.py | 5 4 files changed,

Re: [Qemu-devel] [PATCH v3 1/2] hw/loader: Support ramdisk with u-boot header

2013-07-19 Thread Sören Brinkmann
On Fri, Jul 19, 2013 at 01:04:20PM +0100, Peter Maydell wrote: > On 8 July 2013 23:40, Soren Brinkmann wrote: > > + > > +if (ep) { > > +*ep = hdr->ih_ep; > > +} > > (Allowing ep to be NULL for IH_TYPE_KERNEL is new behaviour, > but it makes sense for consistency with t

Re: [Qemu-devel] [PATCH v3 1/2] hw/loader: Support ramdisk with u-boot header

2013-07-19 Thread Sören Brinkmann
On Fri, Jul 19, 2013 at 06:46:57PM +0100, Peter Maydell wrote: > On 19 July 2013 18:39, Sören Brinkmann wrote: > > On Fri, Jul 19, 2013 at 01:04:20PM +0100, Peter Maydell wrote: > >> On 8 July 2013 23:40, Soren Brinkmann wrote: > >> > + > >> > +if (ep) { > >> > +*ep = hdr->ih_

Re: [Qemu-devel] [PATCH v3 1/2] hw/loader: Support ramdisk with u-boot header

2013-07-19 Thread Peter Maydell
On 19 July 2013 18:39, Sören Brinkmann wrote: > On Fri, Jul 19, 2013 at 01:04:20PM +0100, Peter Maydell wrote: >> On 8 July 2013 23:40, Soren Brinkmann wrote: >> > + >> > +if (ep) { >> > +*ep = hdr->ih_ep; >> > +} >> >> (Allowing ep to be NULL for IH_TYPE_KERNEL is new

Re: [Qemu-devel] Commit 23326164ae (exec: Support 64-bit op...) triggers assertion

2013-07-19 Thread Luiz Capitulino
On Fri, 19 Jul 2013 13:28:52 -0400 Luiz Capitulino wrote: > Hi, > > Reproducer: > > # ./qemu-qmp -drive file=disks/test.img,if=virtio,cache=none,aio=native \ > -enable-kvm -m 1G -monitor stdio -usb -usbdevice host:1.43 > QEMU 1.5.50 monitor - type 'help' for more information > (qemu) qemu-qm

Re: [Qemu-devel] [PATCH] hw/9pfs: Fix potential memory leak and avoid reuse of freed memory

2013-07-19 Thread Stefan Weil
Am 04.07.2013 10:53, schrieb M. Mohan Kumar: > Stefan Weil writes: > >> The leak was reported by cppcheck. >> >> Function proxy_init also calls g_free for ctx->fs_root. >> Avoid reuse of this memory by setting ctx->fs_root to NULL. >> >> Signed-off-by: Stefan Weil > Reviewed-by: M. Mohan Kumar >

Re: [Qemu-devel] [PATCH v2 11/17] block: return get_block_status data and flags for formats

2013-07-19 Thread Eric Blake
On 07/16/2013 10:29 AM, Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini > --- > v1->v2: handle extents that are stored in bs->file > > block/cow.c | 8 +++- > block/qcow.c | 9 - > block/qcow2.c| 16 ++-- > block/qed.c | 35

Re: [Qemu-devel] BUG: make check -> ERROR:tests/boot-order-test.c:43:test_a_boot_order

2013-07-19 Thread Alex Bligh
Markus, --On 19 July 2013 19:43:14 +0200 Markus Armbruster wrote: The tests pass for me. Anything unusual in your environment? Did you rebuild from scratch, or just ran make after git-pull? Our build process still isn't 100% reliable... You're quite correct - a make clean, and a long re

Re: [Qemu-devel] [PATCH v2 10/17] block: define get_block_status return value

2013-07-19 Thread Eric Blake
On 07/16/2013 10:29 AM, Paolo Bonzini wrote: > Define the return value of get_block_status. Bits 0, 1, 2 and 9-62 > are valid; bit 63 (the sign bit) is reserved for errors. Bits 3-7 bits 3-8, actually > are left for future extensions. > > The return code is compatible with the old is_allocated

[Qemu-devel] Commit 23326164ae (exec: Support 64-bit op...) triggers assertion

2013-07-19 Thread Luiz Capitulino
Hi, Reproducer: # ./qemu-qmp -drive file=disks/test.img,if=virtio,cache=none,aio=native \ -enable-kvm -m 1G -monitor stdio -usb -usbdevice host:1.43 QEMU 1.5.50 monitor - type 'help' for more information (qemu) qemu-qmp: /home/lcapitulino/work/src/upstream/qmp-unstable/exec.c:1927: memory_acc

[Qemu-devel] [PATCH] [RFC] aio/timers: Drop alarm timers; introduce QEMUClock to AioContext; run timers in aio_poll

2013-07-19 Thread Alex Bligh
[ This is a patch for RFC purposes only. It is compile tested on Linux x86_64 only and passes make check (or rather did before make check started dying in the boot order test - different bug). I'd like to know whether I'm going in the right direction ] We no longer need alarm timers to trigger QE

[Qemu-devel] BUG: make check -> ERROR:tests/boot-order-test.c:43:test_a_boot_order

2013-07-19 Thread Alex Bligh
Using current master: 24943978cbe79634a9a8b02a20efb25b29b3ab49 'make check' gives: ERROR:tests/boot-order-test.c:43:test_a_boot_order: assertion failed (actual == expected_boot): (0x1230 == 0x) GTester: last random seed: R02Se371669dcb0a3274fa9c170e22654334 I'm on x86_64 I can't

Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/2] Add Enhanced Three-Speed Ethernet Controller (eTSEC)

2013-07-19 Thread Scott Wood
On 07/19/2013 04:22:46 AM, Fabien Chouteau wrote: On 07/18/2013 10:37 PM, Scott Wood wrote: > On 07/18/2013 04:27:50 AM, Fabien Chouteau wrote: >> The BD is full, we will have to put the rest of padding in the next one. > > What rest of padding? I thought you said rx_padding was 2 somehow?

Re: [Qemu-devel] BUG: Re: [PATCH v3 11/14] ioport: Switch dispatching to memory core layer

2013-07-19 Thread Alexey Kardashevskiy
Ok. So. What broke is... I could try explaining but backtraces are lot better :) Shortly - virtio_pci_config_ops.endianness was ignored before (was bad but we had a workaround in spapr_io_ops), now it works so double swap happens and everything gets broken. If we talk about VGA (in powerpc, it i

[Qemu-devel] [PATCH v3] linux-user: Handle compressed ISA encodings when processing MIPS exceptions

2013-07-19 Thread Kwok Cheung Yeung
Decode trap instructions during the handling of an EXCP_BREAK or EXCP_TRAP according to the current ISA mode. Signed-off-by: Kwok Cheung Yeung --- linux-user/main.c | 46 +++--- 1 file changed, 43 insertions(+), 3 deletions(-) v2->v3: Handle microMIPS and

Re: [Qemu-devel] [PATCH 0/3] dataplane: virtio-blk live migration with x-data-plane=on

2013-07-19 Thread yinyin
hi, stefan: I use systemtap to test this patch,the migration will success. But I found the dataplane will start again after migration start. the virtio_blk_handle_output will start dataplane. virtio_blk_data_plane_stop pid:29037 tid:29037 0x6680fe : virtio_blk_data_plane_stop+0x0/0x232

[Qemu-devel] [PATCH v2] linux-user: Handle microMIPS encoding when processing trap exceptions

2013-07-19 Thread Kwok Cheung Yeung
Decode trap instructions during the handling of an EXCP_TRAP according to the current ISA mode. Signed-off-by: Kwok Cheung Yeung --- linux-user/main.c | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-) v2: Read microMIPS instructions sequentially as 16-bit values to avo

Re: [Qemu-devel] [PATCH v2] linux-user: Handle microMIPS encoding when processing trap exceptions

2013-07-19 Thread Kwok Cheung Yeung
On 19/07/2013 3:52 PM, Peter Maydell wrote: On 19 July 2013 15:47, Kwok Cheung Yeung wrote: Decode trap instructions during the handling of an EXCP_TRAP according to the current ISA mode. Signed-off-by: Kwok Cheung Yeung --- linux-user/main.c | 20 ++-- 1 file changed, 18 i

Re: [Qemu-devel] [PATCH v2] linux-user: Handle microMIPS encoding when processing trap exceptions

2013-07-19 Thread Peter Maydell
On 19 July 2013 15:47, Kwok Cheung Yeung wrote: > Decode trap instructions during the handling of an EXCP_TRAP according to > the current ISA mode. > > Signed-off-by: Kwok Cheung Yeung > --- > linux-user/main.c | 20 ++-- > 1 file changed, 18 insertions(+), 2 deletions(-) > > v2:

Re: [Qemu-devel] [PATCH] Bug Fix:Segmentation fault when use usb-ehci device

2013-07-19 Thread Peter Maydell
On 19 July 2013 15:12, Andreas Färber wrote: > No, I don't. There were other segfault avoidance patches like yours over > the past months - they're all fixing individual segfault symptoms. > Question for Paolo is whether we want to continue to discover them one > by one or whether to implement a f

Re: [Qemu-devel] [PATCH] Bug Fix:Segmentation fault when use usb-ehci device

2013-07-19 Thread Andreas Färber
Am 19.07.2013 04:26, schrieb Mike Qiu: > 于 2013/7/19 1:14, Andreas Färber 写道: >> There's some typos in the commit message, but the change looks okay to >> me - although there were discussions to catch this on the memory API >> side of things instead. > You mean this patch: see below: > > exec: Sup

[Qemu-devel] [PATCH] gluster: Add image resize support

2013-07-19 Thread Bharata B Rao
From: Paolo Bonzini Implement .bdrv_truncate in GlusterFS block driver so that GlusterFS backend can support image resizing. Signed-off-by: Paolo Bonzini Signed-off-by: Bharata B Rao Tested-by: Bharata B Rao --- block/gluster.c | 17 + 1 file changed, 17 insertions(+) diff -

Re: [Qemu-devel] [PATCH 4/4] qemu-img: conditionally discard target on convert

2013-07-19 Thread Peter Lieven
On 19.07.2013 16:00, ronnie sahlberg wrote: On Fri, Jul 19, 2013 at 6:49 AM, Peter Lieven wrote: On 19.07.2013 15:25, ronnie sahlberg wrote: On Thu, Jul 18, 2013 at 11:08 PM, Peter Lieven wrote: On 19.07.2013 07:58, Paolo Bonzini wrote: Il 18/07/2013 21:28, Peter Lieven ha scritto: thanks

Re: [Qemu-devel] [PATCH 4/4] qemu-img: conditionally discard target on convert

2013-07-19 Thread ronnie sahlberg
On Fri, Jul 19, 2013 at 6:49 AM, Peter Lieven wrote: > On 19.07.2013 15:25, ronnie sahlberg wrote: >> >> On Thu, Jul 18, 2013 at 11:08 PM, Peter Lieven wrote: >>> >>> On 19.07.2013 07:58, Paolo Bonzini wrote: Il 18/07/2013 21:28, Peter Lieven ha scritto: > > thanks for the detai

Re: [Qemu-devel] [PATCH 4/4] qemu-img: conditionally discard target on convert

2013-07-19 Thread ronnie sahlberg
On Thu, Jul 18, 2013 at 11:43 AM, Peter Lieven wrote: > > Am 18.07.2013 um 16:35 schrieb Paolo Bonzini : > >> Il 18/07/2013 16:32, Peter Lieven ha scritto: > (Mis)alignment and granularity can be handled later. We can ignore them for now. Later, if we decide the best way to support

Re: [Qemu-devel] [PATCH 4/4] qemu-img: conditionally discard target on convert

2013-07-19 Thread Peter Lieven
On 19.07.2013 15:25, ronnie sahlberg wrote: On Thu, Jul 18, 2013 at 11:08 PM, Peter Lieven wrote: On 19.07.2013 07:58, Paolo Bonzini wrote: Il 18/07/2013 21:28, Peter Lieven ha scritto: thanks for the details. I think to have optimal performance and best change for unmapping in qemu-img conve

Re: [Qemu-devel] [PATCH v2 09/17] block: introduce bdrv_get_block_status API

2013-07-19 Thread Eric Blake
On 07/16/2013 10:29 AM, Paolo Bonzini wrote: > For now, bdrv_get_block_status is just another name for bdrv_is_allocated. > The next patches will add more flags. > > This also touches all block drivers with a mostly mechanical rename. The > sole exception is cow; because it calls cow_co_is_alloca

Re: [Qemu-devel] commit 08521e2 breaks SLOF usb boot

2013-07-19 Thread Alexey Kardashevskiy
On 07/19/2013 11:05 PM, Alexey Kardashevskiy wrote: > On 07/19/2013 11:03 PM, Paolo Bonzini wrote: >> Il 19/07/2013 14:58, Alexey Kardashevskiy ha scritto: >>> On 07/19/2013 10:50 PM, Paolo Bonzini wrote: Il 14/06/2013 12:32, Nikunj A Dadhania ha scritto: > Nikunj A Dadhania writes: >

Re: [Qemu-devel] [PATCH 4/4] qemu-img: conditionally discard target on convert

2013-07-19 Thread ronnie sahlberg
On Thu, Jul 18, 2013 at 11:08 PM, Peter Lieven wrote: > On 19.07.2013 07:58, Paolo Bonzini wrote: >> >> Il 18/07/2013 21:28, Peter Lieven ha scritto: >>> >>> thanks for the details. I think to have optimal performance and best >>> change for unmapping in qemu-img convert >>> it might be best to ex

Re: [Qemu-devel] [PATCH v2 08/17] block: make bdrv_has_zero_init return false for copy-on-write-images

2013-07-19 Thread Paolo Bonzini
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Il 19/07/2013 15:21, Eric Blake ha scritto: > Question (more for my understanding, not that you need to change > code): must we blindly return 0 in the presence of a backing file, > or is it possible to recursively query the backing_hd's zero_init > st

Re: [Qemu-devel] [PATCH v2 08/17] block: make bdrv_has_zero_init return false for copy-on-write-images

2013-07-19 Thread Eric Blake
On 07/16/2013 10:29 AM, Paolo Bonzini wrote: > This helps implementing is_allocated on top of get_block_status. > > Signed-off-by: Paolo Bonzini > --- > block.c| 5 + > qemu-img.c | 9 + > 2 files changed, 6 insertions(+), 8 deletions(-) Reviewed-by: Eric Blake > +++ b/block.c

Re: [Qemu-devel] [PATCH v2 10/17] block: define get_block_status return value

2013-07-19 Thread Peter Lieven
On 19.07.2013 14:13, Paolo Bonzini wrote: Il 19/07/2013 12:04, Peter Lieven ha scritto: On 19.07.2013 11:58, Paolo Bonzini wrote: Il 19/07/2013 08:48, Peter Lieven ha scritto: -return bdrv_get_block_status(bs, sector_num, nb_sectors, pnum); +int64_t ret = bdrv_get_block_status(bs, sect

Re: [Qemu-devel] commit 08521e2 breaks SLOF usb boot

2013-07-19 Thread Alexey Kardashevskiy
On 07/19/2013 11:03 PM, Paolo Bonzini wrote: > Il 19/07/2013 14:58, Alexey Kardashevskiy ha scritto: >> On 07/19/2013 10:50 PM, Paolo Bonzini wrote: >>> Il 14/06/2013 12:32, Nikunj A Dadhania ha scritto: Nikunj A Dadhania writes: > commit 08521e28c7e6e8cc1f53424a0f845f58d2ed9546 > Aut

Re: [Qemu-devel] [PATCH v2 07/17] qemu-img: always probe the input image for allocated sectors

2013-07-19 Thread Eric Blake
On 07/16/2013 10:29 AM, Paolo Bonzini wrote: > qemu-img convert is assuming "that sectors which are unallocated in the input > image are present in both the output's and input's base images", but it is > only doing this if the output image is zero initialized. And checking if > the output image is

Re: [Qemu-devel] commit 08521e2 breaks SLOF usb boot

2013-07-19 Thread Paolo Bonzini
Il 19/07/2013 14:58, Alexey Kardashevskiy ha scritto: > On 07/19/2013 10:50 PM, Paolo Bonzini wrote: >> Il 14/06/2013 12:32, Nikunj A Dadhania ha scritto: >>> Nikunj A Dadhania writes: commit 08521e28c7e6e8cc1f53424a0f845f58d2ed9546 Author: Paolo Bonzini Date: Fri May 24 12:54:01

Re: [Qemu-devel] commit 08521e2 breaks SLOF usb boot

2013-07-19 Thread Alexey Kardashevskiy
On 07/19/2013 10:50 PM, Paolo Bonzini wrote: > Il 14/06/2013 12:32, Nikunj A Dadhania ha scritto: >> Nikunj A Dadhania writes: >>> commit 08521e28c7e6e8cc1f53424a0f845f58d2ed9546 >>> Author: Paolo Bonzini >>> Date: Fri May 24 12:54:01 2013 +0200 >>> >>> memory: add big endian support to acc

Re: [Qemu-devel] [PATCH v2 06/17] block: expect errors from bdrv_co_is_allocated

2013-07-19 Thread Eric Blake
On 07/16/2013 10:29 AM, Paolo Bonzini wrote: > Some bdrv_is_allocated callers do not expect errors, but the fallback > in qcow2.c might make other callers trip on assertion failures or > infinite loops. > > Fix the callers to always look for errors. > > Cc: qemu-sta...@nongnu.org > Signed-off-by:

Re: [Qemu-devel] commit 08521e2 breaks SLOF usb boot

2013-07-19 Thread Paolo Bonzini
Il 14/06/2013 12:32, Nikunj A Dadhania ha scritto: > Nikunj A Dadhania writes: >> commit 08521e28c7e6e8cc1f53424a0f845f58d2ed9546 >> Author: Paolo Bonzini >> Date: Fri May 24 12:54:01 2013 +0200 >> >> memory: add big endian support to access_with_adjusted_size >> >> This will be us

Re: [Qemu-devel] BUG: Re: [PATCH v3 11/14] ioport: Switch dispatching to memory core layer

2013-07-19 Thread Paolo Bonzini
Il 19/07/2013 13:09, Alexey Kardashevskiy ha scritto: > Hi! > > This patch also breaks virtio on powerpc. I thought it was fixed > (reverted?) in the master branch from qemu.org but it is still there. What > did I miss? It was not reverted, only the "DEVICE_LITTLE_ENDIAN" marking was. Let me che

Re: [Qemu-devel] [PATCH v2 05/17] block: remove bdrv_is_allocated_above/bdrv_co_is_allocated_above distinction

2013-07-19 Thread Eric Blake
On 07/16/2013 10:29 AM, Paolo Bonzini wrote: > Now that bdrv_is_allocated detects coroutine context, the two can > use the same code. > > Signed-off-by: Paolo Bonzini > --- > block.c | 46 -- > block/commit.c| 6 +++--- > block/m

Re: [Qemu-devel] [PATCH v2 04/17] block: make bdrv_co_is_allocated static

2013-07-19 Thread Eric Blake
On 07/16/2013 10:29 AM, Paolo Bonzini wrote: > bdrv_is_allocated can detect coroutine context and go through a fast > path, similar to other block layer functions. > > Signed-off-by: Paolo Bonzini > --- > block.c | 24 +++- > block/raw.c | 2 +- > blo

Re: [Qemu-devel] [PATCH v2 03/17] cow: do not call bdrv_co_is_allocated

2013-07-19 Thread Eric Blake
On 07/16/2013 10:29 AM, Paolo Bonzini wrote: > As we change bdrv_is_allocated to gather more information from bs and > bs->file, it will become a bit slower. It is still appropriate for online > jobs, but not for reads/writes. Call the internal function instead. > > Signed-off-by: Paolo Bonzini

Re: [Qemu-devel] [PATCH v2 02/17] cow: make writes go at a less indecent speed

2013-07-19 Thread Eric Blake
On 07/16/2013 10:29 AM, Paolo Bonzini wrote: > Only sync once per write, rather than once per sector. > > Signed-off-by: Paolo Bonzini > --- > block/cow.c | 19 --- > 1 file changed, 16 insertions(+), 3 deletions(-) > Reviewed-by: Eric Blake -- Eric Blake eblake redhat com

Re: [Qemu-devel] [PATCH v2 01/17] cow: make reads go at a decent speed

2013-07-19 Thread Eric Blake
On 07/16/2013 10:29 AM, Paolo Bonzini wrote: > Do not do two reads for each sector; load each sector of the bitmap > and use bitmap operations to process it. > > Writes are still dog slow! > > Signed-off-by: Paolo Bonzini > --- > v1->v2: use BDRV_SECTOR_SIZE, not 512 for bitmap array len

Re: [Qemu-devel] [PATCH v2 1/2] qapi: change qapi to convert schema json

2013-07-19 Thread Eric Blake
On 07/16/2013 04:37 AM, Amos Kong wrote: > QMP schema is defined in a json file, it will be parsed by > qapi scripts and generate C files. > > We want to return the schema information to management, > this patch converts the json file to a string table in a > C head file, then we can use the json

Re: [Qemu-devel] [PATCH v2 00/17] Add qemu-img subcommand to dump file metadata

2013-07-19 Thread Paolo Bonzini
Il 19/07/2013 12:48, Wenchao Xia ha scritto: > I think dump of allocated info in qemu-img in this series, can do > dirty change tracking job for backing chain snapshot now, qemu's QMP > interface is not very needed. > Only thing not perfect, is that it talks with string. It uses JSON, actually

  1   2   >