[Qemu-devel] [PATCH v2 12/21] block: Split out parse_json_protocol()

2015-11-23 Thread Kevin Wolf
The next patch distinguishes options that were explicitly set and options that were derived. bdrv_fill_option() added options of both types: Options given by json: syntax should be counted as explicit, but the rest is derived. In preparation for the distinction, move json: parse to a separate func

[Qemu-devel] [PATCH v2 16/21] block: reopen: Extract QemuOpts for generic block layer options

2015-11-23 Thread Kevin Wolf
This patch adds a QemuOpts for generic block layer options to bdrv_reopen_prepare(). The only two options that currently exist (node-name and driver) cannot be changed, so the only thing we do is putting them right back into the QDict so that we check at the end that they are indeed unchanged. We

[Qemu-devel] [PATCH v2 10/21] block: reopen: Document option precedence and refactor accordingly

2015-11-23 Thread Kevin Wolf
The interesting part of reopening an image is from which sources the effective options should be taken, i.e. which options take precedence over which other options. This patch documents the precedence that will be implemented in the following patches. It also refactors bdrv_reopen_queue(), so that

[Qemu-devel] [PATCH v2 03/21] mirror: Error out when a BDS would get two BBs

2015-11-23 Thread Kevin Wolf
bdrv_replace_in_backing_chain() asserts that not both old and new BlockDdriverState have a BlockBackend attached to them because both would have to end up pointing to the new BDS and we don't support more than one BB per BDS yet. Before we can safely allow references to existing nodes as backing f

[Qemu-devel] [PATCH v2 15/21] qemu-iotests: Remove cache mode test without medium

2015-11-23 Thread Kevin Wolf
Specifying the cache mode for a driver without a medium is not a useful thing to do: As long as there is no medium, the cache mode doesn't make a difference, and once the 'change' command is used to insert a medium, it ignores the old cache mode and makes the new medium use cache=writethrough. Lat

[Qemu-devel] [PATCH v2 13/21] block: Introduce bs->explicit_options

2015-11-23 Thread Kevin Wolf
bs->options doesn't only contain options that the user explicitly requested, but also option that were derived from flags, the filename or inherited from the parent node. For reopen, it is important to know the difference because reopening the parent can change inherited values in child nodes, but

[Qemu-devel] [PATCH v2 09/21] block: Allow specifying child options in reopen

2015-11-23 Thread Kevin Wolf
If the child was defined in the same context (-drive argument or blockdev-add QMP command) as its parent, a reopen of the parent should work the same and allow changing options of the child. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- block.c | 12 ++-- 1 file changed, 10 inser

[Qemu-devel] [PATCH v2 01/21] qcow2: Add .bdrv_join_options callback

2015-11-23 Thread Kevin Wolf
qcow2 accepts a few driver-specific options that overlap semantically (e.g. "overlap-check" is an alias of "overlap-check.template", and any missing cache size option is derived from the given ones). When bdrv_reopen() merges the set of updated options with left out options that should be kept at

[Qemu-devel] [PATCH v2 11/21] block: Add infrastructure for option inheritance

2015-11-23 Thread Kevin Wolf
Options are not actually inherited from the parent node yet, but this commit lays the grounds for doing so. Signed-off-by: Kevin Wolf --- block.c | 52 --- include/block/block_int.h | 3 ++- 2 files changed, 33 insertions(+), 22 dele

[Qemu-devel] [PATCH v2 04/21] block: Allow references for backing files

2015-11-23 Thread Kevin Wolf
For bs->file, using references to existing BDSes has been possible for a while already. This patch enables the same for bs->backing_hd. Signed-off-by: Kevin Wolf --- block.c | 47 +-- block/mirror.c| 2 +- include/block/block.h |

[Qemu-devel] [PATCH v2 17/21] block: Move cache options into options QDict

2015-11-23 Thread Kevin Wolf
This adds the cache mode options to the QDict, so that they can be specified for child nodes (e.g. backing.cache.direct=off). The cache modes are not removed from the flags at this point; instead, options and flags are kept in sync. If the user specifies both flags and options, the options take pr

Re: [Qemu-devel] [PATCH REPOST 2/2] dump-guest-memory: add basic "detach" support.

2015-11-23 Thread Andrew Jones
On Mon, Nov 23, 2015 at 06:07:42PM +0800, Peter Xu wrote: > This will allow the user specify "-d" (just like command > "migrate") when using "dump-guest-memory" command. When > specified, one background thread is created to do the dump work. > One flag is added to show whether there is a background

Re: [Qemu-devel] [PATCH 1/2] tests/Makefile: Add more dependencies for test-timed-average

2015-11-23 Thread Kevin Wolf
Am 23.11.2015 um 15:46 hat Paolo Bonzini geschrieben: > On 23/11/2015 13:39, Kevin Wolf wrote: > > tests/test-timed-average$(EXESUF): tests/test-timed-average.o qemu-timer.o > > \ > > libqemuutil.a stubs/clock-warp.o stubs/cpu-get-icount.o \ > > - stubs/notify-event.o stubs/replay.o > > +

[Qemu-devel] [PATCH v2 21/21] qemu-iotests: Test reopen with node-name/driver options

2015-11-23 Thread Kevin Wolf
'node-name' and 'driver' should not be changed during a reopen operation. It is, however, valid to specify them with the same value as they already had. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- tests/qemu-iotests/133 | 90 ++ tests/qem

Re: [Qemu-devel] [PATCH REPOST 0/2] Add basic "detach" support for dump-guest-memory

2015-11-23 Thread Eric Blake
On 11/23/2015 03:07 AM, Peter Xu wrote: > Currently, dump-guest-memory supports synchronous operation only. This patch > sets are adding "detach" support for it (just like "migrate -d" for > migration). When "-d" is provided, dump-guest-memory command will return > immediately without hanging user.

[Qemu-devel] [PATCH v2 18/21] blkdebug: Enable reopen

2015-11-23 Thread Kevin Wolf
Just reopening the children (as block.c does now) is enough. Signed-off-by: Kevin Wolf --- block/blkdebug.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/block/blkdebug.c b/block/blkdebug.c index bc0f041..459a3d9 100644 --- a/block/blkdebug.c +++ b/block/blkdebug.c @@ -770,6 +770,12

Re: [Qemu-devel] [PATCH REPOST 1/2] dump-guest-memory: add "detach" flag for QMP/HMP interfaces

2015-11-23 Thread Eric Blake
On 11/23/2015 03:07 AM, Peter Xu wrote: > This patch only add the interfaces, but not implementing them. > > Signed-off-by: Peter Xu > --- > dump.c | 3 ++- > hmp-commands.hx | 5 +++-- > hmp.c| 3 ++- > qapi-schema.json | 3 ++- > qmp-commands.hx | 4 ++-- > 5 files chan

Re: [Qemu-devel] [PATCH] ui/cocoa.m: Prevent activation clicks from going to guest

2015-11-23 Thread Peter Maydell
On 22 November 2015 at 01:43, Programmingkid wrote: > When QEMU is brought to the foreground, the click event that activates QEMU > should not go to the guest. Accidents happen when they do go to the guest > without giving the user a change to handle them. Buttons are clicked > accidently. > Wind

[Qemu-devel] [PATCH v2 19/21] qemu-iotests: Try setting cache mode for children

2015-11-23 Thread Kevin Wolf
This is a basic test for specifying cache modes for child nodes on the command line. It doesn't take much time and works without O_DIRECT support. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- tests/qemu-iotests/051 | 10 +++- tests/qemu-iotests/051.out | 60 +

[Qemu-devel] [PATCH for-2.5] hw/ppc/spapr: Remove duplicated "pseries" alias

2015-11-23 Thread Thomas Huth
The "pseries" alias is currently set twice, one time for the pseries-2.4 machine and one time for the "pseries-2.5" machine. To avoid confusion with the alias, let's remove the one from the older machine class. And while we're at it, also remove the "is_default = 0" there since the is_default varia

[Qemu-devel] [PATCH v2 20/21] qemu-iotests: Test cache mode option inheritance

2015-11-23 Thread Kevin Wolf
This is doing a more complete test on setting cache modes both while opening an image (i.e. in a -drive command line) and in reopen situations. It checks that reopen can specify options for child nodes and that cache modes are correctly inherited from parent nodes where they are not specified. Sig

Re: [Qemu-devel] [PULL for-2.5] last minute tcg fix

2015-11-23 Thread Peter Maydell
version for v2.5.0-rc1 release (2015-11-20 17:43:46 +) > > are available in the git repository at: > > git://github.com/rth7680/qemu.git tags/pull-tcg-20151123 > > for you to fetch changes up to 644da9b39e477caa80bab69d2847dfcb468f0d33: > >

Re: [Qemu-devel] [PATCH v2 4/4] json-streamer: Limit number of tokens in addition to total size

2015-11-23 Thread Eric Blake
On 11/23/2015 07:27 AM, Paolo Bonzini wrote: > > > On 20/11/2015 18:32, Eric Blake wrote: >>> static void qlist_size_iter(QObject *obj, void *opaque) >>> { >>> size_t *count = opaque; >>> (*count)++; >>> } >> >> Yuck - we don't track size independently? Seems like it might make a >> wort

Re: [Qemu-devel] [PATCH REPOST 0/2] Add basic "detach" support for dump-guest-memory

2015-11-23 Thread Laszlo Ersek
On 11/23/15 11:07, Peter Xu wrote: > Currently, dump-guest-memory supports synchronous operation only. This patch > sets are adding "detach" support for it (just like "migrate -d" for > migration). When "-d" is provided, dump-guest-memory command will return > immediately without hanging user. This

Re: [Qemu-devel] [Patch v7 3/3] qmp: add monitor command to add/remove a child

2015-11-23 Thread Eric Blake
On 11/22/2015 11:23 PM, Wen Congyang wrote: > The new QMP command name is x-blockdev-change. It justs for adding/removing s/It justs/It's just/ > quorum's child now, and don't support all kinds of children, all kinds of s/don't/doesn't/ > operations, nor all block drivers. So it is experimental

Re: [Qemu-devel] [PATCH for-2.5] block-migration: limit the memory usage

2015-11-23 Thread Juan Quintela
Wen Congyang wrote: > If we set migration speed in a very large value, block-migration will try to > read > all data to the memory. Because > (block_mig_state.submitted + block_mig_state.read_done) * BLOCK_SIZE > will be overflow, and it will be always less than rate limit. > > There is no ne

Re: [Qemu-devel] [PATCH v5 4/4] devicetree: update documentation for fw_cfg ARM bindings

2015-11-23 Thread Laszlo Ersek
On 11/23/15 16:57, Gabriel L. Somlo wrote: > From: Gabriel Somlo > > Remove fw_cfg hardware interface details from > Documentation/devicetree/bindings/arm/fw-cfg.txt, > and replace them with a pointer to the authoritative > documentation in the QEMU source tree. > > Signed-off-by: Gabriel Somlo

Re: [Qemu-devel] MCG_CAP ABI breakage (was Re: [PATCH] target-i386: Do not set MCG_SER_P by default)

2015-11-23 Thread Borislav Petkov
On Mon, Nov 23, 2015 at 01:11:27PM -0200, Eduardo Habkost wrote: > On Mon, Nov 23, 2015 at 11:22:37AM -0200, Eduardo Habkost wrote: > [...] > > In the case of this code, it looks like it's already broken > > because the resulting mcg_cap depends on host kernel capabilities > > (the ones reported by

Re: [Qemu-devel] [PATCH v5 4/4] devicetree: update documentation for fw_cfg ARM bindings

2015-11-23 Thread Gabriel L. Somlo
On Mon, Nov 23, 2015 at 05:35:51PM +0100, Laszlo Ersek wrote: > On 11/23/15 16:57, Gabriel L. Somlo wrote: > > From: Gabriel Somlo > > > > Remove fw_cfg hardware interface details from > > Documentation/devicetree/bindings/arm/fw-cfg.txt, > > and replace them with a pointer to the authoritative >

Re: [Qemu-devel] [PATCH] [doc] Introduce coding style for errors

2015-11-23 Thread Eric Blake
On 11/23/2015 07:18 AM, Lluís Vilanova wrote: > Gives some general guidelines for reporting errors in QEMU. This is more than just a doc patch; you are actually proposing new code in the way of &error_now. The commit message must absolutely mention changes like this, or possibly even split this i

Re: [Qemu-devel] [Qemu-arm] [PATCH] target-arm/translate-a64.c: Correct unallocated checks for ldst_excl

2015-11-23 Thread Peter Maydell
Ping? I forgot to mark this for-2.5, and given how long the bug's been hanging around there's not much urgency to fixing it, but we might as well put the fix into 2.5 if it gets reviewed. thanks -- PMM On 16 November 2015 at 18:28, Peter Maydell wrote: > The checks for the unallocated encodings

Re: [Qemu-devel] [PATCH v1 1/1] xlnx-ep108: Fix minimum RAM check

2015-11-23 Thread Peter Maydell
On 20 November 2015 at 12:09, Alistair Francis wrote: > The minimum RAM check logic for the Xiilnx EP108 was off by one, > which caused a false positive. Correct the logic to only print > warnings when the RAM is below 0x800. > > Signed-off-by: Alistair Francis > --- > > hw/arm/xlnx-ep108.c

Re: [Qemu-devel] [PATCH 1/2] tests/Makefile: Add more dependencies for test-timed-average

2015-11-23 Thread Paolo Bonzini
On 23/11/2015 17:09, Kevin Wolf wrote: > Am 23.11.2015 um 15:46 hat Paolo Bonzini geschrieben: >> On 23/11/2015 13:39, Kevin Wolf wrote: >>> tests/test-timed-average$(EXESUF): tests/test-timed-average.o qemu-timer.o >>> \ >>> libqemuutil.a stubs/clock-warp.o stubs/cpu-get-icount.o \ >>> -

Re: [Qemu-devel] [PULL 0/1] NUMA fix for -rc2

2015-11-23 Thread Peter Maydell
On 23 November 2015 at 12:46, Eduardo Habkost wrote: > (I forgot to submit a pull request for this earlier, sorry.) > > The following changes since commit 541abd10a01da56c5f16582cd32d67114ec22a5c: > > Update version for v2.5.0-rc1 release (2015-11-20 17:43:46 +) > > are available in the git

Re: [Qemu-devel] [PATCH] qemu-iotests: Add -nographic when starting QEMU in 120

2015-11-23 Thread Max Reitz
On 23.11.2015 04:12, tu bo wrote: > Hi Fam, Max: > > On 11/23/2015 10:33 AM, Fam Zheng wrote: >> On Mon, 11/23 10:29, tu bo wrote: >>> Hi Max: >>> >>> On 11/21/2015 12:17 AM, Max Reitz wrote: On 20.11.2015 10:35, Fam Zheng wrote: > Otherwise, a window flashes on my desktop (built with SDL

Re: [Qemu-devel] [PATCH v2 4/4] json-streamer: Limit number of tokens in addition to total size

2015-11-23 Thread Markus Armbruster
Eric Blake writes: > On 11/23/2015 07:27 AM, Paolo Bonzini wrote: >> >> >> On 20/11/2015 18:32, Eric Blake wrote: static void qlist_size_iter(QObject *obj, void *opaque) { size_t *count = opaque; (*count)++; } >>> >>> Yuck - we don't track size independently? S

Re: [Qemu-devel] [PATCH 2/4] json-streamer: Don't crash when input exceeds nesting limit

2015-11-23 Thread Markus Armbruster
Eric Blake writes: > On 10/29/2015 06:44 AM, Markus Armbruster wrote: >> We limit nesting depth and input size to defend against input >> triggering excessive heap or stack memory use (commit 29c75dd >> json-streamer: limit the maximum recursion depth and maximum token >> count). However, when t

[Qemu-devel] [Bug 1519037] [NEW] qemu-i386 32-bit segfault

2015-11-23 Thread PeteVine
Public bug reported: I'm getting segfaults on 32-bit linux trying to run binaries using qemu-i386 from git. These segfaults go away when run in gdb or strace - could it be about the environment somehow? In contrast qemu-x86_64 works fine. How can I pinpoint the cause of this? Thanks! ** Affects

Re: [Qemu-devel] [PATCH] ui/cocoa.m: Prevent activation clicks from going to guest

2015-11-23 Thread Programmingkid
On Nov 23, 2015, at 11:06 AM, Peter Maydell wrote: > On 22 November 2015 at 01:43, Programmingkid > wrote: >> When QEMU is brought to the foreground, the click event that activates QEMU >> should not go to the guest. Accidents happen when they do go to the guest >> without giving the user a cha

Re: [Qemu-devel] [PATCH] exec: silence hugetlbfs warning under qtest

2015-11-23 Thread Paolo Bonzini
On 18/11/2015 21:49, Michael S. Tsirkin wrote: > On Wed, Nov 18, 2015 at 10:02:58AM +0100, marcandre.lur...@redhat.com wrote: >> From: Marc-André Lureau >> >> vhost-user-test prints a warning. A test should not need to run on >> hugetlbfs, let's silence the warning under qtest. The >> condition

Re: [Qemu-devel] [PATCH for-2.5] call bdrv_drain_all() even if the vm is stopped

2015-11-23 Thread Paolo Bonzini
On 20/11/2015 10:34, Wen Congyang wrote: > There are still I/O operations when the vm is stopped. For example, stop the > vm, and do block > migration. In this case, we don't drain all I/O operation, and may meet the > following problem: > qemu-system-x86_64: migration/block.c:731: block_save_c

[Qemu-devel] [PATCH v2 for-2.5? 0/4] qjson: save a lot of memory

2015-11-23 Thread Paolo Bonzini
This patch from 2011 (!) saves about 96% of the allocation cost (down from 500 MiB to 20 MiB) for check-qjson. Paolo Paolo Bonzini (4): qjson: replace QString in JSONLexer with GString qjson: do not save/restore contexts qjson: store tokens in a GQueue qjson: surprise, allocating 6 QObjec

[Qemu-devel] [PATCH v2 1/4] qjson: replace QString in JSONLexer with GString

2015-11-23 Thread Paolo Bonzini
JSONLexer only needs a simple resizable buffer. json-streamer.c can allocate memory for each token instead of relying on reference counting of QStrings. Signed-off-by: Paolo Bonzini --- include/qapi/qmp/json-lexer.h| 7 +++ include/qapi/qmp/json-streamer.h | 1 + qobject/json-lexer.c

[Qemu-devel] [PATCH v2 2/4] qjson: do not save/restore contexts

2015-11-23 Thread Paolo Bonzini
JSON is LL(1) and our parser indeed needs only 1 token lookahead. Saving the parser context is mostly unnecessary; we can replace it with peeking at the next token, or remove it altogether when the restore only happens on errors. The token list is destroyed anyway on errors. The only interesting

[Qemu-devel] [PATCH v2 4/4] qjson: surprise, allocating 6 QObjects per token is expensive

2015-11-23 Thread Paolo Bonzini
Replace the contents of the tokens GQueue with a simple struct. This cuts the amount of memory allocated by tests/check-qjson from ~500MB to ~20MB, and the execution time from 600ms to 80ms on my laptop. Still a lot (some could be saved by using an intrusive list, such as QSIMPLEQ, instead of the

Re: [Qemu-devel] [PATCH] exec: silence hugetlbfs warning under qtest

2015-11-23 Thread Daniel P. Berrange
On Mon, Nov 23, 2015 at 06:40:58PM +0100, Paolo Bonzini wrote: > > > On 18/11/2015 21:49, Michael S. Tsirkin wrote: > > On Wed, Nov 18, 2015 at 10:02:58AM +0100, marcandre.lur...@redhat.com wrote: > >> From: Marc-André Lureau > >> > >> vhost-user-test prints a warning. A test should not need to

[Qemu-devel] [PATCH v2 3/4] qjson: store tokens in a GQueue

2015-11-23 Thread Paolo Bonzini
Even though we still have the "streamer" concept, the tokens can now be deleted as they are read. While doing so convert from QList to GQueue, since the next step will make tokens not a QObject and we will have to do the conversion anyway. Signed-off-by: Paolo Bonzini --- include/qapi/qmp/json-

Re: [Qemu-devel] [PATCH] [doc] Introduce coding style for errors

2015-11-23 Thread Lluís Vilanova
Eric Blake writes: > On 11/23/2015 07:18 AM, Lluís Vilanova wrote: >> Gives some general guidelines for reporting errors in QEMU. > This is more than just a doc patch; you are actually proposing new code > in the way of &error_now. The commit message must absolutely mention > changes like this,

Re: [Qemu-devel] [PATCH] exec: silence hugetlbfs warning under qtest

2015-11-23 Thread Daniel P. Berrange
On Mon, Nov 23, 2015 at 05:46:06PM +, Daniel P. Berrange wrote: > On Mon, Nov 23, 2015 at 06:40:58PM +0100, Paolo Bonzini wrote: > > > > > > On 18/11/2015 21:49, Michael S. Tsirkin wrote: > > > On Wed, Nov 18, 2015 at 10:02:58AM +0100, marcandre.lur...@redhat.com > > > wrote: > > >> From: Ma

Re: [Qemu-devel] qcow2 corruption repair can not proceed due to bad snapshot

2015-11-23 Thread Max Reitz
On 20.11.2015 20:33, Brian Taber wrote: > I recently ran across an issue (completely my own fault) that others > have encountered with varying details/success in fixing. I had a VM > stuck in shutdown (windoze asking/waiting to kill a program) that I > thought was already down when I created a sna

Re: [Qemu-devel] [PATCH REPOST 0/2] Add basic "detach" support for dump-guest-memory

2015-11-23 Thread Andrew Jones
On Mon, Nov 23, 2015 at 05:22:29PM +0100, Laszlo Ersek wrote: > On 11/23/15 11:07, Peter Xu wrote: > > Currently, dump-guest-memory supports synchronous operation only. This patch > > sets are adding "detach" support for it (just like "migrate -d" for > > migration). When "-d" is provided, dump-gue

Re: [Qemu-devel] [PATCH v2 2/4] qjson: do not save/restore contexts

2015-11-23 Thread Laszlo Ersek
On 11/23/15 18:44, Paolo Bonzini wrote: > JSON is LL(1) and our parser indeed needs only 1 token lookahead. > Saving the parser context is mostly unnecessary; we can replace it > with peeking at the next token, or remove it altogether when the > restore only happens on errors. The token list is de

Re: [Qemu-devel] [PATCH] exec: silence hugetlbfs warning under qtest

2015-11-23 Thread Marc-André Lureau
On Mon, Nov 23, 2015 at 6:40 PM, Paolo Bonzini wrote: > Before: object-initial, chardev, qtest, object-late (not in the patch) > > After: chardev, qtest, object-initial, object-late (not in the patch) > > Objects must be initialized before chardev (except rng-egd) since in the > future chardev wil

[Qemu-devel] QAPI vs QMP commands

2015-11-23 Thread Lluís Vilanova
When adding a new QAPI command, should I also add a corresponding entry in "qmp-commands.hx"? Thanks, Lluis -- "And it's much the same thing with knowledge, for whenever you learn something new, the whole world becomes that much richer." -- The Princess of Pure Reason, as told by Norton Juste

Re: [Qemu-devel] [PATCH] exec: silence hugetlbfs warning under qtest

2015-11-23 Thread Daniel P. Berrange
On Mon, Nov 23, 2015 at 07:01:33PM +0100, Marc-André Lureau wrote: > On Mon, Nov 23, 2015 at 6:40 PM, Paolo Bonzini wrote: > > Before: object-initial, chardev, qtest, object-late (not in the patch) > > > > After: chardev, qtest, object-initial, object-late (not in the patch) > > > > Objects must b

Re: [Qemu-devel] [PATCH v2 2/4] qjson: do not save/restore contexts

2015-11-23 Thread Paolo Bonzini
On 23/11/2015 18:59, Laszlo Ersek wrote: >> > The only interesting thing is that parse_keyword always eats >> > a TOKEN_KEYWORD, even if it is invalid, so it must come last in >> > parse_value (otherwise, NULL is returned, parse_literal is invoked >> > and it tries to peek beyond end of input).

Re: [Qemu-devel] ivshmem property size should be a size, not a string

2015-11-23 Thread Markus Armbruster
Markus Armbruster writes: > Marc-André Lureau writes: [...] >>> * shm appears to be the same as memdev, just less flexible. Why does it >>> exist? >> >> It was there before. > > Not only is memdev more flexible, it also provides the clean split > between frontend and backend we generally want

Re: [Qemu-devel] Build problem with qemu Makefile change

2015-11-23 Thread Michael Roth
Quoting Steve Ellcey (2015-11-23 12:06:57) > My qemu build has been failing since this checkin by Michael Roth: > > http://lists.nongnu.org/archive/html/qemu-devel/2015-11/msg03991.html > > which changed the top-level Makefile. Is anyone else seeing this? > > I am building a qemu for M

[Qemu-devel] [RFC][PATCH v2 0/2] utils: Improve and document error reporting

2015-11-23 Thread Lluís Vilanova
Adds support for reporting non-terminating errors (dubbed warnings), and briefly documents what routines should developers generally use to keep error reporting consistent. Changes in v2 = * Split in two patches. * Explicitly add a warning error object. Signed-off-by: Lluís Vilanova

[Qemu-devel] [PATCH v2 1/2] utils: Add warning messages

2015-11-23 Thread Lluís Vilanova
Adds a special error object that transforms error messages into immediately reported warnings. Signed-off-by: Lluís Vilanova --- include/qapi/error.h | 20 util/error.c | 37 +++-- 2 files changed, 47 insertions(+), 10 deletions(-)

[Qemu-devel] [PATCH v2 2/2] doc: Introduce coding style for errors

2015-11-23 Thread Lluís Vilanova
Gives some general guidelines for reporting errors in QEMU. Signed-off-by: Lluís Vilanova --- HACKING | 31 +++ 1 file changed, 31 insertions(+) diff --git a/HACKING b/HACKING index 12fbc8a..e59bc34 100644 --- a/HACKING +++ b/HACKING @@ -157,3 +157,34 @@ painful. T

Re: [Qemu-devel] [Qemu-arm] [PATCH] target-arm/translate-a64.c: Correct unallocated checks for ldst_excl

2015-11-23 Thread Sergey Fedorov
On 23.11.2015 19:49, Peter Maydell wrote: > Ping? I forgot to mark this for-2.5, and given how long the bug's > been hanging around there's not much urgency to fixing it, but > we might as well put the fix into 2.5 if it gets reviewed. > Hi, Peter. I'm going to review this carefully in a few days

Re: [Qemu-devel] [PATCH v2 2/2] doc: Introduce coding style for errors

2015-11-23 Thread Daniel P. Berrange
On Mon, Nov 23, 2015 at 07:41:24PM +0100, Lluís Vilanova wrote: > Gives some general guidelines for reporting errors in QEMU. > > Signed-off-by: Lluís Vilanova > --- > HACKING | 31 +++ > 1 file changed, 31 insertions(+) > > diff --git a/HACKING b/HACKING > index 1

Re: [Qemu-devel] [Qemu-arm] [PATCH] target-arm/translate-a64.c: Correct unallocated checks for ldst_excl

2015-11-23 Thread Sergey Fedorov
On 23.11.2015 21:42, Sergey Fedorov wrote: > On 23.11.2015 19:49, Peter Maydell wrote: >> Ping? I forgot to mark this for-2.5, and given how long the bug's >> been hanging around there's not much urgency to fixing it, but >> we might as well put the fix into 2.5 if it gets reviewed. >> > Hi, Peter.

Re: [Qemu-devel] QAPI vs QMP commands

2015-11-23 Thread Markus Armbruster
Lluís Vilanova writes: > When adding a new QAPI command, should I also add a corresponding entry in > "qmp-commands.hx"? Yes. Towards the end of the very long QAPI patch queue are patches to get rid of qmp-commands.hx. We'll get there, but until then, you have to update qmp-commands.hx, too.

Re: [Qemu-devel] [PATCH] qmp-commands.hx: Update the supported 'transaction' operations

2015-11-23 Thread Marc-André Lureau
Hi On Fri, Oct 2, 2015 at 2:12 PM, Kashyap Chamarthy wrote: > Although the canonical source of reference for QMP commands is > qapi-schema.json, for consistency's sake, update qmp-commands.hx to > state the list of supported transactionable operations, namely: > > drive-backup > blockdev-

Re: [Qemu-devel] [PATCH] qmp-commands.hx: Update the supported 'transaction' operations

2015-11-23 Thread Marc-André Lureau
Hi On Mon, Nov 23, 2015 at 7:58 PM, Marc-André Lureau wrote: > Isn't the actions limited by the TransactionAction in qapi-schema.json? > > { 'union': 'TransactionAction', >'data': { > 'blockdev-snapshot-sync': 'BlockdevSnapshot', > 'drive-backup': 'DriveBackup', > + 'bl

Re: [Qemu-devel] [PATCH] qmp-commands.hx: Update the supported 'transaction' operations

2015-11-23 Thread John Snow
On 11/23/2015 01:58 PM, Marc-André Lureau wrote: > Hi > > On Fri, Oct 2, 2015 at 2:12 PM, Kashyap Chamarthy wrote: >> Although the canonical source of reference for QMP commands is >> qapi-schema.json, for consistency's sake, update qmp-commands.hx to >> state the list of supported transactiona

Re: [Qemu-devel] [PATCH v2 2/4] qjson: do not save/restore contexts

2015-11-23 Thread Laszlo Ersek
On 11/23/15 19:09, Paolo Bonzini wrote: > > > On 23/11/2015 18:59, Laszlo Ersek wrote: The only interesting thing is that parse_keyword always eats a TOKEN_KEYWORD, even if it is invalid, so it must come last in parse_value (otherwise, NULL is returned, parse_literal is invoked >>>

Re: [Qemu-devel] [PATCH] acpi: fix buffer overrun on migration

2015-11-23 Thread John Snow
On 11/19/2015 08:35 AM, Michael S. Tsirkin wrote: > ich calls acpi_gpe_init with length ICH9_PMIO_GPE0_LEN so > ICH9_PMIO_GPE0_LEN/2 bytes are allocated, but then the full > ICH9_PMIO_GPE0_LEN bytes are migrated. > > As a quick work-around, allocate twice the memory. > We'll probably want to twe

Re: [Qemu-devel] [PATCH v5 0/5] add ACPI node for fw_cfg on pc and arm

2015-11-23 Thread Gabriel L. Somlo
Couple of items: 1. Ping ? :) 2. Thank you markmb for your R-b ! 3. If anyone's had a chance to look over the corresponding guest-side kernel sysfs driver which utilizes this, you will have noticed I'm automatically initializing the driver based on DeviceTree or ACPI on ARM and x86, and

Re: [Qemu-devel] MCG_CAP ABI breakage (was Re: [PATCH] target-i386: Do not set MCG_SER_P by default)

2015-11-23 Thread Eduardo Habkost
On Mon, Nov 23, 2015 at 05:43:14PM +0100, Borislav Petkov wrote: > On Mon, Nov 23, 2015 at 01:11:27PM -0200, Eduardo Habkost wrote: > > On Mon, Nov 23, 2015 at 11:22:37AM -0200, Eduardo Habkost wrote: > > [...] > > > In the case of this code, it looks like it's already broken > > > because the resu

Re: [Qemu-devel] [PATCH v5 0/5] add ACPI node for fw_cfg on pc and arm

2015-11-23 Thread Laszlo Ersek
On 11/23/15 20:31, Gabriel L. Somlo wrote: > Couple of items: > > 1. Ping ? :) > > 2. Thank you markmb for your R-b ! > > 3. If anyone's had a chance to look over the corresponding guest-side >kernel sysfs driver which utilizes this, you will have noticed I'm >automatically initializing

Re: [Qemu-devel] QAPI vs QMP commands

2015-11-23 Thread Lluís Vilanova
Markus Armbruster writes: > Lluís Vilanova writes: >> When adding a new QAPI command, should I also add a corresponding entry in >> "qmp-commands.hx"? > Yes. > Towards the end of the very long QAPI patch queue are patches to get rid > of qmp-commands.hx. We'll get there, but until then, you ha

Re: [Qemu-devel] ivshmem property size should be a size, not a string

2015-11-23 Thread Eric Blake
On 11/23/2015 07:46 AM, Markus Armbruster wrote: >>> If it's not broken, please explain to me how the guest should find out >>> whether its ivshmem device sports a doorbell. >> >> If you have received ID, you should be good to use the doorbell. > > That's not a complete answer, so let me try a di

Re: [Qemu-devel] [PATCH v2 2/4] qjson: do not save/restore contexts

2015-11-23 Thread Eric Blake
On 11/23/2015 10:59 AM, Laszlo Ersek wrote: > On 11/23/15 18:44, Paolo Bonzini wrote: >> JSON is LL(1) and our parser indeed needs only 1 token lookahead. >> Saving the parser context is mostly unnecessary; we can replace it >> with peeking at the next token, or remove it altogether when the >> res

Re: [Qemu-devel] [PATCH v2 2/2] doc: Introduce coding style for errors

2015-11-23 Thread Lluís Vilanova
Daniel P Berrange writes: [...] > I don't think this "Errors in user inputs" vs "Other errors" distinction > really makes sense. Whether an error raised in a piece of code is related > to user input or not is almost impossible to determine in practice. So as > a rule to follow it is not practical.

Re: [Qemu-devel] [PATCH v5 1/4] firmware: introduce sysfs driver for QEMU's fw_cfg device

2015-11-23 Thread kbuild test robot
Hi Gabriel, [auto build test WARNING on v4.4-rc2] [also build test WARNING on next-20151123] [cannot apply to robh/for-next] url: https://github.com/0day-ci/linux/commits/Gabriel-L-Somlo/SysFS-driver-for-QEMU-fw_cfg-device/20151124-000402 config: arm-allyesconfig (attached as .config

Re: [Qemu-devel] ivshmem property size should be a size, not a string

2015-11-23 Thread Marc-André Lureau
Hi - Original Message - > On 11/23/2015 07:46 AM, Markus Armbruster wrote: > > >>> If it's not broken, please explain to me how the guest should find out > >>> whether its ivshmem device sports a doorbell. > >> > >> If you have received ID, you should be good to use the doorbell. > > > >

Re: [Qemu-devel] [PATCH v5 0/5] add ACPI node for fw_cfg on pc and arm

2015-11-23 Thread Gabriel L. Somlo
On Mon, Nov 23, 2015 at 08:46:33PM +0100, Laszlo Ersek wrote: > On 11/23/15 20:31, Gabriel L. Somlo wrote: > > Couple of items: > > > > 1. Ping ? :) > > > > 2. Thank you markmb for your R-b ! > > > > 3. If anyone's had a chance to look over the corresponding guest-side > >kernel sysfs driver

Re: [Qemu-devel] [PATCH v2 2/4] qjson: do not save/restore contexts

2015-11-23 Thread Laszlo Ersek
On 11/23/15 21:05, Eric Blake wrote: > On 11/23/2015 10:59 AM, Laszlo Ersek wrote: >> On 11/23/15 18:44, Paolo Bonzini wrote: >>> JSON is LL(1) and our parser indeed needs only 1 token lookahead. >>> Saving the parser context is mostly unnecessary; we can replace it >>> with peeking at the next tok

Re: [Qemu-devel] [PATCH v2 2/2] doc: Introduce coding style for errors

2015-11-23 Thread Daniel P. Berrange
On Mon, Nov 23, 2015 at 09:05:30PM +0100, Lluís Vilanova wrote: > Daniel P Berrange writes: > [...] > > I don't think this "Errors in user inputs" vs "Other errors" distinction > > really makes sense. Whether an error raised in a piece of code is related > > to user input or not is almost impossibl

Re: [Qemu-devel] [PATCH v5 0/5] add ACPI node for fw_cfg on pc and arm

2015-11-23 Thread Laszlo Ersek
On 11/23/15 21:28, Gabriel L. Somlo wrote: > On Mon, Nov 23, 2015 at 08:46:33PM +0100, Laszlo Ersek wrote: >> On 11/23/15 20:31, Gabriel L. Somlo wrote: >>> Couple of items: >>> >>> 1. Ping ? :) >>> >>> 2. Thank you markmb for your R-b ! >>> >>> 3. If anyone's had a chance to look over the correspo

Re: [Qemu-devel] MCG_CAP ABI breakage (was Re: [PATCH] target-i386: Do not set MCG_SER_P by default)

2015-11-23 Thread Borislav Petkov
On Mon, Nov 23, 2015 at 05:42:08PM -0200, Eduardo Habkost wrote: > I will let the people working on the actual MCE emulation in KVM > answer that. I am assuming that KVM_MCE_CAP_SUPPORTED is set to > something that makes sense. Well, that should be, IMHO, the same like all those feature bits assig

Re: [Qemu-devel] ivshmem property size should be a size, not a string

2015-11-23 Thread Bruce Rogers
>>> On 11/20/2015 at 09:07 AM, Markus Armbruster wrote: > Everybody's favourite device model has "size" property. It's declared > as *string* > > DEFINE_PROP_STRING("size", IVShmemState, sizearg), > > which gets converted to a size manually in the realize method: > > } else if (s->siz

Re: [Qemu-devel] [PATCH v2 for-2.5? 0/4] qjson: save a lot of memory

2015-11-23 Thread Eric Blake
On 11/23/2015 10:44 AM, Paolo Bonzini wrote: > This patch from 2011 (!) saves about 96% of the allocation cost (down > from 500 MiB to 20 MiB) for check-qjson. > > Paolo > > Paolo Bonzini (4): > qjson: replace QString in JSONLexer with GString > qjson: do not save/restore contexts > qjson:

Re: [Qemu-devel] [PATCH for 2.6 1/3] backup: Use Bitmap to replace "s->bitmap"

2015-11-23 Thread John Snow
On 11/20/2015 04:59 AM, Fam Zheng wrote: > "s->bitmap" tracks done sectors, we only check bit states without using any > iterator which HBitmap is good for. Switch to "Bitmap" which is simpler and > more memory efficient. > > Meanwhile, rename it to done_bitmap, to reflect the intention. > > Si

Re: [Qemu-devel] [OpenBIOS] [Qemu-ppc] CUDA has problems with Mac OS 10.4

2015-11-23 Thread Mark Cave-Ayland
On 22/11/15 17:39, Programmingkid wrote: Hi Alfonso, Has there been any progress at all as to which extensions may be causing the crashes? >>> >>> Remove these extensions from the Extensions folder and Mac OS 9 will boot >>> to the desktop: >>> >>> Apple Audio Extension >>> Ap

[Qemu-devel] [RFC post-2.5 PATCH 0/5] VFIO: capability chains

2015-11-23 Thread Alex Williamson
This is the matching QEMU changes for the proposed kernel-side capability chains. Unfortunately there's also a lot of churn to get to consistent interfaces involved in this series, which allow us to generically handle multiple mmaps overlapping a region and making the actual step of consuming the

[Qemu-devel] [RFC post-2.5 PATCH 5/5] vfio: Enable sparse mmap capability

2015-11-23 Thread Alex Williamson
The sparse mmap capability in a vfio region info allows vfio to tell us which sub-areas of a region may be mmap'd. Thus rather than assuming a single mmap covers the entire region and later frobbing it ourselves for things like the PCI MSI-X vector table, we can read that directly from vfio. Sign

[Qemu-devel] [RFC post-2.5 PATCH 2/5] vfio: Generalize region support

2015-11-23 Thread Alex Williamson
Both platform and PCI vfio drivers create a "slow", I/O memory region with one or more mmap memory regions overlayed when supported by the device. Generalize this to a set of common helpers in the core that pulls the region info from vfio, fills the region data, configures slow mapping, and adds he

[Qemu-devel] [RFC post-2.5 PATCH 4/5] linux-headers/vfio: Update for proposed capabilities list

2015-11-23 Thread Alex Williamson
Signed-off-by: Alex Williamson --- linux-headers/linux/vfio.h | 53 +++- 1 file changed, 52 insertions(+), 1 deletion(-) diff --git a/linux-headers/linux/vfio.h b/linux-headers/linux/vfio.h index aa276bc..c3860f6 100644 --- a/linux-headers/linux/vfio.h +

[Qemu-devel] [RFC post-2.5 PATCH 1/5] vfio: Wrap VFIO_DEVICE_GET_REGION_INFO

2015-11-23 Thread Alex Williamson
In preparation for supporting capability chains on regions, wrap ioctl(VFIO_DEVICE_GET_REGION_INFO) so we don't duplicate the code for each caller. Signed-off-by: Alex Williamson --- hw/vfio/common.c | 18 + hw/vfio/pci.c | 81 +---

[Qemu-devel] [RFC post-2.5 PATCH 3/5] vfio/pci: Convert all MemoryRegion to dynamic alloc and consistent functions

2015-11-23 Thread Alex Williamson
Match common vfio code with setup, exit, and finalize functions for BAR, quirk, and VGA management. VGA is also changed to dynamic allocation to match the other MemoryRegions. Signed-off-by: Alex Williamson --- hw/vfio/pci-quirks.c | 38 - hw/vfio/pci.c| 114 +

Re: [Qemu-devel] [PATCH] qemu-iotests: Add -nographic when starting QEMU in 119 and 120

2015-11-23 Thread Max Reitz
On 23.11.2015 03:32, Fam Zheng wrote: > Otherwise, a window flashes on my desktop (built with SDL). Add this as > other cases have it. > > Signed-off-by: Fam Zheng > > --- > v2: Fix 119 too. [Max] > --- > tests/qemu-iotests/119 | 2 +- > tests/qemu-iotests/120 | 2 +- > 2 files changed, 2 inser

Re: [Qemu-devel] [PATCH for 2.6 2/3] block: Hide HBitmap in block dirty bitmap interface

2015-11-23 Thread John Snow
On 11/20/2015 04:59 AM, Fam Zheng wrote: > HBitmap is an implementation detail of block dirty bitmap that should be > hidden > from users. Introduce a BdrvDirtyBitmapIter to encapsulate the underlying > HBitmapIter. > > A small difference in the interface is, before, an HBitmapIter is initializ

[Qemu-devel] [PATCH v4 2/4] usb-mtp: free objects on a mtp reset

2015-11-23 Thread Bandan Das
On a reset, call usb_mtp_object_free on all objects and their children Signed-off-by: Bandan Das --- hw/usb/dev-mtp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/usb/dev-mtp.c b/hw/usb/dev-mtp.c index 10b657d..5b71691 100644 --- a/hw/usb/dev-mtp.c +++ b/hw/usb/dev-mtp.c @@ -908,6 +908

[Qemu-devel] [PATCH v4 0/4] usb-mtp events support

2015-11-23 Thread Bandan Das
This series adds support for mtp events that are piggybacked on top of the Linux provided inotify mechanism. It performs well with some light unit testing in a linux guest. The mtp share is still read only, but now the guest will notice updates to the share as long as the mtp client being used supp

[Qemu-devel] [PATCH v4 4/4] usb-mtp: add support for basic mtp events

2015-11-23 Thread Bandan Das
When the host polls for events, we check our events qlist and send one event at a time. Also, note that the event packet needs to be sent in one go, so I increased the max packet size to 64. Tested with a linux guest. Signed-off-by: Bandan Das --- hw/usb/dev-mtp.c | 29 +

[Qemu-devel] [PATCH v4 1/4] usb-mtp: use a list for keeping track of children

2015-11-23 Thread Bandan Das
To support adding/removal of objects, we will need to update the object cache hierarchy we have built internally. Convert to using a Qlist for easier management. Signed-off-by: Bandan Das --- hw/usb/dev-mtp.c | 56 trace-events | 1 +

<    1   2   3   >