[Qemu-devel] qemu-system-ppc regression booting MacOS 9.2.1 image

2017-03-12 Thread Mark Cave-Ayland
Hi Nikunj, Testing git master locally I see the following segfault when trying to boot my test MacOS 9.2.1 image: $ gdb --args ./qemu-system-ppc -bios /home/build/src/openbios/openbios.git/openbios/obj-ppc/openbios-qemu.elf.nostrip -cdrom /home/build/src/qemu/image/ppc/MacOS921.iso -boot d -m 51

[Qemu-devel] [Bug 597362] Re: qemu-system-sparc singlestep not work in gdbstub

2017-03-12 Thread Mark Cave-Ayland
I'm sure this has been fixed years ago (and qemu-system-sparc single- step seems fine in local tests) so I'm marking this as "Fix released". ** Changed in: qemu Status: Expired => Fix Released -- You received this bug notification because you are a member of qemu- devel-ml, which is subs

Re: [Qemu-devel] Incorrect memory region address with large 64-bit PCI BARs

2017-03-12 Thread Mark Cave-Ayland
On 12/03/17 03:56, Michael S. Tsirkin wrote: > After looking at it some more, I think the issue is merely with how info > mtree presents information, which confuses instead of helping when > overlap triggers. Specifically > 01ff-01ff (prio 0, i/o): pci-mmio > ...

[Qemu-devel] [Bug 1622547] Re: qemu-system-sparc fatal error Trap 0x29 on Solaris 2.6

2017-03-12 Thread Mark Cave-Ayland
The fix has now been applied to git master (with a CC to qemu-stable) and so should appear in the upcoming 2.9.0 release as well as the stable 2.8.1 release. ** Changed in: qemu Status: New => Fix Committed -- You received this bug notification because you are a member of qemu- devel-ml,

Re: [Qemu-devel] Risu and the PowerPC 970

2017-03-12 Thread Peter Maydell
On 12 March 2017 at 06:10, G 3 wrote: > Does Risu support the PowerPC 970? I tried compiling it but I saw this > error: > > gcc -Wall -D_GNU_SOURCE -DARCH=ppc64 -g -o risu.o -c risu.c > In file included from risu.c:29: > risu.h:27:30: error: risu_reginfo_ppc64.h: No such file or directory > make

[Qemu-devel] [PATCH] memory: use 128 bit in info mtree

2017-03-12 Thread Michael S. Tsirkin
info mtree is doing 64 bit math to figure out addresses from offsets, this does not work ncorrectly incase of overflow. Overflow usually indicates a guest bug, so this is unusual but reporting correct addresses makes it easier to discover what is going on. Reported-by: Mark Cave-Ayland Cc: Paolo

Re: [Qemu-devel] [PATCH] memory: use 128 bit in info mtree

2017-03-12 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Type: series Subject: [Qemu-devel] [PATCH] memory: use 128 bit in info mtree Message-id: 1489345956-29167-1-git-send-email-...@redhat.com === TEST SCRIPT BEGIN === #!/bin/bash BASE=base n=1 total=$(

Re: [Qemu-devel] [PATCH] memory: use 128 bit in info mtree

2017-03-12 Thread Peter Maydell
On 12 March 2017 at 20:12, Michael S. Tsirkin wrote: > info mtree is doing 64 bit math to figure out > addresses from offsets, this does not work ncorrectly > incase of overflow. > > Overflow usually indicates a guest bug, so this is unusual > but reporting correct addresses makes it easier to dis

[Qemu-devel] KVM call for 2017-03-14

2017-03-12 Thread Juan Quintela
Hi Please, send any topic that you are interested in covering. So far the agenda is: - Direction of QEMU and toolstack in light of Google Cloud blog: https://cloudplatform.googleblog.com/2017/01/7-ways-we-harden-our-KVM-hypervisor-at-Google-Cloud-security-in-plaintext.html After discuss

Re: [Qemu-devel] [PATCH V2] migration: expose qemu_announce_self() via qmp

2017-03-12 Thread Germano Veit Michel
On Fri, Mar 3, 2017 at 10:06 PM, Markus Armbruster wrote: > > Please drop this line. > >>> +# >>> +# Example: >>> +# >>> +# -> { "execute": "announce-self" } >>> +# <- { "return": {} } >>> +# >>> +# Since: 2.9 >>> +## >>> +{ 'command': 'announce-self' } >>> + > Hi Markus, Are you talking about t

Re: [Qemu-devel] [PATCH] memory: use 128 bit in info mtree

2017-03-12 Thread Peter Xu
On Sun, Mar 12, 2017 at 09:12:43PM +0200, Michael S. Tsirkin wrote: > info mtree is doing 64 bit math to figure out > addresses from offsets, this does not work ncorrectly > incase of overflow. > > Overflow usually indicates a guest bug, so this is unusual > but reporting correct addresses makes i

[Qemu-devel] [PATCH 1/2] Revert "virtio: unbreak virtio-pci with IOMMU after caching ring translations"

2017-03-12 Thread Jason Wang
This reverts commit 96a8821d21411f10d77ea994af369c6e5c35a2cc. Following patch will come a better solution which does not require a strict order between virtio and IOMMU. CC: Paolo Bonzini Signed-off-by: Jason Wang --- hw/virtio/virtio-pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[Qemu-devel] [PATCH 2/2] pci: introduce a bus master container

2017-03-12 Thread Jason Wang
96a8821d2141 ("virtio: unbreak virtio-pci with IOMMU after caching ring translations") tries to make IOMMU works with virtio memory region cache, but it requires IOMMU to be created before any virtio devices. This is sub optimal, fixing this by introduce a bus master container to make sure address

Re: [Qemu-devel] [PATCH RFC 1/1] block: Handle NULL options correctly in raw_open

2017-03-12 Thread Dong Jia Shi
* Dong Jia Shi [2017-03-08 17:31:05 +0800]: > * Kevin Wolf [2017-03-08 10:13:46 +0100]: > > > Am 08.03.2017 um 03:15 hat Dong Jia Shi geschrieben: > > > A normal call for raw_open should always pass in a non-NULL @options, > > > but for some certain cases (e.g. trying to applying snapshot on a

[Qemu-devel] Swap disks virtualization

2017-03-12 Thread Christopher Pereira
We are currently providing Linux swap disks with QEMU driver, virtio bus and qcow2 type. Do you know any alternatives that provide better performance? Considering that swap disks contain less critical data, QEMU could avoid disk IOs by using unassigned memory whenever possible. This could also

[Qemu-devel] [Bug 1256826] Re: INT instruction bug in WindowsXP

2017-03-12 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1256826 Title: INT instruc

[Qemu-devel] [PATCHv2] hw/net: implement MIB counters in mcf_fec driver

2017-03-12 Thread Greg Ungerer
The FEC ethernet hardware module used on ColdFire SoC parts contains a block of RAM used to maintain hardware counters. This block is accessible via the usual FEC register address space. There is currently no support for this in the QEMU mcf_fec driver. Add support for storing a MIB RAM block, and

Re: [Qemu-devel] [PATCH V2] migration: expose qemu_announce_self() via qmp

2017-03-12 Thread Markus Armbruster
Germano Veit Michel writes: > On Fri, Mar 3, 2017 at 10:06 PM, Markus Armbruster wrote: diff --git a/qapi-schema.json b/qapi-schema.json index baa0d26..0d9bffd 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -6080,3 +6080,21 @@ # ## { 'command':

Re: [Qemu-devel] qemu-system-ppc regression booting MacOS 9.2.1 image

2017-03-12 Thread aNikunj A Dadhania
Hi Mark, Mark Cave-Ayland writes: > Hi Nikunj, > > Testing git master locally I see the following segfault when trying to > boot my test MacOS 9.2.1 image: > > > $ gdb --args ./qemu-system-ppc -bios > /home/build/src/openbios/openbios.git/openbios/obj-ppc/openbios-qemu.elf.nostrip > -cdrom /home/

Re: [Qemu-devel] [PATCH v2] qmp-shell: add persistent command history

2017-03-12 Thread Markus Armbruster
Nir Soffer writes: > On Wed, Mar 8, 2017 at 8:29 AM, Markus Armbruster wrote: >> John Snow writes: >> >>> On 03/07/2017 03:16 AM, Markus Armbruster wrote: John Snow writes: > On 03/06/2017 03:18 AM, Markus Armbruster wrote: >> Nir Soffer writes: >> >>> On Fri, Mar 3,

Re: [Qemu-devel] [PATCH] COLO-compare: Fix trace_event print bug

2017-03-12 Thread Jason Wang
On 2017年03月09日 15:40, Zhang Chen wrote: Because of inet_ntoa() return a statically allocated buffer, subsequent calls will overwrite, So we fix this bug. Signed-off-by: Zhang Chen --- net/colo-compare.c | 33 + 1 file changed, 25 insertions(+), 8 deletions(-

Re: [Qemu-devel] [PATCHv2] hw/net: implement MIB counters in mcf_fec driver

2017-03-12 Thread Jason Wang
On 2017年03月13日 12:56, Greg Ungerer wrote: The FEC ethernet hardware module used on ColdFire SoC parts contains a block of RAM used to maintain hardware counters. This block is accessible via the usual FEC register address space. There is currently no support for this in the QEMU mcf_fec driver.

[Qemu-devel] [PATCH for-2.9 01/47] qapi: Factor QAPISchemaParser._include() out of .__init__()

2017-03-12 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- scripts/qapi.py | 45 +++-- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/scripts/qapi.py b/scripts/qapi.py index 53a4477..345cde1 100644 --- a/scripts/qapi.py +++ b/scripts/qapi.py @@ -268,34 +268,15 @

[Qemu-devel] [PATCH for-2.9 08/47] tests/qapi-schema: Cover empty union base

2017-03-12 Thread Markus Armbruster
The new test case shows off qapi.py choking on an empty union base. Signed-off-by: Markus Armbruster --- tests/Makefile.include | 1 + tests/qapi-schema/union-base-empty.err | 10 ++ tests/qapi-schema/union-base-empty.exit | 1 + tests/qapi-schema/union-base-empty.jso

[Qemu-devel] [PATCH for-2.9 04/47] docs/qapi-code-gen.txt: Drop confusing reference to 'gen'

2017-03-12 Thread Markus Armbruster
Section "Commands" qualifies its rules on permitted argument and return types "with one exception noted below when 'gen' is used". The note went away in commit 2d21291. Clean up the dangling references. Signed-off-by: Markus Armbruster --- docs/qapi-code-gen.txt | 18 -- 1 file

[Qemu-devel] [PATCH for-2.9 09/47] qapi: Fix to reject empty union base gracefully

2017-03-12 Thread Markus Armbruster
Common Python pitfall: 'assert base_members' fires on [] in addition to None. Correct to 'assert base_members is not None'. Signed-off-by: Markus Armbruster --- scripts/qapi.py| 2 +- tests/qapi-schema/union-base-empty.err | 11 +-- 2 files changed, 2 insertions

[Qemu-devel] [PATCH for-2.9 02/47] qapi: Make doc comments optional where we don't need them

2017-03-12 Thread Markus Armbruster
Since we added the documentation generator in commit 3313b61, doc comments are mandatory. That's a very good idea for a schema that needs to be documented, but has proven to be annoying for testing. Make doc comments optional again, but add a new directive { 'pragma': { 'doc-required': true

[Qemu-devel] [PATCH for-2.9 00/47] qapi: Put type information back into QMP documentation

2017-03-12 Thread Markus Armbruster
I'm proposing this is 2.9 because it fixes a documentation regression. It affects only documentation; generated C code is unchanged except for the removal of trailing space in PATCH 46. Based on my qapi-next branch, which contains Marc-André's PATCH 1/2. Marc-André's work to merge qmp-commands.tx

[Qemu-devel] [PATCH for-2.9 13/47] qapi: Fix QAPISchemaEnumType.is_implicit() for 'QType'

2017-03-12 Thread Markus Armbruster
Missed in commit 7264f5c. Harmless, because nothing checks whether an enumeration type is implicit so far. Signed-off-by: Markus Armbruster --- scripts/qapi.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/qapi.py b/scripts/qapi.py index e6d023f..7a2b6ab 100644

[Qemu-devel] [PATCH for-2.9 10/47] qapi2texi: Fix up output around #optional

2017-03-12 Thread Markus Armbruster
We use tag #optional to mark optional members, like this: # @name: #optional The name of the guest texi_body() strips #optional, but not whitespace around it. For the above, we get in qemu-qmp-qapi.texi @item @code{'name'} (optional) The name of the guest @end table The extra

[Qemu-devel] [PATCH for-2.9 11/47] qapi: Avoid unwanted blank lines in QAPIDoc

2017-03-12 Thread Markus Armbruster
We silently fix missing #optional tags for QAPIDoc by appending a line "#optional" to the section's .content. However, this interferes with .__repr__ stripping trailing blank lines from .content. Use new ArgSection instance variable .optional instead, and leave .content alone. To permit testing

[Qemu-devel] [PATCH for-2.9 18/47] qapi: Use raw strings for regular expressions consistently

2017-03-12 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- scripts/qapi.py | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/qapi.py b/scripts/qapi.py index c580e76..6d39ec9 100644 --- a/scripts/qapi.py +++ b/scripts/qapi.py @@ -550,7 +550,7 @@ def discriminator_find_enum_define(expr)

[Qemu-devel] [PATCH for-2.9 06/47] qapi: Have each QAPI schema declare its name rule violations

2017-03-12 Thread Markus Armbruster
qapi.py has a hardcoded white-list of type names that may violate the rule on use of upper and lower case. Add a new pragma directive 'name-case-whitelist', and use it to replace the hard-coded white-list. Signed-off-by: Markus Armbruster --- docs/qapi-code-gen.txt | 6 ++

[Qemu-devel] [PATCH for-2.9 05/47] qapi: Have each QAPI schema declare its returns white-list

2017-03-12 Thread Markus Armbruster
qapi.py has a hardcoded white-list of command names that may violate the rules on permitted return types. Add a new pragma directive 'returns-whitelist', and use it to replace the hard-coded white-list. Signed-off-by: Markus Armbruster --- docs/qapi-code-gen.txt | 13 +++--

[Qemu-devel] [PATCH for-2.9 26/47] qapi2texi: Generate reference to base type members

2017-03-12 Thread Markus Armbruster
The generated documentation doesn't mention object type members inherited from a base type. Fix that. Example change (qemu-qmp-ref.txt): -- Struct: VncServerInfo The network connection information for server Members: 'auth' (optional) authentication method used f

[Qemu-devel] [PATCH for-2.9 07/47] qapi: Clean up build of generated documentation

2017-03-12 Thread Markus Armbruster
Rename intermediate qemu-qapi.texi to qemu-qmp-qapi.texi to match its user qemu-qmp-ref.texi, just like qemu-ga-qapi.texi matches qemu-ga-ref.texi. Build the intermediate .texi next to the sources and the final output in docs/ instead of dumping them into the build root. Fix version.texi dependen

[Qemu-devel] [PATCH for-2.9 29/47] qapi2texi: Use category "Object" for all object types

2017-03-12 Thread Markus Armbruster
At the protocol level, the distinction between struct, flat union and simple union is meaningless, they are all JSON objects. Document them that way. Example change (qemu-qmp-ref.txt): - -- Simple Union: InputEvent + -- Object: InputEvent Input event union. This also fixes the completely

[Qemu-devel] [PATCH for-2.9 20/47] qapi2texi: Plainer enum value and member name formatting

2017-03-12 Thread Markus Armbruster
Use @code{%s} instead of @code{'%s'}. Impact, using @id as example: * Texinfo -@item @code{'id'} +@item @code{id} * HTML -'id' +id * POD (for manual pages): -=item C<'id'> +=item C * Formatted manual pages: -'id' +"id" * Plain text: - ''id'' + 'id' Signed-off-by:

[Qemu-devel] [PATCH for-2.9 42/47] qapi: enum_types is a list used like a dict, make it one

2017-03-12 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- scripts/qapi.py | 29 ++--- 1 file changed, 6 insertions(+), 23 deletions(-) diff --git a/scripts/qapi.py b/scripts/qapi.py index f06e3c4..5a3a606 100644 --- a/scripts/qapi.py +++ b/scripts/qapi.py @@ -46,7 +46,7 @@ returns_whitelist =

[Qemu-devel] [PATCH for-2.9 23/47] qapi2texi: Don't hide undocumented members and arguments

2017-03-12 Thread Markus Armbruster
Show undocumented object, alternate type members and command, event arguments exactly like undocumented enumeration type values. Example change (qemu-qmp-ref.txt): -- Command: query-rocker Return rocker switch information. + Arguments: + 'name' + Not documented +

[Qemu-devel] [PATCH for-2.9 22/47] qapi2texi: Explain enum value undocumentedness more clearly

2017-03-12 Thread Markus Armbruster
Instead of not saying anything when we have no documentation, say "Not documented". Example change (qemu-qmp-ref.txt): -- Enum: GuestPanicAction An enumeration of the actions taken when guest OS panic is detected Values: 'pause' system pauses 'poweroff' +

[Qemu-devel] [PATCH for-2.9 25/47] qapi2texi: Include member type in generated documentation

2017-03-12 Thread Markus Armbruster
The recent merge of docs/qmp-commands.txt and docs/qmp-events.txt into the schema lost type information. Fix this documentation regression. Example change (qemu-qmp-ref.txt): -- Struct: InputKeyEvent Keyboard input event. Members: - 'button' + 'button: InputButton'

[Qemu-devel] [PATCH for-2.9 28/47] qapi2texi: Generate descriptions for simple union tags

2017-03-12 Thread Markus Armbruster
Simple union tags carry no type information, because their type is implicit. Their description should make up for it, but many have none. Generate one automatically then. Example change (qemu-qmp-ref.txt): -- Simple Union: ImageInfoSpecific A discriminated record of image format specif

[Qemu-devel] [PATCH for-2.9 12/47] qapi/rocker: Fix up doc comment notes on optional members

2017-03-12 Thread Markus Armbruster
Talking about #optional like this # Note: fields are marked #optional to indicate that they may or may # not appear ... doesn't work so well in generated documentation, because the #optional tag is not visible there. Replace by # Note: optional members may or may not appear ... Sig

[Qemu-devel] [PATCH for-2.9 35/47] tests/qapi-schema: Rename doc-bad-args to doc-bad-command-arg

2017-03-12 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- tests/Makefile.include| 2 +- tests/qapi-schema/doc-bad-args.err| 1 - tests/qapi-schema/doc-bad-command-arg.err | 1 + tests/qapi-schema/{doc-bad-args.exit =>

[Qemu-devel] [PATCH for-2.9 15/47] qapi: Conjure up QAPIDoc.ArgSection for undocumented members

2017-03-12 Thread Markus Armbruster
qapi2texi.py already conjures up ArgSections for undocumented enumeration values, in texi_enum). Drop that, and conjure them up for all kinds of "arguments" (enumeration values, object and alternate type members) in qapi.py instead. Take care to keep generated documentation exactly the same for n

[Qemu-devel] [PATCH for-2.9 34/47] qapi: Move empty doc section checking to doc parser

2017-03-12 Thread Markus Armbruster
Results in a more precise error location, but the real reason is emptying out check_docs() step by step. Signed-off-by: Markus Armbruster --- scripts/qapi.py | 20 ++-- tests/qapi-schema/doc-empty-section.err | 2 +- 2 files changed, 15 insertions(+), 7 d

[Qemu-devel] [PATCH for-2.9 21/47] qapi2texi: Present the table of members more clearly

2017-03-12 Thread Markus Armbruster
The table of members follows the main descriptive text immediately. Makes it hard to see what it is about. Start a new paragraph, and lead with a line "Members:" for object and alternate types, "Values:" for enumeration types, and "Arguments:" for commands and events. Example change (qemu-qmp-ref

[Qemu-devel] [PATCH for-2.9 24/47] qapi2texi: Implement boxed argument documentation

2017-03-12 Thread Markus Armbruster
This replaces manual references like "For the arguments, see the documentation of ..." by a generated reference "Arguments: the members of ...". Signed-off-by: Markus Armbruster --- qapi-schema.json | 2 +- qapi/block-core.json | 10 -- scripts/qapi2texi.py | 8 +++- 3 files ch

[Qemu-devel] [PATCH for-2.9 40/47] qapi: Simplify what gets stored in enum_types

2017-03-12 Thread Markus Armbruster
Don't invent a new dictionary structure just for enum_types, simply store the defining expression, like we do for struct_types and union_types. Signed-off-by: Markus Armbruster --- scripts/qapi.py | 29 +++-- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a

[Qemu-devel] [PATCH for-2.9 27/47] qapi2texi: Generate documentation for variant members

2017-03-12 Thread Markus Armbruster
A flat union's branch brings in the members of another type. Generate a suitable reference to that type. Example change (qemu-qmp-ref.txt): -- Flat Union: QCryptoBlockOpenOptions The options that are available for all encryption formats when opening an existing volume Membe

[Qemu-devel] [PATCH for-2.9 39/47] qapi: Drop unused variable events

2017-03-12 Thread Markus Armbruster
Missed in commit e98859a Signed-off-by: Markus Armbruster --- scripts/qapi.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/scripts/qapi.py b/scripts/qapi.py index 0da426a..12b1bda 100644 --- a/scripts/qapi.py +++ b/scripts/qapi.py @@ -49,7 +49,6 @@ name_case_whitelist = [] enum_types =

[Qemu-devel] [PATCH for-2.9 03/47] qapi: Back out doc comments added just to please qapi.py

2017-03-12 Thread Markus Armbruster
This reverts commit 3313b61's changes to tests/qapi-schema/, except for tests/qapi-schema/doc-*. Signed-off-by: Markus Armbruster --- tests/qapi-schema/alternate-any.err| 2 +- tests/qapi-schema/alternate-any.json | 4 - tests/qapi-schema/alternate-array.err

[Qemu-devel] [PATCH for-2.9 43/47] qapi: struct_types is a list used like a dict, make it one

2017-03-12 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- scripts/qapi.py | 21 - 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/scripts/qapi.py b/scripts/qapi.py index 5a3a606..ab266db 100644 --- a/scripts/qapi.py +++ b/scripts/qapi.py @@ -47,7 +47,7 @@ returns_whitelist = [] nam

[Qemu-devel] [PATCH for-2.9 38/47] qapi: Eliminate check_docs() and drop QAPIDoc.expr

2017-03-12 Thread Markus Armbruster
Move what's left in check_docs() to check_expr(). Delegate the actual checking to new QAPIDoc.check_expr(). QAPIDoc.expr is now unused; drop it. Signed-off-by: Markus Armbruster --- scripts/qapi.py | 27 ++- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git

[Qemu-devel] [PATCH for-2.9 31/47] qapi: Fix detection of doc / expression mismatch

2017-03-12 Thread Markus Armbruster
This fixes the errors uncovered by the previous commit. Signed-off-by: Markus Armbruster --- scripts/qapi.py| 34 +- tests/qapi-schema/doc-bad-expr.err | 1 + tests/qapi-schema/doc-bad-expr.exit| 2 +- tests/qapi-schema/doc-bad-ex

[Qemu-devel] [PATCH for-2.9 46/47] qapi: Make pylint a bit happier

2017-03-12 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- scripts/qapi-commands.py | 6 +++--- scripts/qapi-visit.py| 1 - scripts/qapi.py | 8 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/scripts/qapi-commands.py b/scripts/qapi-commands.py index 0c05449..1943de4 100644 --- a/s

[Qemu-devel] [PATCH for-2.9 14/47] qapi: Prepare for requiring more complete documentation

2017-03-12 Thread Markus Armbruster
We currently neglect to check all enumeration values, common members of object types and members of alternate types are documented. Unsurprisingly, many aren't. Add the necessary plumbing to find undocumented ones, except for variant members of object types. Don't enforce anything just yet, but c

[Qemu-devel] [PATCH for-2.9 32/47] qapi: Move detection of doc / expression name mismatch

2017-03-12 Thread Markus Armbruster
Move the check whether the doc matches the expression name from check_definition_doc() to check_exprs(). This changes the error location from the comment to the expression. Makes sense as the message talks about the expresion: "Definition of '%s' follows documentation for '%s'". It's also a step

[Qemu-devel] [PATCH for-2.9 37/47] qapi: Fix detection of bogus member documentation

2017-03-12 Thread Markus Armbruster
check_definition_doc() checks for member documentation without a matching member. It laboriously second-guesses what members QAPISchema._def_exprs() will create. That's a stupid game. Move the check into QAPISchema.check(), where the members are known. Delegate the actual checking to new QAPIDoc

[Qemu-devel] [PATCH for-2.9 16/47] qapi2texi: Convert to QAPISchemaVisitor

2017-03-12 Thread Markus Armbruster
qapi2texi works with schema expression trees. Such a tight coupling to schema language syntax is not a good idea. Convert it to the visitor interface the other generators use. No change to generated documentation. Signed-off-by: Markus Armbruster --- scripts/qapi2texi.py | 228 +++

[Qemu-devel] [PATCH for-2.9 36/47] tests/qapi-schema: Improve coverage of bogus member docs

2017-03-12 Thread Markus Armbruster
New test doc-bad-union-member.json shows we can fail to reject documentation for nonexistent members. Signed-off-by: Markus Armbruster --- tests/Makefile.include | 2 ++ tests/qapi-schema/doc-bad-alternate-member.err | 1 + tests/qapi-schema/doc-bad-alternate-member.e

[Qemu-devel] [PATCH for-2.9 45/47] qapi: Drop unused .check_clash() parameter schema

2017-03-12 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- scripts/qapi.py | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/qapi.py b/scripts/qapi.py index 870ff4e..4102011 100644 --- a/scripts/qapi.py +++ b/scripts/qapi.py @@ -1178,7 +1178,7 @@ class QAPISchemaObjectType(QAPISche

[Qemu-devel] [PATCH for-2.9 30/47] tests/qapi-schema: Improve doc / expression mismatch coverage

2017-03-12 Thread Markus Armbruster
New test doc-bad-expr.json shows we fail to reject a misplaced expression comment. New test doc-no-symbol.json shows a bad error message. Signed-off-by: Markus Armbruster --- tests/Makefile.include | 2 ++ tests/qapi-schema/doc-bad-expr.err | 0 tests/qapi-schema/doc-bad-expr.ex

[Qemu-devel] [PATCH V2 1/3] virtio: guard against NULL pfn

2017-03-12 Thread Jason Wang
To avoid access stale memory region cache after reset, this patch check the existence of virtqueue pfn for all exported virtqueue access helpers before trying to use them. Cc: Cornelia Huck Cc: Paolo Bonzini Signed-off-by: Jason Wang --- hw/virtio/virtio.c | 21 + 1 file ch

[Qemu-devel] [PATCH for-2.9 41/47] qapi: Factor add_name() calls out of the meta conditional

2017-03-12 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- scripts/qapi.py | 24 +--- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/scripts/qapi.py b/scripts/qapi.py index ffd30d2..f06e3c4 100644 --- a/scripts/qapi.py +++ b/scripts/qapi.py @@ -635,8 +635,6 @@ def add_name(name, inf

[Qemu-devel] [PATCH for-2.9 47/47] qapi: Fix a misleading parser error message

2017-03-12 Thread Markus Armbruster
When choking on a token where an expression is expected, we report 'Expected "{", "[" or string'. Close, but no cigar. Fix it to Expected '"{", "[", string, boolean or "null"'. Missed in commit e53188a. Signed-off-by: Markus Armbruster --- scripts/qapi.py | 3 ++- te

[Qemu-devel] [PATCH for-2.9 33/47] qapi: Improve error message on @NAME: in free-form doc

2017-03-12 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- scripts/qapi.py | 17 ++--- tests/qapi-schema/doc-invalid-section.err | 2 +- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/scripts/qapi.py b/scripts/qapi.py index ca8d1f0..8d34651 100644 --- a/scripts/q

Re: [Qemu-devel] [PATCH 0/3] COLO-compare: Make COLO-compare support Xen

2017-03-12 Thread Zhang Chen
Hi~~~ All~ No news for a long time, anyone can give me some comments? Thanks Zhang Chen On 02/28/2017 06:48 PM, Zhang Chen wrote: This series focus on COLO Xen support. We add a new chardev socket in colo-compare as the way of communicate with Xen COLO-frame. Xen part: https://lists.xenproj

[Qemu-devel] [PATCH for-2.9 44/47] qapi: union_types is a list used like a dict, make it one

2017-03-12 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- scripts/qapi.py | 19 +++ 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/scripts/qapi.py b/scripts/qapi.py index ab266db..870ff4e 100644 --- a/scripts/qapi.py +++ b/scripts/qapi.py @@ -48,7 +48,7 @@ name_case_whitelist = [] e

Re: [Qemu-devel] [PATCH for-2.9 34/47] qapi: Move empty doc section checking to doc parser

2017-03-12 Thread Markus Armbruster
Markus Armbruster writes: > Results in a more precise error location, but the real reason is > emptying out check_docs() step by step. > > Signed-off-by: Markus Armbruster Perhaps we should simply drop this error condition. Are empty sections this a mistake users make accidentally?

[Qemu-devel] [PATCH for-2.9 19/47] qapi: Prefer single-quoted strings more consistently

2017-03-12 Thread Markus Armbruster
PEP 8 advises: In Python, single-quoted strings and double-quoted strings are the same. This PEP does not make a recommendation for this. Pick a rule and stick to it. When a string contains single or double quote characters, however, use the other one to avoid backslashes in

Re: [Qemu-devel] [PATCH 0/3] COLO-compare: Make COLO-compare support Xen

2017-03-12 Thread Jason Wang
On 2017年03月13日 14:18, Zhang Chen wrote: Hi~~~ All~ No news for a long time, anyone can give me some comments? Hi, A question is why use two kinds of colo-frames? This seems not good as lots of the code were duplicated. Thanks Thanks Zhang Chen On 02/28/2017 06:48 PM, Zhang Chen wr

[Qemu-devel] [PATCH for-2.9 17/47] qapi: The #optional tag is redundant, drop

2017-03-12 Thread Markus Armbruster
We traditionally mark optional members #optional in the doc comment. Before commit 3313b61, this was entirely manual. Commit 3313b61 added some automation because its qapi2texi.py relied on #optional to determine whether a member is optional. This is no longer the case since the previous commit:

[Qemu-devel] [PATCH V2 3/3] virtio: validate address space cache during init

2017-03-12 Thread Jason Wang
We don't check the return value of address_space_cache_init(), this may lead buggy driver use incorrect region caches. Instead of triggering an assert, catch and warn this early in virtio_init_region_cache(). Cc: Cornelia Huck Cc: Paolo Bonzini Signed-off-by: Jason Wang --- hw/virtio/virtio.c

[Qemu-devel] [PATCH V2 2/3] virtio: destroy region cache during reset

2017-03-12 Thread Jason Wang
We don't destroy region cache during reset which can make the maps of previous driver leaked to a buggy or malicious driver that don't set vring address before starting to use the device. Fix this by destroy the region cache during reset and validate it before trying to see them. Cc: Cornelia Huck

[Qemu-devel] [PATCH] qemu-img: show help for invalid global options

2017-03-12 Thread Stefan Hajnoczi
The qemu-img sub-command executes regardless of invalid global options: $ qemu-img --foo info test.img qemu-img: unrecognized option '--foo' image: test.img ... The unrecognized option warning may be missed by the user. This can hide incorrect command-lines in scripts and confuse users.

Re: [Qemu-devel] [RFC 0/4] qemu-img: add max-size subcommand

2017-03-12 Thread Stefan Hajnoczi
On Sat, Mar 04, 2017 at 12:15:00AM +0200, Nir Soffer wrote: > On Sat, Mar 4, 2017 at 12:02 AM, John Snow wrote: > > > > > > On 03/03/2017 04:38 PM, Nir Soffer wrote: > >> On Fri, Mar 3, 2017 at 3:51 PM, Stefan Hajnoczi > >> wrote: > >>> > >>> RFCv1: > >>> * Publishing patch series with just raw