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

2013-07-20 Thread Paolo Bonzini
Il 19/07/2013 15:06, Peter Lieven ha scritto: 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, sector_num, nb_sectors, >> pnum); >> +return >> +(

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

2013-07-20 Thread Paolo Bonzini
Il 20/07/2013 03:11, Alexey Kardashevskiy ha scritto: > 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

Re: [Qemu-devel] [RFC PATCH v1 2/3] device_tree: qemu_fdt_setprop: Rename val_array arg

2013-07-20 Thread Andreas Färber
Am 12.07.2013 06:29, schrieb peter.crosthwa...@xilinx.com: > From: Peter Crosthwaite > > Looking at the implementation, this doesn't really have a lot to do > with arrays. Its just a pointer to a buffer and is passed through > to the wrapped fn (qemu_fdt_setprop) unchanged. So rename to make it >

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

2013-07-20 Thread Eric Blake
On 07/19/2013 07:44 PM, Wenchao Xia wrote: > 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(). s/convertion/conversion/ > > Signed-off-by: Wenchao Xia > --- > monitor.c | 13

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

2013-07-20 Thread Eric Blake
On 07/19/2013 07:44 PM, Wenchao Xia wrote: > Signed-off-by: Wenchao Xia > --- > monitor.c |8 > 1 files changed, 4 insertions(+), 4 deletions(-) > Reviewed-by: Eric Blake -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org si

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

2013-07-20 Thread Eric Blake
On 07/19/2013 07:44 PM, Wenchao Xia wrote: > Signed-off-by: Wenchao Xia > --- > monitor.c | 18 ++ > 1 files changed, 14 insertions(+), 4 deletions(-) > Reviewed-by: Eric Blake -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvir

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

2013-07-20 Thread Eric Blake
On 07/19/2013 07:44 PM, Wenchao Xia wrote: > 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 >

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

2013-07-20 Thread Eric Blake
On 07/19/2013 07:44 PM, Wenchao Xia wrote: > 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 > completio

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

2013-07-20 Thread Eric Blake
On 07/19/2013 07:44 PM, Wenchao Xia wrote: > 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 wit

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

2013-07-20 Thread Andreas Färber
Am 12.07.2013 06:29, schrieb peter.crosthwa...@xilinx.com: > From: Peter Crosthwaite > > There are a mix of usages of the qemu_fdt_* API calls, some which "some of which" > wish to assert and abort QEMU on failure and some of which wish to do > their own error handling. The latter in more corre

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

2013-07-20 Thread Eric Blake
On 07/19/2013 07:44 PM, Wenchao Xia wrote: > 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 >

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

2013-07-20 Thread Eric Blake
On 07/19/2013 07:44 PM, Wenchao Xia wrote: > 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. s/added to/added too/ > > One change of this function is that, wh

[Qemu-devel] Question on aio_poll

2013-07-20 Thread Alex Bligh
As part of adding timer operations to aio_poll and a clock to AioContext, I am trying to figure out a couple of points on how aio_poll works. This primarily revolves around the flag busy. Firstly, at the end of aio_poll, it has assert(progress || busy); This assert in fact checks nothing, be

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

2013-07-20 Thread Wenchao Xia
于 2013-7-20 19:49, Eric Blake 写道: On 07/19/2013 07:44 PM, Wenchao Xia wrote: 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(). s/convertion/conversion/ Signed-off-by: Wenchao X

[Qemu-devel] [PATCH V6 0/8] add internal snapshot support at block device level

2013-07-20 Thread Wenchao Xia
This series brings internal snapshot support at block devices level, now we have two three methods to do block snapshot lively: 1) backing chain, 2) internal one and 3) drive-back up approach. Comparation: Advantages:Disadvantages: 1)delta data, taken

[Qemu-devel] [PATCH V6 6/8] hmp: add interface hmp_snapshot_blkdev_internal

2013-07-20 Thread Wenchao Xia
Signed-off-by: Wenchao Xia --- hmp-commands.hx | 19 +-- hmp.c | 10 ++ hmp.h |1 + 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/hmp-commands.hx b/hmp-commands.hx index 8c6b91a..039c401 100644 --- a/hmp-commands.hx +++ b/hmp-c

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

2013-07-20 Thread Wenchao Xia
Unlike savevm, the qmp_transaction interface will not generate snapshot name automatically, saving trouble to return information of the new created snapshot. Although qcow2 support storing multiple snapshots with same name but different ID, here it will fail when an snapshot with that name already

[Qemu-devel] [PATCH V6 1/8] snapshot: new function bdrv_snapshot_find_by_id_and_name()

2013-07-20 Thread Wenchao Xia
To make it clear about id and name in searching, add this API to distinguish them. Caller can choose to search by id or name, *errp will be set only for exception. Some code are modified based on Pavel's patch. Signed-off-by: Wenchao Xia Signed-off-by: Pavel Hrdina --- block/snapshot.c

[Qemu-devel] [PATCH V6 2/8] snapshot: distinguish id and name in snapshot delete

2013-07-20 Thread Wenchao Xia
Snapshot creation actually already distinguish id and name since it take a structured parameter *sn, but delete can't. Later an accurate delete is needed in qmp_transaction abort and blockdev-snapshot-delete-sync, so change its prototype. Also *errp is added to tip error, but return value is kepted

[Qemu-devel] [PATCH V6 7/8] hmp: add interface hmp_snapshot_delete_blkdev_internal

2013-07-20 Thread Wenchao Xia
It is hard to make both id and name optional in hmp console as qmp interface, so this interface require user to specify name. Signed-off-by: Wenchao Xia --- hmp-commands.hx | 18 ++ hmp.c | 12 hmp.h |1 + 3 files changed, 31 insertions(+)

[Qemu-devel] [PATCH V6 5/8] qmp: add interface blockdev-snapshot-delete-internal-sync

2013-07-20 Thread Wenchao Xia
This interface use id and name as optional parameters, to handle the case that one image contain multiple snapshots with same name which may be '', but with different id. Adding parameter id is for historical compatiability reason, and that case is not possible in qemu's new interface for internal

[Qemu-devel] [PATCH V6 4/8] qmp: add interface blockdev-snapshot-internal-sync

2013-07-20 Thread Wenchao Xia
Snapshot ID can't be specified in this interface. Signed-off-by: Wenchao Xia --- blockdev.c | 13 + qapi-schema.json | 20 qmp-commands.hx | 29 + 3 files changed, 62 insertions(+), 0 deletions(-) diff --git a/blockdev.c

[Qemu-devel] [PATCH V6 8/8] qemu-iotests: add 056 internal snapshot for block device test case

2013-07-20 Thread Wenchao Xia
Create in transaction and deletion in single command will be tested. Signed-off-by: Wenchao Xia --- tests/qemu-iotests/056 | 259 tests/qemu-iotests/056.out |5 + tests/qemu-iotests/group |1 + 3 files changed, 265 insertions(+), 0 dele

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

2013-07-20 Thread Andreas Färber
Am 19.07.2013 20:59, schrieb 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: > Hi Anthony, > > the patch fixes a build regression which

[Qemu-devel] [PATCH] qemu-options: mention C-a h in the -nographic doc

2013-07-20 Thread Ramkumar Ramachandra
Otherwise, a new user will be wondering how to switch between the console and monitor. Cc: Anthony Liguori Cc: Stefan Hajnoczi Cc: Markus Armbruster Cc: Marcelo Tosatti Cc: Peter Maydell Signed-off-by: Ramkumar Ramachandra --- qemu-options.hx | 3 ++- 1 file changed, 2 insertions(+), 1 dele

[Qemu-devel] [PATCHv2] [RFC 2/7] aio / timers: qemu-timer.c utility functions and add list of clocks

2013-07-20 Thread Alex Bligh
Add utility functions to qemu-timer.c for nanosecond timing. Ensure we keep track of all QEMUClocks on a list. Add qemu_clock_deadline_ns and qemu_clock_deadline_all_ns to calculate deadlines to nanosecond accuracy. Add utility function qemu_soonest_timeout to calculate soonest deadline. Add qe

[Qemu-devel] [PATCHv2] [RFC 0/7] aio / timers: Add AioContext timers and use ppoll

2013-07-20 Thread Alex Bligh
This patch series adds support for timers attached to an AioContext clock which get called within aio_poll. In doing so it removes alarm timers and moves to use ppoll where possible. This patch set 'sort of' passes make check (see below for caveat) including a new test harness for the aio timers,

[Qemu-devel] [PATCHv2] [RFC 4/7] aio / timers: Make qemu_run_timers and qemu_run_all_timers return progress

2013-07-20 Thread Alex Bligh
Make qemu_run_timers and qemu_run_all_timers return progress so that aio_poll etc. can determine whether a timer has been run. Signed-off-by: Alex Bligh --- include/qemu/timer.h |4 ++-- qemu-timer.c | 17 +++-- 2 files changed, 13 insertions(+), 8 deletions(-) diff --

[Qemu-devel] [PATCHv2] [RFC 3/7] aio / timers: add ppoll support with qemu_g_poll_ns

2013-07-20 Thread Alex Bligh
Add qemu_g_poll_ns which works like g_poll but takes a nanosecond timeout. Signed-off-by: Alex Bligh --- configure| 19 +++ qemu-timer.c | 24 2 files changed, 43 insertions(+) diff --git a/configure b/configure index 9e1cd19..b491c00 100755 ---

[Qemu-devel] [PATCHv2] [RFC 7/7] aio / timers: Add test harness for AioContext timers

2013-07-20 Thread Alex Bligh
Add a test harness for AioContext timers. The g_source equivalent is unsatisfactory as it suffers from false wakeups. Signed-off-by: Alex Bligh --- tests/test-aio.c | 124 +- 1 file changed, 123 insertions(+), 1 deletion(-) diff --git a/tests

[Qemu-devel] [PATCHv2] [RFC 5/7] aio / timers: Add a clock to AioContext

2013-07-20 Thread Alex Bligh
Add a clock to each AioContext and delete it when freed. Signed-off-by: Alex Bligh --- async.c |2 ++ include/block/aio.h |5 + 2 files changed, 7 insertions(+) diff --git a/async.c b/async.c index 90fe906..0d41431 100644 --- a/async.c +++ b/async.c @@ -177,6 +177,7 @@ a

[Qemu-devel] [PATCHv2] [RFC 1/7] aio / timers: Remove alarm timers

2013-07-20 Thread Alex Bligh
Remove alarm timers from qemu-timers.c in anticipation of using timeouts for g_poll / p_poll instead. Signed-off-by: Alex Bligh --- include/qemu/timer.h |2 - main-loop.c |4 - qemu-timer.c | 501 +- vl.c |

[Qemu-devel] [PATCHv2] [RFC 6/7] aio / timers: Switch to ppoll, run AioContext timers in aio_poll/aio_dispatch

2013-07-20 Thread Alex Bligh
Switch to ppoll (or rather qemu_g_poll_ns which will use ppoll if available). Set timeouts for aio, g_source, and mainloop from earliest timer deadline. Run timers for AioContext (only) in aio_poll/aio_dispatch. Signed-off-by: Alex Bligh --- aio-posix.c | 20 +--- aio-win32.c

[Qemu-devel] Multiboot using -kernel and -initrd stopped working

2013-07-20 Thread Jens Nyberg
Hi! I develop my own operating system and I have been using this command to start my operating system: $ qemu-system-x86_64 -kernel fudge -initrd initrd.tar I just recently upgraded the qemu package for arch linux and now this does not seem to work anymore. I get this error message: Error while

Re: [Qemu-devel] Multiboot using -kernel and -initrd stopped working

2013-07-20 Thread Jens Nyberg
I have some information to go on: The problem occurs because of a failed call to rom_copy from hw/i386/multiboot.c I print debugged some values: ELF_LOW: 0x10 ELF_HIGH: 0x14c578 MH_LOAD_ADDR: 0x10 MH_KERNEL_SIZE: 0x4c578 MH_ENTRY_ADDR: 0x1c COPY SIZE: 0x4210 The return value from ro

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

2013-07-20 Thread Edgar E. Iglesias
On Sat, Jul 20, 2013 at 12:11:34PM +0200, Paolo Bonzini wrote: > Il 20/07/2013 03:11, Alexey Kardashevskiy ha scritto: > > 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 explai

Re: [Qemu-devel] Multiboot using -kernel and -initrd stopped working

2013-07-20 Thread Jens Nyberg
Ok, another update. The problem seems to be that in rom_copy (hw/core/loader.c:776) where it iterates over all the roms it will fail at: if (!rom->data) { continue } For the second program header. This means that it hasnt been able to allocate memory for that header because rom->data is suppo

Re: [Qemu-devel] [PATCH] linux-user: Fix target_stat and target_stat64 for OpenRISC

2013-07-20 Thread Jia Liu
Hi Peter, On Fri, Jul 19, 2013 at 5:27 PM, Peter Maydell wrote: > On 19 July 2013 01:25, Jia Liu wrote: >> Hi Peter, >> >> On Thu, Jul 18, 2013 at 6:18 PM, Peter Maydell >> wrote: >>> Ping? >>> >> >> Thank you, it looks good to me, please push it. > > The usual way to say this is to add your r

[Qemu-devel] ruk.ansari

2013-07-20 Thread Rukhsana Ansari
http://saborandlight.com/rtsujf/bmdlke.omlathbtcxphzsxe ruk.ansari 7/21/2013 6:38:32 AM