Re: [Qemu-devel] [RFC PATCH COLO v2 01/13] docs: block replication's description

2015-04-02 Thread Fam Zheng
On Fri, 04/03 10:35, Wen Congyang wrote: > On 03/26/2015 02:31 PM, Fam Zheng wrote: > > On Wed, 03/25 17:36, Wen Congyang wrote: > >> Signed-off-by: Wen Congyang > >> Signed-off-by: Paolo Bonzini > >> Signed-off-by: Yang Hongyang > >> Signed-off-by: zhanghailiang > >> Signed-off-by: Gonglei >

Re: [Qemu-devel] block-commit & dropping privs

2015-04-02 Thread Jeff Cody
On Thu, Apr 02, 2015 at 07:07:23AM -0600, Eric Blake wrote: > On 04/02/2015 06:04 AM, Michael Tokarev wrote: > > 02.04.2015 14:24, Kevin Wolf wrote: > > [] > >>> But overall, I think qemu-system should not modify backing > >>> file name in this case. > >> > >> So you would leave the backing file wi

Re: [Qemu-devel] [PATCH v2 for-2.3] virtio-blk: correctly dirty guest memory

2015-04-02 Thread Li Zhijian
On 04/03/2015 01:50 AM, Paolo Bonzini wrote: After qemu_iovec_destroy, the QEMUIOVector's size is zeroed and the zero size ultimately is used to compute virtqueue_push's len argument. Therefore, reads from virtio-blk devices did not migrate their results correctly. (Writes were okay). Save the

Re: [Qemu-devel] block-commit & dropping privs

2015-04-02 Thread Jeff Cody
On Thu, Apr 02, 2015 at 01:24:02PM +0200, Kevin Wolf wrote: > Am 02.04.2015 um 12:58 hat Michael Tokarev geschrieben: > > 01.04.2015 15:34, Kevin Wolf wrote: > > [] > > > Overriding the backing file should work like this: > > > > > > -drive file=...,backing.file.filename=/dev/fdset/2 > > > >

[Qemu-devel] [ANNOUNCE] QEMU 2.3.0-rc2 is now available

2015-04-02 Thread Michael Roth
Hello, On behalf of the QEMU Team, I'd like to announce the availability of the third release candidate for the QEMU 2.3 release. This release is meant for testing purposes and should not be used in a production environment. http://wiki.qemu.org/download/qemu-2.3.0-rc2.tar.bz2 A number of sma

Re: [Qemu-devel] [PATCH] virtio-blk: correctly dirty guest memory

2015-04-02 Thread Bin Wu
On 2015/4/3 0:26, Fam Zheng wrote: > On Thu, 04/02 17:21, Paolo Bonzini wrote: >> >> >> On 02/04/2015 17:16, Fam Zheng wrote: > After qemu_iovec_destroy, the QEMUIOVector's size is zeroed and > the zero size ultimately is used to compute virtqueue_push's len > argument. The

Re: [Qemu-devel] [RFC PATCH COLO v2 01/13] docs: block replication's description

2015-04-02 Thread Wen Congyang
On 03/26/2015 02:31 PM, Fam Zheng wrote: > On Wed, 03/25 17:36, Wen Congyang wrote: >> Signed-off-by: Wen Congyang >> Signed-off-by: Paolo Bonzini >> Signed-off-by: Yang Hongyang >> Signed-off-by: zhanghailiang >> Signed-off-by: Gonglei >> --- >> docs/block-replication.txt | 147 >> +

Re: [Qemu-devel] [Migration Bug? ] Occasionally, the content of VM's memory is inconsistent between Source and Destination of migration

2015-04-02 Thread Wen Congyang
On 04/02/2015 09:17 PM, Paolo Bonzini wrote: > > > On 02/04/2015 11:14, Wen Congyang wrote: >> From ebc024702dd3147e0cbdfd173c599103dc87796c Mon Sep 17 00:00:00 2001 >> From: Wen Congyang >> Date: Thu, 2 Apr 2015 16:28:17 +0800 >> Subject: [PATCH] fix qiov size >> >> Signed-off-by: Wen Congyang

Re: [Qemu-devel] [PATCH] virtio-blk: correctly dirty guest memory

2015-04-02 Thread Wen Congyang
On 04/03/2015 12:26 AM, Fam Zheng wrote: > On Thu, 04/02 17:21, Paolo Bonzini wrote: >> >> >> On 02/04/2015 17:16, Fam Zheng wrote: > After qemu_iovec_destroy, the QEMUIOVector's size is zeroed and > the zero size ultimately is used to compute virtqueue_push's len > argument

[Qemu-devel] [PATCH v2] tcg: optimise memory layout of TCGTemp

2015-04-02 Thread Emilio G. Cota
This brings down the size of the struct from 56 to 32 bytes on 64-bit, and to 20 bytes on 32-bit. This leads to memory savings: Before: $ find . -name 'tcg.o' | xargs size textdata bss dec hex filename 41131 29800 88 71019 1156b ./aarch64-softmmu/tcg/tcg.o 37969

Re: [Qemu-devel] [PATCH] translate-all: use bitmap helpers for PageDesc's bitmap

2015-04-02 Thread Emilio G. Cota
On Sat, Mar 21, 2015 at 02:25:42 -0400, Emilio G. Cota wrote: > Note that this test > if (b & ((1 << len) - 1)) > can be simplified to > if (b & 1) > , since we know that iff the first bit of a tb is set, > all other bits from that tb are set too. > > Signed-off-by: Emilio G. Cota > -

Re: [Qemu-devel] [PATCH v3 6/6] virtio-input: evdev passthrough

2015-04-02 Thread Marc-André Lureau
Hi On Thu, Mar 26, 2015 at 12:26 PM, Gerd Hoffmann wrote: > This allows to assign host input devices to the guest: > > qemu -device virto-input-host-pci,evdev=/dev/input/event > > nitpicking, virto/virtio The guest gets exclusive access to the input device, so be careful > with assigning the ke

Re: [Qemu-devel] [PATCH RFC 02/19] qapi: Fix C identifiers generated for names containing '.'

2015-04-02 Thread Eric Blake
On 04/02/2015 11:28 AM, Markus Armbruster wrote: > c_fun() maps '.' to '_', c_var() doesn't. Nothing prevents '.' in > QAPI names that get passed to c_var(). > > Which QAPI names get passed to c_fun(), to c_var(), or to both is not > obvious. Names of command parameters and struct type members g

[Qemu-devel] [Bug 1439800] Re: GTK fullscreen mode start stretched but fixes after leaving and returning full screen mode

2015-04-02 Thread Viniciusferrao
** Tags removed: gkt ** Tags added: gtk ** Description changed: I'm running QEMU 2.2.91 compiled directly from git and starting QEMU - with the -full-screen option. The guest OS is Windows 8.1 using the VGA - driver from QEMU. + with the -full-screen option using the GTK display. The guest OS i

[Qemu-devel] [Bug 1439800] [NEW] GTK fullscreen mode start stretched but fixes after leaving and returning full screen mode

2015-04-02 Thread Viniciusferrao
Public bug reported: I'm running QEMU 2.2.91 compiled directly from git and starting QEMU with the -full-screen option. The guest OS is Windows 8.1 using the VGA driver from QEMU. The image can be fixed leaving the full-screen mode and returning it back. So it appears that QEMU loses the informat

Re: [Qemu-devel] [PATCH RFC 01/19] tests: Add missing dependencies on $(qapi-py)

2015-04-02 Thread Eric Blake
On 04/02/2015 11:28 AM, Markus Armbruster wrote: > Signed-off-by: Markus Armbruster > --- > tests/Makefile | 8 > 1 file changed, 4 insertions(+), 4 deletions(-) Reviewed-by: Eric Blake -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt

[Qemu-devel] [PATCH] qapi: Accept 'null' in QMP

2015-04-02 Thread Eric Blake
We document that in QMP, the client may send any json-value for the optional "id" key, and then return that same value on reply (both success and failures, insofar as the failure happened after parsing the id). [Note that the output may not be identical to the input, as whitespace may change and s

Re: [Qemu-devel] [PATCH] qtest: Add assertion that required environment variable is set

2015-04-02 Thread Ed Maste
On 1 April 2015 at 18:45, Peter Maydell wrote: > On 1 April 2015 at 22:14, Paolo Bonzini wrote: >> On 01/04/2015 23:06, John Snow wrote: >>> >>> if (qemu == NULL) { >>> fprintf(stderr, "..."); >>> g_assert_not_reached(); >>> } >>> >>> Though that does read a little strangely. ("Here's a nice

Re: [Qemu-devel] [PATCH RFC 00/19] qapi: QMP introspection

2015-04-02 Thread Eric Blake
On 04/02/2015 11:28 AM, Markus Armbruster wrote: > Dring up your tea, here comes the introspection series. > > * PATCH 01-15: As usual when I touch the qapi code generators, I need > double-digit patches just to get the mess cleaned up enough to admit > change :) > > * PATCH 16-18: Fix the JS

Re: [Qemu-devel] [PATCH for-2.4 0/5] chardev: Add IRC char driver

2015-04-02 Thread Markus Armbruster
I'd go for a Tested-by if was social enough to let #qemu jabber to my monitor. Maybe one of our younger, facebook-hardened contributors?

Re: [Qemu-devel] [PATCH v2 for-2.3] virtio-blk: correctly dirty guest memory

2015-04-02 Thread Michael S. Tsirkin
On Thu, Apr 02, 2015 at 08:53:04PM +0200, Paolo Bonzini wrote: > > > On 02/04/2015 20:46, Michael S. Tsirkin wrote: > > Oh, true in fact. It might be a good idea to add something like this to > > the commit log: > > > > Additionally, virtio spec requires that device writes at least > >

Re: [Qemu-devel] [PATCH v2 for-2.3] virtio-blk: correctly dirty guest memory

2015-04-02 Thread Paolo Bonzini
On 02/04/2015 20:46, Michael S. Tsirkin wrote: > Oh, true in fact. It might be a good idea to add something like this to > the commit log: > > Additionally, virtio spec requires that device writes at least > len bytes to descriptor - so that driver can rely on > bytes 0..len-1

Re: [Qemu-devel] [PATCH v2 for-2.3] virtio-blk: correctly dirty guest memory

2015-04-02 Thread Michael S. Tsirkin
On Thu, Apr 02, 2015 at 07:57:22PM +0200, Paolo Bonzini wrote: > > > On 02/04/2015 19:54, Michael S. Tsirkin wrote: > > On Thu, Apr 02, 2015 at 07:50:44PM +0200, Paolo Bonzini wrote: > >> After qemu_iovec_destroy, the QEMUIOVector's size is zeroed and > >> the zero size ultimately is used to comp

Re: [Qemu-devel] [PATCH v2 for-2.3] virtio-blk: correctly dirty guest memory

2015-04-02 Thread Paolo Bonzini
On 02/04/2015 19:54, Michael S. Tsirkin wrote: > On Thu, Apr 02, 2015 at 07:50:44PM +0200, Paolo Bonzini wrote: >> After qemu_iovec_destroy, the QEMUIOVector's size is zeroed and >> the zero size ultimately is used to compute virtqueue_push's len >> argument. Therefore, reads from virtio-blk dev

Re: [Qemu-devel] [PATCH v2 for-2.3] virtio-blk: correctly dirty guest memory

2015-04-02 Thread Michael S. Tsirkin
On Thu, Apr 02, 2015 at 07:50:44PM +0200, Paolo Bonzini wrote: > After qemu_iovec_destroy, the QEMUIOVector's size is zeroed and > the zero size ultimately is used to compute virtqueue_push's len > argument. Therefore, reads from virtio-blk devices did not > migrate their results correctly. (Writ

[Qemu-devel] [PATCH v2 for-2.3] virtio-blk: correctly dirty guest memory

2015-04-02 Thread Paolo Bonzini
After qemu_iovec_destroy, the QEMUIOVector's size is zeroed and the zero size ultimately is used to compute virtqueue_push's len argument. Therefore, reads from virtio-blk devices did not migrate their results correctly. (Writes were okay). Save the size in virtio_blk_handle_request, and use it

[Qemu-devel] [PATCH RFC 01/19] tests: Add missing dependencies on $(qapi-py)

2015-04-02 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- tests/Makefile | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/Makefile b/tests/Makefile index 9877a5b..64113a9 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -295,22 +295,22 @@ tests/test-vmstate$(EXESUF): tests/test-vms

[Qemu-devel] [PATCH RFC 05/19] qapi: Simplify c_enum_const()

2015-04-02 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- scripts/qapi.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/scripts/qapi.py b/scripts/qapi.py index e1c5ef2..3601d1d 100644 --- a/scripts/qapi.py +++ b/scripts/qapi.py @@ -906,6 +906,4 @@ def camel_to_upper(value): return new_na

[Qemu-devel] [PATCH] openrisc: terminate qemu process upon receiving a halt signal.

2015-04-02 Thread Hesham ALMatary
or1ksim simulator currently handles "l.nop 0xC" instruction as a halt signal. Do the same for QEMU. Signed-off-by: Hesham ALMatary --- target-openrisc/translate.c | 5 + 1 file changed, 5 insertions(+) diff --git a/target-openrisc/translate.c b/target-openrisc/translate.c index dc76789..5f

[Qemu-devel] [PATCH RFC 04/19] qapi: Rename generate_enum_full_value() to c_enum_const()

2015-04-02 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- scripts/qapi-event.py | 5 ++--- scripts/qapi-types.py | 6 +++--- scripts/qapi-visit.py | 4 ++-- scripts/qapi.py | 6 +++--- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/scripts/qapi-event.py b/scripts/qapi-event.py index 47dc041..7

[Qemu-devel] [PATCH] openrisc: terminate qemu process upon receiving a halt signal.

2015-04-02 Thread Hesham ALMatary
or1ksim simulator currently handles "l.nop 0xC" instruction as a halt signal. Do the same for QEMU. Signed-off-by: Hesham ALMatary --- target-openrisc/translate.c | 5 + 1 file changed, 5 insertions(+) diff --git a/target-openrisc/translate.c b/target-openrisc/translate.c index dc76789..b0

[Qemu-devel] [PATCH RFC 13/19] qapi: Factor open_output(), close_output() out of generators

2015-04-02 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- scripts/qapi-commands.py | 101 +-- scripts/qapi-event.py| 85 --- scripts/qapi-types.py| 81 - scripts/qapi-visit.py| 101 +++

[Qemu-devel] [PATCH RFC 08/19] qapi: qapi-event.py option -b does nothing, drop it

2015-04-02 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- Makefile | 2 +- scripts/qapi-event.py | 7 ++- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 88bce56..0a5bc09 100644 --- a/Makefile +++ b/Makefile @@ -273,7 +273,7 @@ $(qapi-modules) $(SRC_PATH)/scri

[Qemu-devel] [PATCH RFC 02/19] qapi: Fix C identifiers generated for names containing '.'

2015-04-02 Thread Markus Armbruster
c_fun() maps '.' to '_', c_var() doesn't. Nothing prevents '.' in QAPI names that get passed to c_var(). Which QAPI names get passed to c_fun(), to c_var(), or to both is not obvious. Names of command parameters and struct type members get passed to c_var(). c_var() strips a leading '*', but th

[Qemu-devel] [PATCH RFC 10/19] qapi: Factor parse_command_line() out of the generators

2015-04-02 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- scripts/qapi-commands.py | 34 +++--- scripts/qapi-event.py| 32 +--- scripts/qapi-types.py| 36 scripts/qapi-visit.py| 35

[Qemu-devel] [PATCH RFC 16/19] qobject: Clean up around qtype_code

2015-04-02 Thread Markus Armbruster
QTYPE_NONE is a sentinel value. No QObject has this type code. Document it properly. Fix dump_qobject() to abort() on QTYPE_NONE, just like for any other invalid type code. Fix to_json() to abort() on all invalid type codes, not just QTYPE_MAX. Clean up Property member qtype's type: it's a qtyp

[Qemu-devel] [PATCH RFC 15/19] qapi: Inline gen_command_decl_prologue(), gen_command_def_prologue()

2015-04-02 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- scripts/qapi-commands.py | 58 1 file changed, 24 insertions(+), 34 deletions(-) diff --git a/scripts/qapi-commands.py b/scripts/qapi-commands.py index 10fa570..bf41a78 100644 --- a/scripts/qapi-commands.py +++

[Qemu-devel] [PATCH RFC 03/19] qapi: Rename _generate_enum_string() to camel_to_upper()

2015-04-02 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- scripts/qapi.py | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/qapi.py b/scripts/qapi.py index 6d102df..a154272 100644 --- a/scripts/qapi.py +++ b/scripts/qapi.py @@ -477,7 +477,7 @@ def check_union(expr, expr_info):

[Qemu-devel] [PATCH RFC 14/19] qapi: Drop pointless flush() before close()

2015-04-02 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- scripts/qapi.py | 4 1 file changed, 4 deletions(-) diff --git a/scripts/qapi.py b/scripts/qapi.py index 480d638..e645623 100644 --- a/scripts/qapi.py +++ b/scripts/qapi.py @@ -982,9 +982,5 @@ def close_output(fdef, fdecl): fdecl.write(''' #endif

[Qemu-devel] [PATCH RFC 19/19] qapi: New QMP command query-schema for QMP schema introspection

2015-04-02 Thread Markus Armbruster
Caution, rough edges. qapi/introspect.json defines the introspection schema. It should do for uses other than QMP. FIXME it's almost entirely devoid of comments. The introspection schema does not reflect all the rules and restrictions that apply to QAPI schemata. A valid QAPI schema has an intr

[Qemu-devel] [PATCH RFC 11/19] qapi: Fix generators to report command line errors decently

2015-04-02 Thread Markus Armbruster
Report to stderr, prefix with the program name. Also reject extra arguments. Signed-off-by: Markus Armbruster --- scripts/qapi.py | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/qapi.py b/scripts/qapi.py index 1d8a3e5..c952c26 100644 --- a/scripts/qapi.py +++ b/

[Qemu-devel] [PATCH RFC 12/19] qapi: Turn generators' mandatory option -i into an argument

2015-04-02 Thread Markus Armbruster
Mandatory option is silly, and the error handling is missing: the programs crash when -i isn't supplied. Make it an argument, and check it properly. Signed-off-by: Markus Armbruster --- Makefile| 14 +++--- scripts/qapi.py | 10 -- tests/Makefile | 8 3 files

[Qemu-devel] [PATCH RFC 07/19] qapi: Move camel_to_upper(), c_enum_const() to closely related code

2015-04-02 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- scripts/qapi.py | 50 +- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/scripts/qapi.py b/scripts/qapi.py index 71eee06..c963249 100644 --- a/scripts/qapi.py +++ b/scripts/qapi.py @@ -682,6 +682,

[Qemu-devel] [PATCH RFC 17/19] qobject: Add a special null QObject

2015-04-02 Thread Markus Armbruster
I'm going to fix the JSON parser to recognize null. The obvious representation of JSON null as (QObject *)NULL doesn't work, because the parser already uses it as an error value. Perhaps we should change it to free NULL for null, but that's more than I can do right now. Create a special null QOb

[Qemu-devel] [PATCH RFC 09/19] qapi: qapi-commands.py option --type is unused, drop it

2015-04-02 Thread Markus Armbruster
Anything but --type sync (which is the default) suppresses output entirely, which makes no sense. Dates back to the initial commit c17d990. Commit message says "Currently only generators for synchronous qapi/qmp functions are supported", so maybe output other than "synchronous qapi/qmp" was plann

[Qemu-devel] [PATCH RFC 06/19] qapi: Use c_enum_const() in generate_alternate_qtypes()

2015-04-02 Thread Markus Armbruster
Missed in commit b0b5819. Signed-off-by: Markus Armbruster --- scripts/qapi-types.py | 6 ++ scripts/qapi.py | 11 --- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/scripts/qapi-types.py b/scripts/qapi-types.py index 1d60501..7782beb 100644 --- a/scripts/qapi

[Qemu-devel] [PATCH RFC 18/19] json-parser: Fix to recognize null

2015-04-02 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- qobject/json-parser.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qobject/json-parser.c b/qobject/json-parser.c index 4288267..717cb8f 100644 --- a/qobject/json-parser.c +++ b/qobject/json-parser.c @@ -561,6 +561,8 @@ static QObject *parse_keyword(JS

[Qemu-devel] [PATCH RFC 00/19] qapi: QMP introspection

2015-04-02 Thread Markus Armbruster
Dring up your tea, here comes the introspection series. * PATCH 01-15: As usual when I touch the qapi code generators, I need double-digit patches just to get the mess cleaned up enough to admit change :) * PATCH 16-18: Fix the JSON parser to recognize null. With an axe. * PATCH 19: Introsp

Re: [Qemu-devel] [Qemu-block] [PATCH v4 18/20] iotests: add QMP event waiting queue

2015-04-02 Thread John Snow
On 04/02/2015 09:57 AM, Stefan Hajnoczi wrote: On Fri, Mar 20, 2015 at 03:17:01PM -0400, John Snow wrote: +# Test if 'match' is a recursive subset of 'event' +def event_match(event, match = None): Not worth respinning but PEP8 says there should be no spaces around the '=' for keyword argumen

Re: [Qemu-devel] [PATCH] thread-pool: clean up thread_pool_completion_bh()

2015-04-02 Thread Paolo Bonzini
On 02/04/2015 18:39, Stefan Hajnoczi wrote: > This patch simplifies thread_pool_completion_bh(). > > The function first checks elem->state: > > if (elem->state != THREAD_DONE) { > continue; > } > > It then goes on to check elem->state == THREAD_DONE although we already > know this mu

Re: [Qemu-devel] thread-pool.c race condition?

2015-04-02 Thread Paolo Bonzini
On 02/04/2015 18:47, Stefan Hajnoczi wrote: > My initial speculation was that the qemu_bh_schedule(): > > if (bh->scheduled) > return; > > Check is causing us to skip BH invocations. > > When I look at the code the lack of explicit barriers or atomic > operations for bh->scheduled itself i

Re: [Qemu-devel] [RFC] Intermediate block mirroring

2015-04-02 Thread Eric Blake
On 04/02/2015 07:28 AM, Alberto Garcia wrote: > Hi, > > I'm interested in adding the possibility to mirror an intermediate > node in a disk image chain, but I would like to have some feedback > before sending any patches. > > The goal would be to convert this: > >[A] -> [B] -> [C] -> [D] >

Re: [Qemu-devel] [Qemu-block] [PATCH v4 10/20] qmp: Add support of "dirty-bitmap" sync mode for drive-backup

2015-04-02 Thread John Snow
On 04/02/2015 08:44 AM, Stefan Hajnoczi wrote: On Fri, Mar 20, 2015 at 03:16:53PM -0400, John Snow wrote: +} else if (job->sync_mode == MIRROR_SYNC_MODE_DIRTY_BITMAP) { +/* Dirty Bitmap sync has a slightly different iteration method */ +HBitmapIter hbi; +int64_t sec

Re: [Qemu-devel] [RFC PATCH] vl.c: add -semihosting-config "arg" sub-argument

2015-04-02 Thread Liviu Ionescu
> On 02 Apr 2015, at 17:27, Matthew Fortune wrote: > > Liviu Ionescu writes: >> for completeness: >> >> ilg-mbp:gnuarmeclipse-qemu.git ilg$ "/Applications/GNU ARM >> Eclipse/QEMU/2.2.91-20150402-dev/bin/qemu-system-gnuarmeclipse" - >> verbose -machine STM32-H103 -gdb tcp::1234 -semihosting

Re: [Qemu-devel] thread-pool.c race condition?

2015-04-02 Thread Stefan Hajnoczi
On Thu, Apr 2, 2015 at 5:43 PM, Paolo Bonzini wrote: > On 02/04/2015 18:26, Stefan Hajnoczi wrote: >> John Snow has reported that qemu-io can hang when the host is under >> heavy load. He made the following observations in gdb: >> >> 1. The program is sitting in aio_poll() (called by bdrv_prwv_co

Re: [Qemu-devel] thread-pool.c race condition?

2015-04-02 Thread Stefan Hajnoczi
On Thu, Apr 2, 2015 at 5:43 PM, Paolo Bonzini wrote: > On 02/04/2015 18:26, Stefan Hajnoczi wrote: >> John Snow has reported that qemu-io can hang when the host is under >> heavy load. He made the following observations in gdb: >> >> 1. The program is sitting in aio_poll() (called by bdrv_prwv_co

Re: [Qemu-devel] thread-pool.c race condition?

2015-04-02 Thread John Snow
On 04/02/2015 12:43 PM, Paolo Bonzini wrote: On 02/04/2015 18:26, Stefan Hajnoczi wrote: John Snow has reported that qemu-io can hang when the host is under heavy load. He made the following observations in gdb: 1. The program is sitting in aio_poll() (called by bdrv_prwv_co()) waiting for

Re: [Qemu-devel] thread-pool.c race condition?

2015-04-02 Thread Paolo Bonzini
On 02/04/2015 18:26, Stefan Hajnoczi wrote: > John Snow has reported that qemu-io can hang when the host is under > heavy load. He made the following observations in gdb: > > 1. The program is sitting in aio_poll() (called by bdrv_prwv_co()) > waiting for request completion. > > 2. The thread

[Qemu-devel] [PATCH] thread-pool: clean up thread_pool_completion_bh()

2015-04-02 Thread Stefan Hajnoczi
This patch simplifies thread_pool_completion_bh(). The function first checks elem->state: if (elem->state != THREAD_DONE) { continue; } It then goes on to check elem->state == THREAD_DONE although we already know this must be the case. The QLIST_REMOVE() is duplicated down both branch

Re: [Qemu-devel] [PATCH] virtio-blk: correctly dirty guest memory

2015-04-02 Thread Paolo Bonzini
On 02/04/2015 18:26, Fam Zheng wrote: > There is another problem with your patch - read_size is not initialized in > non-RW paths like scsi and flush. Right, but... > I think the optimization for write is a separate thing, though. Shouldn't > below > patch already fix the migration issue? ...

[Qemu-devel] thread-pool.c race condition?

2015-04-02 Thread Stefan Hajnoczi
John Snow has reported that qemu-io can hang when the host is under heavy load. He made the following observations in gdb: 1. The program is sitting in aio_poll() (called by bdrv_prwv_co()) waiting for request completion. 2. The thread pool has a ThreadPoolElement with ->state == THREAD_DONE. T

Re: [Qemu-devel] [PATCH] virtio-blk: correctly dirty guest memory

2015-04-02 Thread Fam Zheng
On Thu, 04/02 17:21, Paolo Bonzini wrote: > > > On 02/04/2015 17:16, Fam Zheng wrote: > > >> After qemu_iovec_destroy, the QEMUIOVector's size is zeroed and > > >> the zero size ultimately is used to compute virtqueue_push's len > > >> argument. Therefore, reads from virtio-blk de

Re: [Qemu-devel] [Qemu-block] [PATCH v4 15/20] block: Resize bitmaps on bdrv_truncate

2015-04-02 Thread John Snow
On 04/02/2015 09:37 AM, Stefan Hajnoczi wrote: On Fri, Mar 20, 2015 at 03:16:58PM -0400, John Snow wrote: +void hbitmap_truncate(HBitmap *hb, uint64_t size) +{ +bool shrink; +unsigned i; +uint64_t num_elements = size; +uint64_t old; + +/* Size comes in as logical elements,

Re: [Qemu-devel] [PULL 0/6] More changes for QEMU 2.3.0-rc2

2015-04-02 Thread Peter Maydell
On 2 April 2015 at 15:21, Paolo Bonzini wrote: > The following changes since commit 11f10cf8057dd5392171da061381f6c890b1e21d: > > hw/arm/vexpress: Don't double-free flash filename (2015-04-02 12:11:07 > +0100) > > are available in the git repository at: > > git://github.com/bonzini/qemu.git t

Re: [Qemu-devel] [PATCH] virtio-blk: correctly dirty guest memory

2015-04-02 Thread Paolo Bonzini
On 02/04/2015 17:16, Fam Zheng wrote: > >> After qemu_iovec_destroy, the QEMUIOVector's size is zeroed and > >> the zero size ultimately is used to compute virtqueue_push's len > >> argument. Therefore, reads from virtio-blk devices did not > >> migrate their results correctl

[Qemu-devel] [PATCH for-2.3 0/1] fix build problems on SLES11SP3

2015-04-02 Thread Cornelia Huck
This patch fixes building on SLES11SP3 which reports glib version 2.22 but includes a backport of g_get_monotonic_time() - leading to build errors. This patch is a workaround for those glib versions. I verified that it now builds fine on our SLES11SP3 system and on systems with newer glib, but it

[Qemu-devel] [PATCH for-2.3 1/1] glib-compat: fix problems with not-quite glib 2.22

2015-04-02 Thread Cornelia Huck
Commit 89b516d8b9444ece8ccabb322a9389587c7a7b83 ("glib: add compatibility interface for g_get_monotonic_time()") aimed at making qemu build with old glib versions. At least SLES11SP3, however, contains a backport of g_get_monotonic_time() while keeping the reported glib version at 2.22. Let's work

Re: [Qemu-devel] [PATCH] virtio-blk: correctly dirty guest memory

2015-04-02 Thread Fam Zheng
On Thu, 04/02 16:51, Paolo Bonzini wrote: > > > On 02/04/2015 16:39, Fam Zheng wrote: > > On Thu, 04/02 15:37, Paolo Bonzini wrote: > >> After qemu_iovec_destroy, the QEMUIOVector's size is zeroed and > >> the zero size ultimately is used to compute virtqueue_push's len > >> argument. Therefore,

Re: [Qemu-devel] [PATCH v4 11/15] target-s390x: New QMP command query-cpu-model

2015-04-02 Thread Eduardo Habkost
On Thu, Apr 02, 2015 at 09:09:07AM +0200, Michael Mueller wrote: > On Wed, 1 Apr 2015 20:05:24 -0300 > Eduardo Habkost wrote: > > > > > > > > > If you don't want to encode that knowledge in libvirt or other > > > > management software for s390, it looks like you need something like a > > > > "st

[Qemu-devel] [PATCH] sun4m: fix slavio sysctrl and led register sizes

2015-04-02 Thread Mark Cave-Ayland
These were being incorrectly declared as MISC_SIZE (1 byte) rather than 4 bytes and 2 bytes respectively. As a result accesses clamped to the real register size would unexpectedly fail. Signed-off-by: Mark Cave-Ayland CC: Paolo Bonzini --- hw/misc/slavio_misc.c |5 +++-- 1 file changed, 3 i

Re: [Qemu-devel] [Qemu-block] [PATCH v4 00/20] block: transactionless incremental backup series

2015-04-02 Thread Stefan Hajnoczi
On Fri, Mar 20, 2015 at 03:16:43PM -0400, John Snow wrote: > I've run out of cheeky jokes for my cover letters. > > This patchset enables the in-memory part of the incremental backup > feature, without transactional support. > > Support for transactions was separated into a separate series which

Re: [Qemu-devel] [PULL v2 0/5] hw: Contain drive, serial, parallel, net misuse

2015-04-02 Thread Peter Maydell
On 2 April 2015 at 14:35, Markus Armbruster wrote: > Drives defined with if!=none, character devices defined with -serial > and -parallel, network devices defined with -net nic are all for board > initialization to wire up. Board code calls drive_get() or similar to > find them, and creates devic

Re: [Qemu-devel] [PATCH] virtio-blk: correctly dirty guest memory

2015-04-02 Thread Paolo Bonzini
On 02/04/2015 16:39, Fam Zheng wrote: > On Thu, 04/02 15:37, Paolo Bonzini wrote: >> After qemu_iovec_destroy, the QEMUIOVector's size is zeroed and >> the zero size ultimately is used to compute virtqueue_push's len >> argument. Therefore, reads from virtio-blk devices did not >> migrate their

Re: [Qemu-devel] [Qemu-block] [PATCH v4 20/20] iotests: add incremental backup failure recovery test

2015-04-02 Thread Stefan Hajnoczi
On Fri, Mar 20, 2015 at 03:17:03PM -0400, John Snow wrote: > Test the failure case for incremental backups. > > Signed-off-by: John Snow > --- > blockdev.c | 1 - > tests/qemu-iotests/124 | 55 > ++ > tests/qemu-iotests/124.out |

Re: [Qemu-devel] [PATCH] virtio-blk: correctly dirty guest memory

2015-04-02 Thread Fam Zheng
On Thu, 04/02 15:37, Paolo Bonzini wrote: > After qemu_iovec_destroy, the QEMUIOVector's size is zeroed and > the zero size ultimately is used to compute virtqueue_push's len > argument. Therefore, reads from virtio-blk devices did not > migrate their results correctly. (Writes were okay). Can't

Re: [Qemu-devel] glib-compat tales of woe

2015-04-02 Thread Paolo Bonzini
On 02/04/2015 16:32, Cornelia Huck wrote: > > We call our compat wrapper qemu_g_get_monotonic_time and add a helpful > > #define. Not done so far because nobody ever thought it was necessary. :) > > I can do that. I just hope not many more of these crop up :( That would be great, it would be a

Re: [Qemu-devel] glib-compat tales of woe

2015-04-02 Thread Cornelia Huck
On Thu, 02 Apr 2015 15:55:10 +0200 Paolo Bonzini wrote: > > > On 02/04/2015 15:15, Cornelia Huck wrote: > > After some updates were applied on our SLES11SP3 development server, > > current qemu fails to build: > > > > In file included from /home/cohuck/git/qemu/include/qemu-common.h:43, > >

Re: [Qemu-devel] [RFC PATCH] vl.c: add -semihosting-config "arg" sub-argument

2015-04-02 Thread Matthew Fortune
Liviu Ionescu writes: > > On 02 Apr 2015, at 13:36, Leon Alrae wrote: > > > >> How would you pass arguments containing whitespaces via > >> -semihosting-config cmdline without having to reinvent shell within > QEMU? > > > > I missed the fact that you already provided the implementation for > > th

Re: [Qemu-devel] [PATCH v4 19/20] iotests: add simple incremental backup case

2015-04-02 Thread Stefan Hajnoczi
On Fri, Mar 20, 2015 at 03:17:02PM -0400, John Snow wrote: > Signed-off-by: John Snow > --- > tests/qemu-iotests/124 | 153 > + > tests/qemu-iotests/124.out | 4 +- > 2 files changed, 155 insertions(+), 2 deletions(-) > > diff --git a/tests/qemu

[Qemu-devel] [PULL 4/6] util/qemu-config: fix regression of qmp_query_command_line_options

2015-04-02 Thread Paolo Bonzini
From: Marcel Apfelbaum Commit 49d2e64 (machine: remove qemu_machine_opts global list) made machine options specific to machine sub-type, leaving the qemu_machine_opts desc array empty. Sadly this is the place qmp_query_command_line_options is looking for supported options. As a fix for for 2.3 t

[Qemu-devel] [PULL 3/6] target-i386: clear bsp bit when designating bsp

2015-04-02 Thread Paolo Bonzini
From: Nadav Amit Since the BSP bit is writable on real hardware, during reset all the CPUs which were not chosen to be the BSP should have their BSP bit cleared. This fix is required for KVM to work correctly when it changes the BSP bit. An additional fix is required for QEMU tcg to allow softwa

[Qemu-devel] [PULL 6/6] Use $(MAKE) for recursive make

2015-04-02 Thread Paolo Bonzini
From: Ed Maste On BSDs "make" is typically BSD make, while "gmake" is GNU make. Signed-off-by: Ed Maste Message-Id: <142798-21905-1-git-send-email-ema...@freebsd.org> [Fix $(INSTALLER) too as reported by Fam Zheng. - Paolo] Signed-off-by: Paolo Bonzini --- Makefile | 6 +++--- 1 file chan

[Qemu-devel] [PULL 2/6] qga: fitering out -fstack-protector-strong

2015-04-02 Thread Paolo Bonzini
From: Joseph Hindin configure script may add -fstack-protector-strong option instead of -fstack-protector-all, depending on availability ( see commit 63678e17c ). Both options have to by filtered out for qga-vss.dll, otherwise MinGW cross-compilation fails at linking stage. Signed-off-by: Joseph

[Qemu-devel] [PULL 1/6] target-i386: save 64-bit CR3 in 64-bit SMM state save area

2015-04-02 Thread Paolo Bonzini
The x86_64 CR3 register is 64 bits wide, save all of them! Signed-off-by: Paolo Bonzini --- target-i386/smm_helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target-i386/smm_helper.c b/target-i386/smm_helper.c index 58051d3..c62f468 100644 --- a/target-i386/smm_hel

[Qemu-devel] [PULL 0/6] More changes for QEMU 2.3.0-rc2

2015-04-02 Thread Paolo Bonzini
The following changes since commit 11f10cf8057dd5392171da061381f6c890b1e21d: hw/arm/vexpress: Don't double-free flash filename (2015-04-02 12:11:07 +0100) are available in the git repository at: git://github.com/bonzini/qemu.git tags/for-upstream for you to fetch changes up to fb8597bb65eff

[Qemu-devel] [PULL 5/6] kvm-all: Sync dirty-bitmap from kvm before kvm destroy the corresponding dirty_bitmap

2015-04-02 Thread Paolo Bonzini
From: zhanghailiang Sometimes, we destroy the dirty_bitmap in kvm_memory_slot before any sync action occur, this bit in dirty_bitmap will be missed, and which will lead the corresponding dirty pages to be missed in migration. This usually happens when do migration during VM's Start-up or Reboot

[Qemu-devel] [PATCH v2 3/3] vhost: set vring endianness for legacy virtio

2015-04-02 Thread Greg Kurz
Legacy virtio is native endian: if the guest and host endianness differ, we have to tell vhost so it can swap bytes where appropriate. This is done through a vhost ring ioctl. The support for this ioctl is advertised by a vhost feature. QEMU may choose to use it if a cross-endian situation is dete

[Qemu-devel] [PATCH v2 2/3] linux-headers: sync vhost.h

2015-04-02 Thread Greg Kurz
This patch brings the cross-endian vhost API to QEMU. Signed-off-by: Greg Kurz --- linux-headers/linux/vhost.h | 10 ++ 1 file changed, 10 insertions(+) diff --git a/linux-headers/linux/vhost.h b/linux-headers/linux/vhost.h index c656f61..e040bcb 100644 --- a/linux-headers/linux/vhost

Re: [Qemu-devel] [PATCH for-2.4 0/5] chardev: Add IRC char driver

2015-04-02 Thread Max Reitz
On 02.04.2015 10:57, Stefan Hajnoczi wrote: On Wed, Apr 01, 2015 at 02:09:12PM +0200, Max Reitz wrote: This series adds a long-missing IRC character device driver to qemu. See patch 1 for an explanation why you should have been missing it. To make it short: IRC is a very well tested and more re

[Qemu-devel] [PATCH v2 1/3] vhost: move cross-endian check to vhost core

2015-04-02 Thread Greg Kurz
The cross-endian support isn't really a vhost_net affair: it affects any vhost device. This patch moves the checking to the vhost core code. While, we're here, let's give a meaningful name to the helper. Signed-off-by: Greg Kurz --- hw/net/vhost_net.c | 19 --- hw/virtio/vhost

[Qemu-devel] [PATCH v2 0/3] vhost: set vring endianness for legacy virtio

2015-04-02 Thread Greg Kurz
This series allows QEMU to benefit from the cross-endian feature added to vhost by the following patchset: https://lists.linuxfoundation.org/pipermail/virtualization/2015-April/029700.html This is a complete rework of the unreviewed patchset I had sent last Feb. The patches aim to be virtio 1.0

Re: [Qemu-devel] [Qemu-block] [PATCH v4 18/20] iotests: add QMP event waiting queue

2015-04-02 Thread Stefan Hajnoczi
On Fri, Mar 20, 2015 at 03:17:01PM -0400, John Snow wrote: > +# Test if 'match' is a recursive subset of 'event' > +def event_match(event, match = None): Not worth respinning but PEP8 says there should be no spaces around the '=' for keyword arguments: https://www.python.org/dev/peps/pep-0008/#whi

Re: [Qemu-devel] [PATCH] Use $(MAKE) for recursive make

2015-04-02 Thread Paolo Bonzini
On 01/04/2015 19:58, Ed Maste wrote: > On BSDs "make" is typically BSD make, while "gmake" is GNU make. > > Signed-off-by: Ed Maste > --- > Makefile | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/Makefile b/Makefile > index 88bce56..ee40397 100644 > --- a/Makefil

Re: [Qemu-devel] glib-compat tales of woe

2015-04-02 Thread Paolo Bonzini
On 02/04/2015 15:15, Cornelia Huck wrote: > After some updates were applied on our SLES11SP3 development server, > current qemu fails to build: > > In file included from /home/cohuck/git/qemu/include/qemu-common.h:43, > from /home/cohuck/git/qemu/qapi/qapi-visit-core.c:14: > /ho

Re: [Qemu-devel] ppc vga output breakage since commit c3c1bb99

2015-04-02 Thread Paolo Bonzini
On 02/04/2015 13:45, Mark Cave-Ayland wrote: > > Yes, it's better to revert for now. Can you submit the patch above, so > > I include it in 2.4 and keep bisectability? > > Sure. Is your current 2.4 branch available on github or anywhere > similar? That's just so once the patch has been applied,

Re: [Qemu-devel] [PATCH V5 09/18] virtio-ccw: introduce ccw specific queue limit

2015-04-02 Thread Cornelia Huck
On Wed, 1 Apr 2015 16:15:03 +0800 Jason Wang wrote: > Instead of depending on marco, using a bus specific limit. Also make > it clear that the number of gsis per I/O adapter is not directly > depending on the number of virtio queues, but rather the other way > around. > > Cc: Alexander Graf >

Re: [Qemu-devel] [Qemu-block] [PATCH v4 17/20] iotests: add invalid input incremental backup tests

2015-04-02 Thread Stefan Hajnoczi
On Fri, Mar 20, 2015 at 03:17:00PM -0400, John Snow wrote: > Signed-off-by: John Snow > --- > tests/qemu-iotests/124 | 104 > + > tests/qemu-iotests/124.out | 5 +++ > tests/qemu-iotests/group | 1 + > 3 files changed, 110 insertions(+) > cr

Re: [Qemu-devel] [PATCH V5 00/18] Support more virtio queues

2015-04-02 Thread Cornelia Huck
On Wed, 1 Apr 2015 16:14:54 +0800 Jason Wang wrote: > Stress/migration test on virtio-pci, compile test on other > targets. And make check on s390x-softmmu and ppc64-softmmu. Patch 9 needs some slight modifications to fit on top of master, but with that, the patch series passes basic smoke test

Re: [Qemu-devel] [Qemu-block] [PATCH v4 16/20] hbitmap: truncate tests

2015-04-02 Thread Stefan Hajnoczi
On Fri, Mar 20, 2015 at 03:16:59PM -0400, John Snow wrote: > The general approach is to set bits close to the boundaries of > where we are truncating and ensure that everything appears to > have gone OK. > > We test growing and shrinking by different amounts: > - Less than the granularity > - Less

Re: [Qemu-devel] [Qemu-block] [PATCH v4 15/20] block: Resize bitmaps on bdrv_truncate

2015-04-02 Thread Stefan Hajnoczi
On Fri, Mar 20, 2015 at 03:16:58PM -0400, John Snow wrote: > +void hbitmap_truncate(HBitmap *hb, uint64_t size) > +{ > +bool shrink; > +unsigned i; > +uint64_t num_elements = size; > +uint64_t old; > + > +/* Size comes in as logical elements, adjust for granularity. */ > +si

  1   2   >