[Qemu-devel] [PATCH for-2.4 1/2] AioContext: avoid leaking BHs on cleanup

2015-07-27 Thread Stefan Hajnoczi
BHs are freed during aio_bh_poll(). This leads to memory leaks if there is no aio_bh_poll() between qemu_bh_delete() and aio_ctx_finalize(). Suggested-by: Paolo Bonzini Signed-off-by: Stefan Hajnoczi --- async.c | 12 1 file changed, 12 insertions(+) diff --git a/async.c b/async.

Re: [Qemu-devel] [PATCH v7 24/42] Add qemu_savevm_state_complete_postcopy

2015-07-27 Thread Dr. David Alan Gilbert
* Amit Shah (amit.s...@redhat.com) wrote: > On (Tue) 16 Jun 2015 [11:26:37], Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > > > Add qemu_savevm_state_complete_postcopy to complement > > qemu_savevm_state_complete_precopy together with a new > > save_live_complete_postc

Re: [Qemu-devel] [PATCH RFC v2 28/47] qapi-commands: Convert to QAPISchemaVisitor

2015-07-27 Thread Markus Armbruster
Eric Blake writes: > On 07/01/2015 02:22 PM, Markus Armbruster wrote: >> Output unchanged except for white-space. > > Indeed, and the diffstat shows it was only one blank line: > > qga-qmp-marshal.c |1 + > 1 file changed, 1 insertion(+) > > MUCH friendlier to review :) > >> >> Signed-off-b

Re: [Qemu-devel] [PATCH v7 19/42] MIG_CMD_PACKAGED: Send a packaged chunk of migration stream

2015-07-27 Thread Dr. David Alan Gilbert
* Amit Shah (amit.s...@redhat.com) wrote: > On (Tue) 16 Jun 2015 [11:26:32], Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > > > MIG_CMD_PACKAGED is a migration command that wraps a chunk of migration > > stream inside a package whose length can be determined purely by

Re: [Qemu-devel] [POC] colo-proxy in qemu

2015-07-27 Thread Dr. David Alan Gilbert
* Jason Wang (jasow...@redhat.com) wrote: > > > On 07/27/2015 01:51 PM, Yang Hongyang wrote: > > On 07/27/2015 12:49 PM, Jason Wang wrote: > >> > >> > >> On 07/27/2015 11:54 AM, Yang Hongyang wrote: > >>> > >>> > >>> On 07/27/2015 11:24 AM, Jason Wang wrote: > > > On 07/24/2015 04:

Re: [Qemu-devel] [PATCH v2] main-loop: fix qemu_notify_event for aio_notify optimization

2015-07-27 Thread Peter Maydell
On 24 July 2015 at 12:42, Paolo Bonzini wrote: > aio_notify can be optimized away, and in fact almost always will. However, > qemu_notify_event is used in places where this is incorrect---most notably, > when handling SIGTERM. When aio_notify is optimized away, it is possible that > QEMU enters

[Qemu-devel] [PATCH v1 2/3] object.c: object_class_dynamic_cast return NULL if the class has no type

2015-07-27 Thread Alistair Francis
If the ObjectClass has no type return NULL instead of trying to compare the type name. Signed-off-by: Alistair Francis Reviewed-by: Sai Pavan Boddu --- qom/object.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/qom/object.c b/qom/object.c index eea8edf..2d6d715 10064

[Qemu-devel] [PATCH v1 1/3] ahci: Separate the AHCI state structure into the header

2015-07-27 Thread Alistair Francis
Pull the AHCI state structure out into the header. This allows other containers to access the struct. This is required to add the device to modern SoC containers. Signed-off-by: Alistair Francis Reviewed-by: Sai Pavan Boddu --- hw/ide/ahci.c | 13 - hw/ide/ahci.h | 14 ++

[Qemu-devel] [PATCH v1 3/3] xlnx-zynqmp: Connect the sysbus AHCI to ZynqMP

2015-07-27 Thread Alistair Francis
Connect the Sysbus AHCI device to ZynqMP. Signed-off-by: Alistair Francis Reviewed-by: Sai Pavan Boddu --- hw/arm/xlnx-zynqmp.c | 20 include/hw/arm/xlnx-zynqmp.h |3 +++ 2 files changed, 23 insertions(+), 0 deletions(-) diff --git a/hw/arm/xlnx-zynqmp.c b/hw

[Qemu-devel] [PATCH v1 0/3] xlnx-zynqmp: Connect the AHCI SATA device

2015-07-27 Thread Alistair Francis
This series connects the AHCI SATA device to the ZynqMP machine. It requires a restructure of the AHCI file to make the AHCI state struct visible. It also requires a small change to object_class_dynamic_cast() to return NULL if the class doesn't have a type. Alistair Francis (3): ahci: Seperate

Re: [Qemu-devel] [PATCH RFC v2 27/47] qapi-visit: Convert to QAPISchemaVisitor, fixing bugs

2015-07-27 Thread Eric Blake
On 07/27/2015 11:53 AM, Markus Armbruster wrote: >> Oh, and that means our generator has a collision bug that none of my >> added tests have exposed yet: you cannot have a base class and >> simultaneously add a member named 'base': >> >> { 'struct': 'Base', 'data': { 'i': 'int' } } >> { 'struct':

[Qemu-devel] [PATCH v5 00/17] qcow2: Add new overlap check functions

2015-07-27 Thread Max Reitz
This is a continuation of previous versions of this series. v2's cover letter was the most elaborate, which you can find here (includes benchmarks): http://lists.nongnu.org/archive/html/qemu-devel/2014-11/msg03430.html See patch 1 for an explanation of why this series exists and what it does. Patc

[Qemu-devel] [PATCH v5 02/17] qcow2: Pull up overlap check option evaluation

2015-07-27 Thread Max Reitz
Pull up the absorption of the qcow2-relevant command line options and the evaluation of the overlap check options in qcow2_open(). Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- block/qcow2.c | 96 +-- 1 file changed, 48 insertions(+

[Qemu-devel] [PATCH v5 04/17] qcow2/overlaps: Protect image header

2015-07-27 Thread Max Reitz
Enter the image header into the metadata list to protect it against accidental modifications. Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- block/qcow2.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/block/qcow2.c b/block/qcow2.c index d30d008..9815325 100644 --- a/block/qcow2.c

[Qemu-devel] [PATCH v5 05/17] qcow2/overlaps: Protect refcount table

2015-07-27 Thread Max Reitz
Keep track of the refcount table in the metadata list to protect it against accidental modifications. Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- block/qcow2-refcount.c | 18 ++ block/qcow2.c | 4 2 files changed, 22 insertions(+) diff --git a/block/qcow

[Qemu-devel] [PATCH v5 07/17] qcow2/overlaps: Protect active L1 table

2015-07-27 Thread Max Reitz
Keep track of the active L1 table in the metadata list to protect it against accidental modifications. Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- block/qcow2-cluster.c | 11 +++ block/qcow2-snapshot.c | 10 ++ block/qcow2.c | 4 3 files changed, 25 inse

[Qemu-devel] [PATCH v5 01/17] qcow2: Add new overlap check functions

2015-07-27 Thread Max Reitz
The existing qcow2 metadata overlap detection function used existing structures to determine the location of the image metadata, from plain fields such as l1_table_offset and l1_size in the BDRVQcowState, over image structures in memory such as the L1 table for the L2 tables' positions, or it even

[Qemu-devel] [PATCH v5 06/17] qcow2/overlaps: Protect refcount blocks

2015-07-27 Thread Max Reitz
Keep track of the refcount blocks in the metadata list to protect them against accidental modifications. Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- block/qcow2-refcount.c | 38 +- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/block/q

[Qemu-devel] [PATCH v5 09/17] qcow2/overlaps: Protect snapshot table

2015-07-27 Thread Max Reitz
Keep track of the snapshot table in the metadata list to protect it against accidental modifications. Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- block/qcow2-snapshot.c | 10 ++ block/qcow2.c | 6 ++ 2 files changed, 16 insertions(+) diff --git a/block/qcow2-snap

[Qemu-devel] [PATCH v5 03/17] qcow2: Create metadata list

2015-07-27 Thread Max Reitz
Create and destroy the metadata list on creation and destruction of a qcow2 BDS, respectively. Skip creation if no overlap checks should be performed. Signed-off-by: Max Reitz --- block/qcow2.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/block/qcow2.c b/block/qcow2.c index 9

[Qemu-devel] [PATCH v5 10/17] qcow2/overlaps: Protect inactive L1 tables

2015-07-27 Thread Max Reitz
Keep track of the inactive L1 tables in the metadata list to protect them against accidental modifications. Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- block/qcow2-snapshot.c | 25 + 1 file changed, 25 insertions(+) diff --git a/block/qcow2-snapshot.c b/block/q

[Qemu-devel] [PATCH v5 08/17] qcow2/overlaps: Protect active L2 tables

2015-07-27 Thread Max Reitz
Keep track of the active L2 tables in the metadata list to protect them against accidental modifications. Signed-off-by: Max Reitz --- block/qcow2-cluster.c | 2 ++ block/qcow2-refcount.c | 6 ++ block/qcow2-snapshot.c | 21 + block/qcow2.c | 8 +++- 4 fi

[Qemu-devel] [PATCH v5 12/17] qcow2: Use new metadata overlap check function

2015-07-27 Thread Max Reitz
Make the static new overlap check function global and drop the old function. Signed-off-by: Max Reitz --- block/qcow2-overlap.c | 8 +--- block/qcow2-refcount.c | 120 - 2 files changed, 2 insertions(+), 126 deletions(-) diff --git a/block/qcow

[Qemu-devel] [PATCH v5 14/17] qcow2/overlaps: Add memory usage limit

2015-07-27 Thread Max Reitz
This adds an adjustable limit for the total memory usage of the overlap prevention structures. Signed-off-by: Max Reitz --- block/qcow2-overlap.c | 183 +++--- block/qcow2.c | 2 +- block/qcow2.h | 2 +- 3 files changed, 177 inserti

[Qemu-devel] [PATCH v5 15/17] qcow2: Add overlap structure memory size options

2015-07-27 Thread Max Reitz
Add runtime options to qcow2 to control the size of the structures used for metadata overlap prevention (one option to control the size of the bitmap cache, another one to control the total memory size limit). Signed-off-by: Max Reitz --- block/qcow2.c | 35 +-- b

[Qemu-devel] [PATCH v5 11/17] qcow2/overlaps: Protect inactive L2 tables

2015-07-27 Thread Max Reitz
Keep track of the inactive L2 tables in the metadata list to protect them against accidental modifications. Signed-off-by: Max Reitz --- block/qcow2-refcount.c | 20 block/qcow2-snapshot.c | 43 --- 2 files changed, 60 insertions(+), 3

[Qemu-devel] [PATCH v5 13/17] qcow2/overlaps: Add "memory limit reached" event

2015-07-27 Thread Max Reitz
Later, a mechanism to set a limit on how much memory may be used for the overlap prevention structures will be introduced. If that limit is about to be exceeded, a QMP event should be emitted. This very event is specified by this patch. Signed-off-by: Max Reitz --- docs/qmp/qmp-events.txt | 27 +

[Qemu-devel] [PATCH v5 17/17] iotests: Test qcow2's overlap check memory limit

2015-07-27 Thread Max Reitz
This patch adds some test cases for the memory limit concerning the in-memory structures used to detect and prevent accidental metadata overlaps. Signed-off-by: Max Reitz --- tests/qemu-iotests/060 | 222 + tests/qemu-iotests/060.out | 47

[Qemu-devel] [PATCH v5 16/17] qapi: Expose new qcow2 overlap check options

2015-07-27 Thread Max Reitz
Expose the two new options for controlling the memory usage of the overlap check implementation via QAPI. Signed-off-by: Max Reitz --- qapi/block-core.json | 31 +++ 1 file changed, 31 insertions(+) diff --git a/qapi/block-core.json b/qapi/block-core.json index 7b2ef

Re: [Qemu-devel] [PATCH for-2.4-rc3 0/3] a tiny bit late SMM fixups

2015-07-27 Thread Michael Tokarev
24.07.2015 21:15, Laszlo Ersek wrote: > So, I just happened to resume my SMM-for-OVMF work today, with > v2.4.0-rc2-2-g12e21eb, and I suddenly realized that these patches never > made upstream. The first two are trivial and I kinda "insist" on them > :), the last one (from Paolo) doesn't seem that

Re: [Qemu-devel] [PATCH] qapi: use 'type' in generated C code to match QMP union wire form

2015-07-27 Thread Eric Blake
On 07/27/2015 11:30 AM, Eric Blake wrote: > When dealing with simple qapi unions, the code was generating a > discriminator field of 'kind' even though the discriminator is > sent as 'type' over QMP. Renaming things to match gets us one > step closer to reusing common generator code for both simpl

Re: [Qemu-devel] [PATCH] qemu-common.h: Document cutils.c string functions

2015-07-27 Thread Michael Tokarev
19.07.2015 23:34, Peter Maydell wrote: > Add documentation comments for various utility string functions > which we have implemented in util/cutils.c Applied to -trivial, thanks! /mjt

Re: [Qemu-devel] [PATCH for-2.4] make: Clean build messages

2015-07-27 Thread Michael Tokarev
18.07.2015 17:54, Stefan Weil wrote: > We want to have uniform build messages, so fix some messages > which did not follow the standard pattern. Applied to -trivial, thanks! /mjt

Re: [Qemu-devel] [PATCH] vmstate: remove unused declaration

2015-07-27 Thread Michael Tokarev
14.07.2015 00:09, Marc-André Lureau wrote: > cc-ing qemu trivial > > On Tue, Jun 23, 2015 at 6:41 PM, Marc-André Lureau > wrote: >> Since 38e0735e, register_device_unmigratable() has been removed Applied to -trivial, thanks! /mjt

Re: [Qemu-devel] [PATCH] gitignore: Ignore shader generated files

2015-07-27 Thread Michael Tokarev
23.06.2015 15:30, Michal Privoznik wrote: > As of d98bc0b65 there are two files that are automatically generated: > ui/shader/texture-blit-frag.h and /ui/shader/texture-blit-vert.h. None > of them is wanted to be tracked by git. Put them into the ignore file > then. Applied to -trivial, thanks! /

Re: [Qemu-devel] [PATCH 2/5] qapi: add missing @

2015-07-27 Thread Michael Tokarev
03.07.2015 13:09, Markus Armbruster write: > Marc-André Lureau writes: > >> Signed-off-by: Marc-André Lureau >> --- >> qapi-schema.json | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/qapi-schema.json b/qapi-schema.json >> index 71c894e..1d3ee6b 100644 >> --- a/qapi-

Re: [Qemu-devel] [PATCH] gdbstub: Set current CPU on interruptions

2015-07-27 Thread Michael Tokarev
24.07.2015 19:52, Jan Kiszka wrote: > gdb expects that the thread ID for c and g-class operations is set to > the CPU we provide when reporting VM stop conditions. If the stub is > still tuned to a different CPU, the wrong information is delivered to > the gdb frontend. Applied to -trivial, thanks

[Qemu-devel] [PULL 02/10] hw/acpi/ich9: clean up stale comment about KVM not supporting SMM

2015-07-27 Thread Michael Tokarev
From: Laszlo Ersek Commit fba72476c6 ("ich9: add smm_enabled field and arguments") detached SMM availability from kvm_enabled(). However, the comment in pm_reset() was not updated; let's do it now. Cc: "Michael S. Tsirkin" Cc: Igor Mammedov Cc: Gerd Hoffmann Cc: Paolo Bonzini Cc: qemu-triv..

[Qemu-devel] [PULL 06/10] vmstate: remove unused declaration

2015-07-27 Thread Michael Tokarev
From: Marc-André Lureau Since 38e0735e, register_device_unmigratable() has been removed Signed-off-by: Marc-André Lureau Signed-off-by: Michael Tokarev --- include/migration/vmstate.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/migration/vmstate.h b/include/migration/vmstate

[Qemu-devel] [PULL 07/10] gitignore: Ignore shader generated files

2015-07-27 Thread Michael Tokarev
From: Michal Privoznik As of d98bc0b65 there are two files that are automatically generated: ui/shader/texture-blit-frag.h and /ui/shader/texture-blit-vert.h. None of them is wanted to be tracked by git. Put them into the ignore file then. Signed-off-by: Michal Privoznik Signed-off-by: Michael

[Qemu-devel] [PULL 08/10] Fix Cortex-A9 global timer

2015-07-27 Thread Michael Tokarev
From: Johannes Schlatow The auto increment bit of the timer control register was wrongly defined. See Cortex-A9 MPcore Technical Reference Manual, Section 4.4.2. Signed-off-by: Johannes Schlatow Signed-off-by: Michael Tokarev --- include/hw/timer/a9gtimer.h | 2 +- 1 file changed, 1 insertio

[Qemu-devel] [PULL for-2.4 00/10] Trivial patches for 2015-07-27

2015-07-27 Thread Michael Tokarev
There are a few patches from the trivial queue which are, I think, suitable for 2.4. These are fixing or adding docs/comments, are minor/trivial cleanups, or small bugfixes. Please consider applying for 2.4. The rest of the trivial tree will be pushed once 2.5 development window will be open, ho

[Qemu-devel] [PULL 04/10] qemu-common.h: Document cutils.c string functions

2015-07-27 Thread Michael Tokarev
From: Peter Maydell Add documentation comments for various utility string functions which we have implemented in util/cutils.c: pstrcpy() strpadcpy() pstrcat() strstart() stristart() qemu_strnlen() qemu_strsep() Signed-off-by: Peter Maydell Reviewed-by: Eric Blake Signed-off-by: Michael

[Qemu-devel] [PULL 03/10] device_tree: Fix a typo

2015-07-27 Thread Michael Tokarev
From: Kamalesh Babulal Fix spelling of 'allocting' -> 'allocating'. Signed-off-by: Kamalesh Babulal Signed-off-by: Michael Tokarev --- device_tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/device_tree.c b/device_tree.c index d2de580..a9f5f8e 100644 --- a/device_tre

[Qemu-devel] [PULL 10/10] gdbstub: Set current CPU on interruptions

2015-07-27 Thread Michael Tokarev
From: Jan Kiszka gdb expects that the thread ID for c and g-class operations is set to the CPU we provide when reporting VM stop conditions. If the stub is still tuned to a different CPU, the wrong information is delivered to the gdb frontend. Signed-off-by: Jan Kiszka Signed-off-by: Michael To

[Qemu-devel] [PULL 05/10] make: Clean build messages

2015-07-27 Thread Michael Tokarev
From: Stefan Weil We want to have uniform build messages, so fix some messages which did not follow the standard pattern. Signed-off-by: Stefan Weil Signed-off-by: Michael Tokarev --- Makefile | 2 +- tests/Makefile | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git

[Qemu-devel] [PULL 09/10] qapi: add missing @

2015-07-27 Thread Michael Tokarev
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Markus Armbruster Signed-off-by: Michael Tokarev --- qapi-schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qapi-schema.json b/qapi-schema.json index a0a45f7..4342a08 100644 --- a/qapi-schema.j

[Qemu-devel] [PULL 01/10] hw/acpi/ich9: clear smi_en on reset

2015-07-27 Thread Michael Tokarev
From: Laszlo Ersek Otherwise on reboot firmware might think (due to APMC_EN remaining set from the previous boot) that SMI support is absent. Cc: "Michael S. Tsirkin" Cc: Igor Mammedov Cc: Gerd Hoffmann Cc: Paolo Bonzini Cc: qemu-triv...@nongnu.org Signed-off-by: Laszlo Ersek Reviewed-by: I

[Qemu-devel] [Bug 1478360] Re: Cant compile on ubuntu 14.04 x64

2015-07-27 Thread Vido
Tnx Peter, just one quick question how should I configure qemu to disable threding I cant find any option with ./configure --help -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1478360 Title: Cant c

Re: [Qemu-devel] [Bug 1478360] Re: Cant compile on ubuntu 14.04 x64

2015-07-27 Thread Peter Maydell
On 27 July 2015 at 21:09, Vido <1478...@bugs.launchpad.net> wrote: > Tnx Peter, just one quick question how should I configure qemu to > disable threding I cant find any option with ./configure --help I'm not sure why you think that's related to this bug. There's no option to disable threading bec

Re: [Qemu-devel] [PULL 01/10] hw/acpi/ich9: clear smi_en on reset

2015-07-27 Thread Michael S. Tsirkin
On Mon, Jul 27, 2015 at 10:54:04PM +0300, Michael Tokarev wrote: > From: Laszlo Ersek > > Otherwise on reboot firmware might think (due to APMC_EN remaining set > from the previous boot) that SMI support is absent. > > Cc: "Michael S. Tsirkin" > Cc: Igor Mammedov > Cc: Gerd Hoffmann > Cc: Pao

Re: [Qemu-devel] [PULL 01/10] hw/acpi/ich9: clear smi_en on reset

2015-07-27 Thread Michael S. Tsirkin
On Mon, Jul 27, 2015 at 11:50:08PM +0300, Michael S. Tsirkin wrote: > On Mon, Jul 27, 2015 at 10:54:04PM +0300, Michael Tokarev wrote: > > From: Laszlo Ersek > > > > Otherwise on reboot firmware might think (due to APMC_EN remaining set > > from the previous boot) that SMI support is absent. > >

[Qemu-devel] [PATCH] virtio: minor cleanup

2015-07-27 Thread Michael S. Tsirkin
There's no need for blk to set ANY_LAYOUT, it's done by virtio core as necessary. Signed-off-by: Michael S. Tsirkin --- hw/block/virtio-blk.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c index 44f9b8e..1556c9c 100644 --- a/hw/block/virtio-blk.c

Re: [Qemu-devel] [PULL for-2.4 0/2] tcg fixes

2015-07-27 Thread Peter Maydell
d391419c0039fe274c74df32a6ca1a28: > > Merge remote-tracking branch > 'remotes/jnsnow/tags/cve-2015-5154-pull-request' into staging (2015-07-27 > 13:10:00 +0100) > > are available in the git repository at: > > git://github.com/rth7680/

[Qemu-devel] [RFC PATCH 0/2] qapi: unbox base classes

2015-07-27 Thread Eric Blake
Depends on Markus' "[PATCH RFC v2 00/47] qapi: QMP introspection", in particular, based on an idea in 7/47 of that series. Note that if we do this, we must fix patch 27/47 of that series to never omit members of a struct when visiting that struct's fields (that is, the base class of a flat union m

[Qemu-devel] [RFC PATCH 2/2] qapi: unbox base members

2015-07-27 Thread Eric Blake
Rather than storing a base class as a pointer to a box, just store the fields of that base class in the same order, so that a child struct can be safely cast to its parent. This gives less malloc overhead, less pointer dereferencing, and even less generated code. Signed-off-by: Eric Blake --- N

[Qemu-devel] [RFC PATCH 1/2] vnc: hoist allocation of VncBasicInfo to callers

2015-07-27 Thread Eric Blake
A future qapi patch will rework generated structs with a base class to be unboxed. In preparation for that, change the code that allocates then populates an info struct to instead merely populate the fields of an info field passed in as a parameter. Add rudimentary Error handling for cases where t

Re: [Qemu-devel] [PATCH RFC v2 07/47] qapi: Generate a nicer struct for flat unions

2015-07-27 Thread Eric Blake
On 07/24/2015 06:01 AM, Markus Armbruster wrote: >> It might be worth tweaking the generator to output a C comment either >> here (at the start of the larger struct)... >> >>> char *string; >>> EnumOne enum1; >> >> ...or here (at the end of the base struct) mentioning that >> UserD

Re: [Qemu-devel] [PATCH RFC v2 27/47] qapi-visit: Convert to QAPISchemaVisitor, fixing bugs

2015-07-27 Thread Eric Blake
On 07/01/2015 02:22 PM, Markus Armbruster wrote: > Fixes flat unions to visit the base's base members (the previous > commit merely added them to the struct). Same test case. > > Patch's effect on visit_type_UserDefFlatUnion(): > > static void visit_type_UserDefFlatUnion_fields(Visitor *m,

Re: [Qemu-devel] [PATCH] qmp-shell: add documentation

2015-07-27 Thread Eric Blake
On 07/26/2015 09:30 PM, John Snow wrote: > > It's a giant circle of people just barely out of the loop. During the > 2.4 window I augmented the QMP shell tool to be able to issue > transactional commands, and improved the json/python parsing for the > key=value pairs. > > It was primarily motiva

Re: [Qemu-devel] [PULL 18/19] macio: move unaligned DMA write code into separate pmac_dma_write() function

2015-07-27 Thread Aurelien Jarno
On 2015-05-22 15:59, John Snow wrote: > From: Mark Cave-Ayland > > Similarly switch the macio IDE routines over to use the new function and > tidy-up the remaining code as required. > > [Maintainer edit: printf format codes adjusted for 32/64bit. --js] > > Signed-off-by: Mark Cave-Ayland > Ack

Re: [Qemu-devel] [PATCH 1/5] qapi: add comment block before ChardevDummy

2015-07-27 Thread Eric Blake
On 07/03/2015 03:51 AM, Marc-André Lureau wrote: > This is mainly to please the doc generation that requires comment block > before the declaration. > > Signed-off-by: Marc-André Lureau > --- > qapi-schema.json | 6 +- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/qapi-

Re: [Qemu-devel] [PATCH] xen: Drop net_rx_ok

2015-07-27 Thread Chen Gang
On 7/27/15 21:16, Stefan Hajnoczi wrote: > On Mon, Jul 20, 2015 at 06:12:09PM +0100, Stefan Hajnoczi wrote: >> On Thu, Jul 02, 2015 at 01:39:16PM +0100, Stefan Hajnoczi wrote: >>> On Tue, Jun 30, 2015 at 10:42:37AM +0800, Fam Zheng wrote: This is necessary because once we return false from .ca

Re: [Qemu-devel] [PATCH 3/5] qapi: add qapi2texi script

2015-07-27 Thread Eric Blake
On 07/03/2015 03:51 AM, Marc-André Lureau wrote: > From: Marc-André Lureau > > As the name suggests, the qapi2texi script converts JSON QAPI > description into a standalone texi file suitable for different target > formats. > > As the documentation format doesn't seem to be specified, it parses

Re: [Qemu-devel] [PATCH 5/5] build-sys: generate QAPI doc based on json

2015-07-27 Thread Eric Blake
On 07/03/2015 03:51 AM, Marc-André Lureau wrote: > Learn to generate info/html/pdf/man documentation for QEMU and agent QMP > APIs. > > This allows to provide missing agent documentation, and should help s/allows to provide/provides/ > getting rid of the duplicate documentation in qmp-commands.h

Re: [Qemu-devel] [PATCH 3/5] qapi: add qapi2texi script

2015-07-27 Thread Marc-André Lureau
Hi - Original Message - > On 07/03/2015 03:51 AM, Marc-André Lureau wrote: > > From: Marc-André Lureau > > > > As the name suggests, the qapi2texi script converts JSON QAPI > > description into a standalone texi file suitable for different target > > formats. > > > > As the documentatio

Re: [Qemu-devel] [PATCH 0/4] hw/net: fix m68/ColdFire ethernet fec support

2015-07-27 Thread Greg Ungerer
Hi Stefan, On 27/07/15 23:11, Stefan Hajnoczi wrote: > On Tue, Jun 30, 2015 at 03:38:11PM +1000, Greg Ungerer wrote: >> Hi Stefan, >> >> On 26/06/15 20:12, Stefan Hajnoczi wrote: >>> On Fri, Jun 26, 2015 at 03:27:12PM +1000, g...@uclinux.org wrote: The following set of patches fixes the

[Qemu-devel] [PATCH v2 00/45] ivshmem improvements (for 2.5)

2015-07-27 Thread Marc-André Lureau
Hi, This series is mostly about adding the client/server code from David Marchand, code cleanups, and little improvements for ivshmem. Finally there is some ivshmem tests (they work fine without kvm). The first series didn't get much feedback. As suggested by Andrew Jones, this second version add

[Qemu-devel] [PATCH v2 05/45] ivshmem: factor out the incoming fifo handling

2015-07-27 Thread Marc-André Lureau
From: Marc-André Lureau Make a new function fifo_update_and_get() that can be reused by other part of the functions. Signed-off-by: Marc-André Lureau --- hw/misc/ivshmem.c | 59 --- 1 file changed, 39 insertions(+), 20 deletions(-) diff --gi

[Qemu-devel] [PATCH v2 02/45] msix: add VMSTATE_MSIX_TEST

2015-07-27 Thread Marc-André Lureau
From: Marc-André Lureau ivshmem is going to use MSIX state conditionally. Signed-off-by: Marc-André Lureau --- include/hw/pci/msix.h | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/include/hw/pci/msix.h b/include/hw/pci/msix.h index 954d82b..72e5f93 100644

[Qemu-devel] [PATCH v2 09/45] ivshmem: more qdev conversion

2015-07-27 Thread Marc-André Lureau
From: Marc-André Lureau Use the latest qemu device modeling API, in particular, convert to realize to fix the error handling; right now a botched device_add ivhsmem command kills the VM. Signed-off-by: Marc-André Lureau --- hw/misc/ivshmem.c | 119 +++---

[Qemu-devel] [PATCH v2 01/45] char: add qemu_chr_free()

2015-07-27 Thread Marc-André Lureau
From: Marc-André Lureau If a chardev is allowed to be created outside of QMP, then it must be also possible to free it. This is useful for ivshmem that creates chardev anonymously and must be able to free them. Signed-off-by: Marc-André Lureau --- include/sysemu/char.h | 10 +- qemu-ch

[Qemu-devel] [PATCH v2 03/45] ivhsmem: read do not accept more than sizeof(long)

2015-07-27 Thread Marc-André Lureau
From: Marc-André Lureau ivshmem_read() only reads sizeof(long) from the input buffer. Accepting more could lead to fifo8 abort() on x86 if it's not empty. Signed-off-by: Marc-André Lureau --- hw/misc/ivshmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/misc/ivshmem

[Qemu-devel] [PATCH v2 07/45] ivshmem: remove superflous ivshmem_attr field

2015-07-27 Thread Marc-André Lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- hw/misc/ivshmem.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index fbeb731..5e4b2cc 100644 --- a/hw/misc/ivshmem.c +++ b/hw/misc/ivshmem.c @@ -85,7 +85,6

[Qemu-devel] [PATCH v2 12/45] ivshmem: remove useless ivshmem_update_irq() val argument

2015-07-27 Thread Marc-André Lureau
From: Marc-André Lureau val isn't used in ivshmem_update_irq() function. Signed-off-by: Marc-André Lureau --- hw/misc/ivshmem.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index 66f9c0b..9776e4e 100644 --- a/hw/misc/ivshmem.

[Qemu-devel] [PATCH v2 06/45] ivshmem: remove unnecessary dup()

2015-07-27 Thread Marc-André Lureau
From: Marc-André Lureau qemu_chr_fe_get_msgfd() transfer ownership, there is no need to dup the fd. Signed-off-by: Marc-André Lureau --- hw/misc/ivshmem.c | 21 ++--- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index dd15

[Qemu-devel] [PATCH v2 04/45] ivshmem: fix number of bytes to push to fifo

2015-07-27 Thread Marc-André Lureau
From: Marc-André Lureau If the fifo has 0 bytes, and the read is of size 1, the call to fifo8_push_all() will copy out of bounds data. Signed-off-by: Marc-André Lureau --- hw/misc/ivshmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.

[Qemu-devel] [PATCH v2 19/45] ivshmem: beautify a bit the code

2015-07-27 Thread Marc-André Lureau
From: Marc-André Lureau Use more explicit variables. Signed-off-by: Marc-André Lureau --- hw/misc/ivshmem.c | 26 -- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index 6f3d2fe..84d8ff1 100644 --- a/hw/misc/ivshmem

[Qemu-devel] [PATCH v2 08/45] ivshmem: remove useless doorbell field

2015-07-27 Thread Marc-André Lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- hw/misc/ivshmem.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index 5e4b2cc..1b8204e 100644 --- a/hw/misc/ivshmem.c +++ b/hw/misc/ivshmem.c @@ -71,7 +71,6 @@ typedef struct IVShmemState {

[Qemu-devel] [PATCH v2 10/45] ivshmem: remove last exit(1)

2015-07-27 Thread Marc-André Lureau
From: Marc-André Lureau Failing to create a chardev shouldn't be fatal. Signed-off-by: Marc-André Lureau --- hw/misc/ivshmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index 3af73a5..7ba93c0 100644 --- a/hw/misc/ivshmem.c +++ b/h

[Qemu-devel] [PATCH v2 11/45] ivshmem: increase_dynamic_storage() improvements

2015-07-27 Thread Marc-André Lureau
From: Marc-André Lureau - rename the function resize_peers() to better reflect the content - limit the maximum number of peers to IVSHMEM_MAX_PEERS as MAXUINT16, which is more realistic and also better reflects the limit of the doorbell register. - change the argument to be the size, not the 0-

[Qemu-devel] [PATCH v2 20/45] ivshmem: use common return

2015-07-27 Thread Marc-André Lureau
From: Marc-André Lureau Both if branches return, move this out to common end. Signed-off-by: Marc-André Lureau --- hw/misc/ivshmem.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index 84d8ff1..8fcdd60 100644 --- a/hw/misc/ivshmem.c

[Qemu-devel] [PATCH v2 25/45] ivshmem: add device description

2015-07-27 Thread Marc-André Lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- hw/misc/ivshmem.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index b8167d9..2e9320b 100644 --- a/hw/misc/ivshmem.c +++ b/hw/misc/ivshmem.c @@ -889,6 +889,7 @@ static void ivshmem_class_in

[Qemu-devel] [PATCH v2 14/45] ivshmem: remove max_peer field

2015-07-27 Thread Marc-André Lureau
From: Marc-André Lureau max_peer isn't really useful, it tracks the maximum received VM id, but that quickly matches nb_peers, the size of the peers array. Since VM come and go, there might be sparse peers so it doesn't help much in general to have this value around. Signed-off-by: Marc-André Lu

[Qemu-devel] [PATCH v2 13/45] ivshmem: initialize max_peer to -1

2015-07-27 Thread Marc-André Lureau
From: Marc-André Lureau There is no peer when device is initialized, do not accept doorbell for peer 0. Signed-off-by: Marc-André Lureau --- hw/misc/ivshmem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index 9776e4e..2c78dee 10

[Qemu-devel] [PATCH v2 30/45] contrib: add ivshmem client and server

2015-07-27 Thread Marc-André Lureau
From: David Marchand When using ivshmem devices, notifications between guests can be sent as interrupts using a ivshmem-server (typical use described in documentation). The client is provided as a debug tool. Signed-off-by: Olivier Matz Signed-off-by: David Marchand [fix a valgrind warning, op

[Qemu-devel] [PATCH v2 27/45] ivshmem: replace 'guest' for 'peer' appropriately

2015-07-27 Thread Marc-André Lureau
From: Marc-André Lureau The terms 'guest' and 'peer' are used sometime interchangeably which may be confusing. Instead, use 'peer' for the remote instances of ivshmem clients, and 'guest' for the local VM. Signed-off-by: Marc-André Lureau --- hw/misc/ivshmem.c | 28 ++--

[Qemu-devel] [PATCH v2 15/45] ivshmem: improve debug messages

2015-07-27 Thread Marc-André Lureau
From: Marc-André Lureau Some misc improvements to ivshmem debug. Signed-off-by: Marc-André Lureau --- hw/misc/ivshmem.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index 4958307..0cc5682 100644 --- a/hw/misc/ivshmem.c +++

[Qemu-devel] [PATCH v2 16/45] ivshmem: improve error

2015-07-27 Thread Marc-André Lureau
From: Marc-André Lureau The test whether the chardev is an AF_UNIX socket rejects "-chardev socket,id=chr0,path=/tmp/foo,server,nowait -device ivshmem,chardev=chr0", but fails to explain why. Use an explicit error on why a chardev may be rejected. Signed-off-by: Marc-André Lureau --- hw/misc/

[Qemu-devel] [PATCH v2 29/45] ivshmem: reset mask on device reset

2015-07-27 Thread Marc-André Lureau
From: Marc-André Lureau The interrupt mask is a state value, it should be reset, like the value. Signed-off-by: Marc-André Lureau --- hw/misc/ivshmem.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index ade7456..47a65a2 100644 --- a/hw/misc/ivshmem.

[Qemu-devel] [PATCH v2 36/45] contrib: remove unnecessary strdup()

2015-07-27 Thread Marc-André Lureau
From: Marc-André Lureau getopt() optarg points to argv memory, no need to dup those values, fixes small leaks detected by clang-analyzer. Signed-off-by: Marc-André Lureau --- contrib/ivshmem-client/main.c | 2 +- contrib/ivshmem-server/main.c | 6 +++--- 2 files changed, 4 insertions(+), 4 del

[Qemu-devel] [PATCH v2 17/45] ivshmem: print error on invalid peer id

2015-07-27 Thread Marc-André Lureau
From: Marc-André Lureau The server shouldn't send invalid peer id, so print an error if it's the case. Signed-off-by: Marc-André Lureau --- hw/misc/ivshmem.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index ab13f70..17dc122 100644 --- a/hw/misc/iv

[Qemu-devel] [PATCH v2 18/45] ivshmem: add a warning if eventfd value is 0

2015-07-27 Thread Marc-André Lureau
From: Marc-André Lureau This should not happen according to eventfd(2). Signed-off-by: Marc-André Lureau --- hw/misc/ivshmem.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index 17dc122..6f3d2fe 100644 --- a/hw/misc/ivshmem.c +++ b/hw/misc/ivshmem.c

[Qemu-devel] [PATCH v2 32/45] ivshmem-server: use a uint16 for client ID

2015-07-27 Thread Marc-André Lureau
From: Marc-André Lureau In practice, the number of VM is limited to MAXUINT16 in ivshmem, so use the same limit on the server. Signed-off-by: Marc-André Lureau --- contrib/ivshmem-server/ivshmem-server.c | 11 ++- contrib/ivshmem-server/ivshmem-server.h | 2 +- 2 files changed, 11 ins

[Qemu-devel] [PATCH v2 40/45] ivshmem: do not keep shm_fd open

2015-07-27 Thread Marc-André Lureau
From: Marc-André Lureau Remove shm_fd from device state, closing it as early as possible to avoid leaks. Signed-off-by: Marc-André Lureau --- hw/misc/ivshmem.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index 3dabcdd

[Qemu-devel] [PATCH v2 22/45] ivshmem: migrate with VMStateDescription

2015-07-27 Thread Marc-André Lureau
From: Marc-André Lureau If necessary, load_state_old() could be used to keep compatibility with verison 0. Signed-off-by: Marc-André Lureau --- hw/misc/ivshmem.c | 107 +++--- 1 file changed, 54 insertions(+), 53 deletions(-) diff --git a/hw/mis

[Qemu-devel] [PATCH v2 21/45] ivshmem: use common is_power_of_2()

2015-07-27 Thread Marc-André Lureau
From: Marc-André Lureau The common version correctly checks for 0 value case. Signed-off-by: Marc-André Lureau --- hw/misc/ivshmem.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index 8fcdd60..34da11a 100644 --- a/hw/misc/ivshme

[Qemu-devel] [PATCH v2 24/45] ivshmem: check shm isn't already initialized

2015-07-27 Thread Marc-André Lureau
From: Marc-André Lureau The server should not be allowed to change the shm, this isn't handled by qemu (perhaps it could be though). Signed-off-by: Marc-André Lureau --- hw/misc/ivshmem.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index 9085

[Qemu-devel] [PATCH v2 34/45] docs: update ivshmem device spec

2015-07-27 Thread Marc-André Lureau
From: David Marchand Add some notes on the parts needed to use ivshmem devices: more specifically, explain the purpose of an ivshmem server and the basic concept to use the ivshmem devices in guests. Move some parts of the documentation and re-organise it. Signed-off-by: David Marchand Reviewed

[Qemu-devel] [PATCH v2 23/45] ivshmem: shmfd can be 0

2015-07-27 Thread Marc-André Lureau
From: Marc-André Lureau 0 is a valid fd value, so change conditions and set -1 value early Signed-off-by: Marc-André Lureau --- hw/misc/ivshmem.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index 199086d..9085f7c 100644 --- a/

<    1   2   3   4   >