Re: [Qemu-devel] [PATCH v6 1/6] Qemu-Xen-vTPM: Support for Xen stubdom vTPM command line options

2015-05-05 Thread Eric Blake
On 05/04/2015 01:22 AM, Quan Xu wrote: > Signed-off-by: Quan Xu > > --Changes in v6: > -Remove stray insertion. > --- > configure| 14 ++ > hmp.c| 2 ++ > qapi-schema.json | 16 ++-- > qemu-options.hx | 13 +++-- > tpm.c| 7

Re: [Qemu-devel] [PULL 0/6] sdl2: add opengl rendering support.

2015-05-05 Thread Peter Maydell
e following changes since commit 5bccbb04a4abba7af4398de992bf06d585fd1333: > > Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging > (2015-04-30 20:34:54 +0100) > > are available in the git repository at: > > > git://git.kraxel.org/qemu tags/pull-sdl-20150505-1 > >

Re: [Qemu-devel] [PATCH v6 12/17] target-s390x: Add S390 CPU class initialization routines

2015-05-05 Thread Eduardo Habkost
On Mon, Apr 27, 2015 at 04:53:26PM +0200, Michael Mueller wrote: > This patch provides routines to dynamically update the previously defined > S390 CPU classes in the current host context. The main function performing > this process is s390_setup_cpu_classes(). It takes the current host context > a

Re: [Qemu-devel] [PATCH v6 02/17] Add accelerator id and model name to CPUState

2015-05-05 Thread Eric Blake
On 05/05/2015 07:26 AM, Eduardo Habkost wrote: > On Mon, Apr 27, 2015 at 04:53:16PM +0200, Michael Mueller wrote: >> The patch defines ids per accelerator and adds the accel_id and >> the model_name to the CPUState. The accel_id is initialized by >> common code, the model name needs to be initializ

Re: [Qemu-devel] [PATCH] parallel: Allow to disable CONFIG_PARALLEL

2015-05-05 Thread Markus Armbruster
mreza...@redhat.com writes: > From: Miroslav Rezanina > > Disabling CONFIG_PARALLEL cause build failure as commit 07dc788 factored > out initialization to parallel_hds_isa_init that is not build. > > Make calling parallel_hds_isa_init depending on CONFIG_PARALLEL so it can > be correctly disabled

Re: [Qemu-devel] [PATCH 7/7] disas: arm: Use target_disas impl for monitor

2015-05-05 Thread Claudio Fontana
Hello Peter, On 05.05.2015 06:45, Peter Crosthwaite wrote: > As it is more fully featured. It has multi-endian, thumb and AArch64 > support whereas the existing monitor disas support only has vanilla > AA32 support. > > E.G. Running an AA64 linux kernel the follow -d in_asm disas happens > (taget

Re: [Qemu-devel] [PATCH 6/7] monitor: "i": Add ARM specifics

2015-05-05 Thread Claudio Fontana
On 05.05.2015 06:45, Peter Crosthwaite wrote: > Add the ARM specific disassembly flags setup, so ARM can be correctly > disassembled from the monitor. > > Signed-off-by: Peter Crosthwaite > --- > monitor.c | 11 +++ > 1 file changed, 11 insertions(+) > > diff --git a/monitor.c b/monitor

Re: [Qemu-devel] [PATCH 5/7] disas: arm-a64: Make printfer and stream variable

2015-05-05 Thread Claudio Fontana
On 05.05.2015 06:45, Peter Crosthwaite wrote: > In a normal disassembly flow, the printf and stream being used varies > from disas job to job. In particular it varies if mixing monitor_disas > and target_disas. > > Make both the printfer function and target stream settable in the > QEMUDisassmbler

Re: [Qemu-devel] [PATCH 1/7] disas: Create factored out fn for monitor and target disas

2015-05-05 Thread Claudio Fontana
On 05.05.2015 06:44, Peter Crosthwaite wrote: > The monitor_ and target_ disas function do mostly the same thing. > One dissambles target instructions on behalf of the log, the other > for the monitor command "xp/i" and friends. > > There is a #if defined TARGET_FOO switch duplicated between both

Re: [Qemu-devel] [PATCH v6 02/17] Add accelerator id and model name to CPUState

2015-05-05 Thread Eduardo Habkost
On Tue, May 05, 2015 at 08:36:45AM -0600, Eric Blake wrote: > On 05/05/2015 07:26 AM, Eduardo Habkost wrote: > >> +{ 'enum': 'AccelId', > >> + 'data': ['qtest', 'tcg', 'kvm', 'xen'] } > >> + > > > > Not sure if it is better to have an enum or simply a string here. > > enum is almost always bette

Re: [Qemu-devel] [PATCH 3/3] target-mips: Misaligned Memory Accesses for MSA

2015-05-05 Thread Leon Alrae
On 01/05/2015 16:43, Peter Maydell wrote: >> +#if !defined(CONFIG_USER_ONLY) >> +static bool cpu_mips_validate_msa_block_access(CPUMIPSState *env, >> +target_ulong address, int df, int >> rw) >> +{ >> +int i; >> +for (i = 0; i < DF_ELEMENTS(df); i++)

Re: [Qemu-devel] [PATCH v1 RFC 34/34] char: introduce support for TLS encrypted TCP chardev backend

2015-05-05 Thread Kashyap Chamarthy
On Tue, May 05, 2015 at 02:49:51PM +0100, Daniel P. Berrange wrote: > On Mon, May 04, 2015 at 10:07:15PM +0200, Kashyap Chamarthy wrote: > > On Fri, Apr 17, 2015 at 03:22:37PM +0100, Daniel P. Berrange wrote: > > > This integrates support for QIOChannelTLS object in the TCP > > > chardev backend. I

Re: [Qemu-devel] [PATCH v3 3/6] spapr_pci: encode class code including Prog IF register

2015-05-05 Thread Thomas Huth
On Tue, 5 May 2015 22:55:00 +1000 David Gibson wrote: > On Tue, May 05, 2015 at 02:23:53PM +0530, Nikunj A Dadhania wrote: > > Current code missed the Prog IF register. All Class Code, Subclass, > > and Prog IF registers are needed to identify the accurate device type. > > > > For example: USB c

[Qemu-devel] [PATCH 1/2] virtio-console: notify chardev when writable

2015-05-05 Thread Marc-André Lureau
When the virtio serial is writable, notify the chardev backend with qemu_chr_accept_input(). Signed-off-by: Marc-André Lureau --- hw/char/virtio-console.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/hw/char/virtio-console.c b/hw/char/virtio-console.c index 752ed2c..2a867cb 10

[Qemu-devel] [PATCH 2/2] spice-char: notify the server when chardev is writable

2015-05-05 Thread Marc-André Lureau
The spice server is polling on write, unless SPICE_CHAR_DEVICE_NOTIFY_WRITABLE flag is set. In this case, qemu must call spice_server_char_device_wakeup() when the frontend is writable. Signed-off-by: Marc-André Lureau --- spice-qemu-char.c | 11 +++ 1 file changed, 11 insertions(+) dif

[Qemu-devel] [PATCH 0/3] virtio-1 updates

2015-05-05 Thread Cornelia Huck
Hi Michael, I've taken your virtio-1.0 branch and updated it to a more currrent code base. There was some churn mostly in virtio-ccw, but it doesn't hit any obvious errors. I haven't looked at every single patch, collected r-bs etc. that might have been floating around or added my sign-off, but th

[Qemu-devel] [PATCH 2/3] virtio-ccw: BE accesses in SET_VIRTIO_REV

2015-05-05 Thread Cornelia Huck
updates "s390x/virtio-ccw: add virtio set-revision call" Signed-off-by: Cornelia Huck --- hw/s390x/virtio-ccw.c | 19 +-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c index 230b280..e778da9 100644 --- a/hw/s390x/virt

[Qemu-devel] [PATCH 3/3] virtio: rename __virtio_set_features

2015-05-05 Thread Cornelia Huck
We want to avoid reserved leading underscores, so let's call the function virtio_set_features_nocheck() instead. updates "virtio: disallow late feature changes for virtio-1" Signed-off-by: Cornelia Huck --- hw/virtio/virtio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --g

[Qemu-devel] [PATCH 1/3] virtio: legacy features

2015-05-05 Thread Cornelia Huck
Use a "legacy features" instead of a "revision specific" callback. Updates "virtio: support revision-specific features" and "virtio-blk: revision specific feature bits". Signed-off-by: Cornelia Huck --- hw/9pfs/virtio-9p-device.c | 5 +++-- hw/block/virtio-blk.c | 14 -

[Qemu-devel] [PATCH v3 3/3] qemu-sockets: Report explicit error if unlink fails

2015-05-05 Thread Cole Robinson
Consider this case: $ ls -ld ~/root-owned/ drwx--x--x. 2 root root 4096 Apr 29 12:55 /home/crobinso/root-owned/ $ ls -l ~/root-owned/foo.sock -rwxrwxrwx. 1 crobinso crobinso 0 Apr 29 12:55 /home/crobinso/root-owned/foo.sock $ qemu-system-x86_64 -vnc unix:~/root-owned/foo.sock qemu-system-x86_64:

[Qemu-devel] [PATCH v3 0/3] vnc: Fixes for unix socket error handling

2015-05-05 Thread Cole Robinson
Minor fixes for unix socket error handling, see patches for details v3: Scoop up the v2 of patch 3 Fix checkpatch warnings Cole Robinson (3): vnc: Don't assert if opening unix socket fails vnc: Tweak error when init fails qemu-sockets: Report explicit error if unlink fails ui/vnc.

[Qemu-devel] [PATCH v3 2/3] vnc: Tweak error when init fails

2015-05-05 Thread Cole Robinson
Before: qemu-system-x86_64: -display vnc=unix:/root/foo.sock: Failed to start VNC server on `(null)': Failed to bind socket to /root/foo.sock: Permission denied After: qemu-system-x86_64: -display vnc=unix:/root/foo.sock: Failed to start VNC server: Failed to bind socket to /root/foo.sock: Permi

Re: [Qemu-devel] [Qemu-block] [PATCH 1/6] qcow2: use one single memory block for the L2/refcount cache tables

2015-05-05 Thread Alberto Garcia
On Tue 05 May 2015 01:20:19 PM CEST, Kevin Wolf wrote: > Though looking at the code again I see now that c->table_size isn't > consistently used. The I/O requests still use s->cluster_size. We > should either use it everywhere or not introduce it at all. c->table_size is necessary in order to cal

[Qemu-devel] [PATCH v3 1/3] vnc: Don't assert if opening unix socket fails

2015-05-05 Thread Cole Robinson
Reproducer: $ qemu-system-x86_64 -display vnc=unix:/root/i-cant-access-you.sock qemu-system-x86_64: iohandler.c:60: qemu_set_fd_handler2: Assertion `fd >= 0' failed. Aborted (core dumped) Signed-off-by: Cole Robinson --- v3: Fix checkpatch warning ui/vnc.c | 3 +++ 1 file changed, 3 inser

[Qemu-devel] u-boot on qemu-x86

2015-05-05 Thread Saket Sinha
Hi, I am trying to run u-boot as a coreboot payload on qemu-x86.Currently facing some difficulty in the process. Has anyone tried running u-boot bare-metal or as a coreboot payload on qemu-x86 before? Regards, Saket Sinha

Re: [Qemu-devel] [PATCH v3 0/3] vnc: Fixes for unix socket error handling

2015-05-05 Thread Eric Blake
On 05/05/2015 09:07 AM, Cole Robinson wrote: > Minor fixes for unix socket error handling, see patches for details > > v3: > Scoop up the v2 of patch 3 > Fix checkpatch warnings Reviewed-by: Eric Blake > > Cole Robinson (3): > vnc: Don't assert if opening unix socket fails > vnc: T

Re: [Qemu-devel] [PATCH 2/6] qcow2: simplify qcow2_cache_put() and qcow2_cache_entry_mark_dirty()

2015-05-05 Thread Eric Blake
On 04/30/2015 04:11 AM, Alberto Garcia wrote: > Since all tables are now stored together, it is possible to obtain > the position of a particular table directly from its address, so the > operation becomes O(1). > > Signed-off-by: Alberto Garcia > --- > block/qcow2-cache.c | 22 +

Re: [Qemu-devel] [PATCH COLO v3 01/14] docs: block replication's description

2015-05-05 Thread Dr. David Alan Gilbert
* Stefan Hajnoczi (stefa...@redhat.com) wrote: > On Fri, Apr 24, 2015 at 11:36:35AM +0200, Paolo Bonzini wrote: > > > > > > On 24/04/2015 11:38, Wen Congyang wrote: > > >> > > > >> > That can be done with drive-mirror. But I think it's too early for > > >> > that. > > > Do you mean use drive-m

Re: [Qemu-devel] [PATCH v3 4/6] spapr_pci: enumerate and add PCI device tree

2015-05-05 Thread Thomas Huth
On Tue, 5 May 2015 14:23:54 +0530 Nikunj A Dadhania wrote: > All the PCI enumeration and device node creation was off-loaded to > SLOF. With PCI hotplug support, code needed to be added to add device > node. This creates multiple copy of the code one in SLOF and other in > hotplug code. To unify

Re: [Qemu-devel] [PATCH v4 0/4] scripts: qmp-shell: add transaction support

2015-05-05 Thread John Snow
On 05/05/2015 08:52 AM, Luiz Capitulino wrote: I lost track of it. Is v4 a new posting? Yup. Latest with fixes. Eric re-reviewed it all and Kashyap (and I) tested it. --js

Re: [Qemu-devel] [PATCH v3 0/7] qom: misc fixes & enhancements to support TLS work

2015-05-05 Thread Andreas Färber
Am 05.05.2015 um 12:33 schrieb Paolo Bonzini: > > > On 01/05/2015 12:29, Daniel P. Berrange wrote: >> This series contains the 7 generic QOM API fixes and enhancements >> that I previously posted as part of the large series refactoring >> and extending the TLS support in QEMU: >> >> https://lis

[Qemu-devel] [Bug 1449687] Re: block migration of qcow2 VMs copies all empty space

2015-05-05 Thread Stefan Hajnoczi
Did you paste the wrong Red Hat bugzilla link? https://bugzilla.redhat.com/show_bug.cgi?id=1058173 I don't see how this BZ is related to expanded disk image files after migration. ** Bug watch added: Red Hat Bugzilla #1058173 https://bugzilla.redhat.com/show_bug.cgi?id=1058173 -- You receive

Re: [Qemu-devel] [RFC PATCH 02/15] qdev: store DeviceState's canonical path to use when unparenting

2015-05-05 Thread Michael Roth
Quoting Paolo Bonzini (2015-05-04 04:35:11) > > > On 02/05/2015 00:54, Michael Roth wrote: > >> > > >> > What about unparenting children devices in the device's unrealize > >> > callback? It sucks that you have to do it manually, but using stale > >> > canonical paths isn't the nicest thing eit

Re: [Qemu-devel] [PATCH v2 4/4] libqos/ahci: Swap memread/write with bufread/write

2015-05-05 Thread John Snow
On 05/05/2015 06:35 AM, Paolo Bonzini wrote: On 02/05/2015 02:13, John Snow wrote: I wrote a loop to batch the ascii-hex conversion instead of letting printf do it; then ran some more very, very scientific tests: memset alone: real0m10.888s user0m9.303s sys0m9.146s send-batc

Re: [Qemu-devel] [PATCH v3 0/3] Support more than 8 MMU modes, speedup PPC by 10%

2015-05-05 Thread Richard Henderson
On 05/05/2015 12:18 AM, Paolo Bonzini wrote: > Patches 1 and 2 enable support from more than 8 MMU modes in TCG (patch > 1 is in the targets, patch 2 is in cpu-defs.h). The TLB size is reduced > proportionally on targets where that is necessary. Reviewed-by: Richard Henderson r~

Re: [Qemu-devel] [Qemu-block] [PATCH v3 3/9] libqos: Add migration helpers

2015-05-05 Thread John Snow
On 05/05/2015 07:35 AM, Kevin Wolf wrote: Am 04.05.2015 um 19:52 hat John Snow geschrieben: On 05/04/2015 08:07 AM, Kevin Wolf wrote: Am 30.04.2015 um 20:07 hat John Snow geschrieben: +/* Otherwise, we need to wait: poll until migration is completed. */ +while (1) { +rsp =

Re: [Qemu-devel] [RFC PATCH 06/15] spapr_pci: also use 'index' property as DRC index for PHBs

2015-05-05 Thread Michael Roth
Quoting David Gibson (2015-05-05 06:34:15) > On Wed, Apr 29, 2015 at 02:20:15PM -0500, Michael Roth wrote: > > Prior to this patch 'index' is purely a shorthand for specifying > > MMIO windows, BUIDs, and other configuration values for a PHB. > > > > With the addition of PHB hotplug, we have a sta

Re: [Qemu-devel] [Qemu-block] [RFC] Differential Backups

2015-05-05 Thread John Snow
On 05/05/2015 06:25 AM, Stefan Hajnoczi wrote: On Wed, Apr 29, 2015 at 06:51:08PM -0400, John Snow wrote: This is a feature that should be very easy to add on top of the existing incremental feature, since it's just a difference in how the bitmap is treated: Incremental - Links to the last in

Re: [Qemu-devel] [PATCH v3 6/6] spapr_pci: populate ibm,loc-code

2015-05-05 Thread Thomas Huth
On Tue, 5 May 2015 14:23:56 +0530 Nikunj A Dadhania wrote: > Each hardware instance has a platform unique location code. The OF > device tree that describes a part of a hardware entity must include > the “ibm,loc-code” property with a value that represents the location > code for that hardware

Re: [Qemu-devel] [PATCH v6 01/17] Introduce stub routine cpu_desc_avail

2015-05-05 Thread Michael Mueller
On Tue, 5 May 2015 10:55:47 -0300 Eduardo Habkost wrote: > On Mon, Apr 27, 2015 at 04:53:15PM +0200, Michael Mueller wrote: > > This patch introduces the function cpu_desc_avail() which returns by > > default true if not architecture specific implemented. Its intention > > is to indicate if the c

Re: [Qemu-devel] [PATCH v2 1/2] qom: Implement object_property_add_const_link()

2015-05-05 Thread Eduardo Habkost
On Fri, May 01, 2015 at 08:15:24PM +0200, Paolo Bonzini wrote: > On 01/05/2015 16:09, Eduardo Habkost wrote: > > +void object_property_add_const_link(Object *obj, const char *name, > > + const char *type, Object *child, > > +

Re: [Qemu-devel] [PATCH v2 4/4] libqos/ahci: Swap memread/write with bufread/write

2015-05-05 Thread Paolo Bonzini
On 05/05/2015 17:48, John Snow wrote: > I specifically left things that alter control flow using hex nibbles -- > such as the FIS packets, PRD tables, and all other existing tests. I > only use the b64 encoding for raw data patterns, which don't really need > to be debugged. Either they match or

Re: [Qemu-devel] [PATCH v2 1/2] qom: Implement object_property_add_const_link()

2015-05-05 Thread Paolo Bonzini
On 05/05/2015 18:06, Eduardo Habkost wrote: > On Fri, May 01, 2015 at 08:15:24PM +0200, Paolo Bonzini wrote: >> > On 01/05/2015 16:09, Eduardo Habkost wrote: >>> > > +void object_property_add_const_link(Object *obj, const char *name, >>> > > + const char *typ

Re: [Qemu-devel] [PATCH v2 4/4] libqos/ahci: Swap memread/write with bufread/write

2015-05-05 Thread John Snow
On 05/05/2015 12:19 PM, Paolo Bonzini wrote: > > > On 05/05/2015 17:48, John Snow wrote: >> I specifically left things that alter control flow using hex nibbles -- >> such as the FIS packets, PRD tables, and all other existing tests. I >> only use the b64 encoding for raw data patterns, which d

Re: [Qemu-devel] [PATCH v8 20/40] qapi: Better error messages for duplicated expressions

2015-05-05 Thread Markus Armbruster
Eric Blake writes: > On 05/05/2015 03:11 AM, Markus Armbruster wrote: >> Eric Blake writes: >> >>> The previous commit demonstrated that the generator overlooked >>> duplicate expressions: >>> - a complex type or command reusing a built-in type name >>> - redeclaration of a type name, whether b

[Qemu-devel] [PULL 12/40] qapi: Prepare for catching more semantic parse errors

2015-05-05 Thread Markus Armbruster
From: Eric Blake This patch widens the scope of a try block (with the attending reindentation required by Python) in preparation for a future patch adding more instances of QAPIExprError inside the block. It's easier to separate indentation from semantic changes, so this patch has no real behavio

[Qemu-devel] [PULL 01/40] qapi: Add copyright declaration on docs

2015-05-05 Thread Markus Armbruster
From: Eric Blake While our top-level COPYING with its GPLv2+ license applies to any documentation file that omits explicit instructions, these days it's better to be a good example of calling out our intentions. Correct use of GPL requires the use of a copyright statement, so I'm adding notice t

[Qemu-devel] [PULL 05/40] qapi: Require ASCII in schema

2015-05-05 Thread Markus Armbruster
From: Eric Blake Python 2 and Python 3 have a wild history of whether strings default to ascii or unicode, where Python 3 requires checking isinstance(foo, basestr) to cover all strings, but where that code is not portable to Python 2. It's simpler to just state that we don't care about Unicode

[Qemu-devel] [PULL 02/40] qapi: Document type-safety considerations

2015-05-05 Thread Markus Armbruster
From: Eric Blake Go into more details about the various types of valid expressions in a qapi schema, including tweaks to document fixes being done later in the current patch series. Also fix some stale and missing documentation in the QMP specification. Signed-off-by: Eric Blake Reviewed-by: M

[Qemu-devel] [PULL 07/40] qapi: Better error messages for bad enums

2015-05-05 Thread Markus Armbruster
From: Eric Blake The previous commit demonstrated that the generator had several flaws with less-than-perfect enums: - an enum that listed the same string twice (or two variant strings that map to the same C enumerator) ended up generating an invalid C enum - because the generator adds a _MAX ter

[Qemu-devel] [PULL 04/40] qapi: Fix generation of 'size' builtin type

2015-05-05 Thread Markus Armbruster
From: Eric Blake We were missing the 'size' builtin type (which means that QAPI using [ 'size' ] would fail to compile). Signed-off-by: Eric Blake Reviewed-by: Markus Armbruster Signed-off-by: Markus Armbruster --- scripts/qapi.py | 1 + tests/qapi-schema/qapi-schema-

[Qemu-devel] [PULL 03/40] qapi: Simplify builtin type handling

2015-05-05 Thread Markus Armbruster
From: Eric Blake There was some redundancy between builtin_types[] and builtin_type_qtypes{}. Merge them into one. Signed-off-by: Eric Blake Reviewed-by: Markus Armbruster Signed-off-by: Markus Armbruster --- scripts/qapi-types.py | 10 +- scripts/qapi-visit.py | 6 +++--- scripts/

[Qemu-devel] [PULL 31/40] qapi: Forbid 'type' in schema

2015-05-05 Thread Markus Armbruster
From: Eric Blake Referring to "type" as both a meta-type (built-in, enum, union, alternate, or struct) and a specific type (the name that the schema uses for declaring structs) is confusing. Finish up the conversion to using "struct" in qapi schema by removing the hack in the generator that allo

[Qemu-devel] [PULL 09/40] qapi: Clean up test coverage of simple unions

2015-05-05 Thread Markus Armbruster
From: Eric Blake The tests of UserDefNativeListUnion serve to validate code generation of simple unions without a base type, except that it did not have full coverage in the strict test. The next commits will remove tests and support for simple unions with a base type, so there is no real loss a

[Qemu-devel] [PULL 10/40] qapi: Forbid base without discriminator in unions

2015-05-05 Thread Markus Armbruster
From: Eric Blake None of the existing QMP or QGA interfaces uses a union with a base type but no discriminator; it is easier to avoid this in the generator to save room for other future extensions more likely to be useful. An earlier commit added a union-base-no-discriminator test to ensure that

[Qemu-devel] [PULL 14/40] qapi: Rename anonymous union type in test

2015-05-05 Thread Markus Armbruster
From: Eric Blake Reduce churn in the future patch that replaces anonymous unions with a new metatype 'alternate' by changing 'AnonUnion' to 'Alternate'. Signed-off-by: Eric Blake Reviewed-by: Markus Armbruster Signed-off-by: Markus Armbruster --- tests/qapi-schema/qapi-schema-test.json | 2

[Qemu-devel] [PULL 18/40] qapi: Better error messages for bad expressions

2015-05-05 Thread Markus Armbruster
From: Eric Blake The previous commit demonstrated that the generator overlooked some fairly basic broken expressions: - missing metataype - metatype key has a non-string value - unknown key in relation to the metatype - conflicting metatype (this patch treats the second metatype as an unknown key

[Qemu-devel] [PULL 06/40] qapi: Add some enum tests

2015-05-05 Thread Markus Armbruster
From: Eric Blake Demonstrate that the qapi generator doesn't deal well with enums that aren't up to par. Later patches will update the expected results as the generator is made stricter. Signed-off-by: Eric Blake Reviewed-by: Markus Armbruster Signed-off-by: Markus Armbruster --- tests/Makef

[Qemu-devel] [PULL 13/40] qapi: Segregate anonymous unions into alternates in generator

2015-05-05 Thread Markus Armbruster
From: Eric Blake Special-casing 'discriminator == {}' for handling anonymous unions is getting awkward; since this particular type is not always a dictionary on the wire, it is easier to treat it as a completely different class of type, "alternate", so that if a type is listed in the union_types

[Qemu-devel] [PULL 15/40] qapi: Document new 'alternate' meta-type

2015-05-05 Thread Markus Armbruster
From: Eric Blake The next patch will quit special-casing "'union':'Foo', 'discriminator':{}" and instead use "'alternate':'Foo'". Separating docs from implementation makes it easier to focus on wording without holding up code. In particular, making alternate a separate type makes for a nice typ

[Qemu-devel] [PULL 08/40] qapi: Add some union tests

2015-05-05 Thread Markus Armbruster
From: Eric Blake Demonstrate that the qapi generator doesn't deal well with unions that aren't up to par. Later patches will update the expected reseults as the generator is made stricter. A few tests work as planned, but most show poor or missing error messages. Of particular note, qapi-code-g

[Qemu-devel] [PULL 00/40] drop qapi nested structs

2015-05-05 Thread Markus Armbruster
ng tests that expose weaknesses in the old parser, then beefing up the generator to catch the problem during the initial parse rather than choking with an obscure python message or even causing a C compilation failure. The following changes since commit 874e9aeeeb74c5459639a93439a502d262847e68:

[Qemu-devel] [PULL 16/40] qapi: Use 'alternate' to replace anonymous union

2015-05-05 Thread Markus Armbruster
From: Eric Blake Previous patches have led up to the point where I create the new meta-type "'alternate':'Foo'". See the previous patches for documentation; I intentionally split as much work into earlier patches to minimize the size of this patch, but a lot of it is churn due to testsuite fallo

[Qemu-devel] [PULL 21/40] qapi: Allow true, false and null in schema json

2015-05-05 Thread Markus Armbruster
From: Fam Zheng In the near term, we will use it for a sensible-looking 'gen':false inside command declarations, instead of the current ugly 'gen':'no'. In the long term, it will allow conversion from shorthand with defaults mentioned only in side-band documentation: 'data':{'*flag':'bool', '*s

[Qemu-devel] [PULL 22/40] qapi: Unify type bypass and add tests

2015-05-05 Thread Markus Armbruster
From: Eric Blake For a few QMP commands, we are forced to pass an arbitrary type without tracking it properly in QAPI. Among the existing clients, this unnamed type was spelled 'dict', 'visitor', and '**'; this patch standardizes on '**', matching the documentation changes earlier in the series.

[Qemu-devel] [PULL 23/40] qapi: Add some type check tests

2015-05-05 Thread Markus Armbruster
From: Eric Blake Demonstrate that the qapi generator silently parses confusing types, which may cause other errors later on. Later patches will update the expected results as the generator is made stricter. Most of the new tests focus on blatant errors. But returns-whitelist is a case where we

[Qemu-devel] [PULL 19/40] qapi: Add tests of redefined expressions

2015-05-05 Thread Markus Armbruster
From: Eric Blake Demonstrate that the qapi generator doesn't deal very well with redefined expressions. At the parse level, they are silently accepted; and while the testsuite just stops at parsing, I've further tested that many of them cause generator crashes or invalid C code if they were appe

[Qemu-devel] [PULL 24/40] qapi: More rigourous checking of types

2015-05-05 Thread Markus Armbruster
From: Eric Blake Now that we know every expression is valid with regards to its keys, we can add further tests that those keys refer to valid types. With this patch, all uses of a type (the 'data': of command, type, union, alternate, and event; the 'returns': of command; the 'base': of type and

[Qemu-devel] [PULL 25/40] qapi: Require valid names

2015-05-05 Thread Markus Armbruster
From: Eric Blake Previous commits demonstrated that the generator overlooked various bad naming situations: - types, commands, and events need a valid name - enum members must be valid names, when combined with prefix - union and alternate branches cannot be marked optional Valid upstream names

[Qemu-devel] [PULL 32/40] qapi: Merge UserDefTwo and UserDefNested in tests

2015-05-05 Thread Markus Armbruster
From: Eric Blake In the testsuite, UserDefTwo and UserDefNested were identical structs other than the member names. Reduce code duplication by having just one type, and choose names that also favor reuse. This will also make it easier for a later patch to get rid of inline nested types in QAPI.

[Qemu-devel] [PULL 27/40] qapi: More rigorous checking for type safety bypass

2015-05-05 Thread Markus Armbruster
From: Eric Blake Now that we have a way to validate every type, we can also be stricter about enforcing that callers that want to bypass type safety in generated code. Prior to this patch, it didn't matter what value was associated with the key 'gen', but it looked odd that 'gen':'yes' could res

[Qemu-devel] [PULL 11/40] qapi: Tighten checking of unions

2015-05-05 Thread Markus Armbruster
From: Eric Blake Previous commits demonstrated that the generator had several flaws with less-than-perfect unions: - a simple union that listed the same branch twice (or two variant names that map to the same C enumerator, including the implicit MAX sentinel) ended up generating invalid C code -

[Qemu-devel] [PULL 29/40] qapi: Document 'struct' metatype

2015-05-05 Thread Markus Armbruster
From: Eric Blake Referring to "type" as both a meta-type (built-in, enum, union, alternate, or struct) and a specific type (the name that the schema uses for declaring structs) is confusing. Now that the generator accepts 'struct' as a synonym for 'type', update all documentation to use saner wo

[Qemu-devel] [PULL 35/40] qapi: Drop inline nested structs in query-pci

2015-05-05 Thread Markus Armbruster
From: Eric Blake A future patch will be using a 'name':{dictionary} entry in the QAPI schema to specify a default value for an optional argument (see previous commit message for more details why); but existing use of inline nested structs conflicts with that goal. This patch fixes one of only two

[Qemu-devel] [PULL 38/40] qapi: Tweak doc references to QMP when QGA is also meant

2015-05-05 Thread Markus Armbruster
From: Eric Blake We have more than one qapi schema in use by more than one protocol. Add a new term 'Client JSON Protocol' for use throughout the document, to avoid confusion on whether something refers only to QMP and not QGA. Signed-off-by: Eric Blake Reviewed-by: Markus Armbruster Signed-of

[Qemu-devel] [PULL 17/40] qapi: Add some expr tests

2015-05-05 Thread Markus Armbruster
From: Eric Blake Demonstrate that the qapi generator doesn't deal well with expressions that aren't up to par. Later patches will improve the expected results as the generator is made stricter. Only a few of the the added tests actually behave sanely at rejecting obvious problems or demonstratin

[Qemu-devel] [PULL 30/40] qapi: Use 'struct' instead of 'type' in schema

2015-05-05 Thread Markus Armbruster
From: Eric Blake Referring to "type" as both a meta-type (built-in, enum, union, alternate, or struct) and a specific type (the name that the schema uses for declaring structs) is confusing. Do the bulk of the conversion to "struct" in qapi schema, with a fairly mechanical: for f in `find -name

[Qemu-devel] [PULL 37/40] qapi: Drop dead visitor code related to nested structs

2015-05-05 Thread Markus Armbruster
From: Eric Blake Now that we no longer have nested structs to visit, the use of prefix strings is no longer required. Remove the code that is no longer reachable. Signed-off-by: Eric Blake Reviewed-by: Markus Armbruster Signed-off-by: Markus Armbruster --- scripts/qapi-visit.py | 49 +++

[Qemu-devel] [PULL 26/40] qapi: Whitelist commands that don't return dictionary

2015-05-05 Thread Markus Armbruster
From: Eric Blake ...or an array of dictionaries. Although we have to cater to existing commands, returning a non-dictionary means the command is not extensible (no new name/value pairs can be added if more information must be returned in parallel). By making the whitelist explicit, any new comm

Re: [Qemu-devel] [PATCH 7/7] disas: arm: Use target_disas impl for monitor

2015-05-05 Thread Peter Crosthwaite
On Tue, May 5, 2015 at 7:38 AM, Claudio Fontana wrote: > Hello Peter, > > On 05.05.2015 06:45, Peter Crosthwaite wrote: >> As it is more fully featured. It has multi-endian, thumb and AArch64 >> support whereas the existing monitor disas support only has vanilla >> AA32 support. >> >> E.G. Running

[Qemu-devel] [PULL 20/40] qapi: Better error messages for duplicated expressions

2015-05-05 Thread Markus Armbruster
From: Eric Blake The previous commit demonstrated that the generator overlooked duplicate expressions: - a complex type or command reusing a built-in type name - redeclaration of a type name, whether by the same or different metatype - redeclaration of a command or event - collision of a type wit

[Qemu-devel] [PULL 40/40] qapi: Check for member name conflicts with a base class

2015-05-05 Thread Markus Armbruster
From: Eric Blake Our type inheritance for both 'struct' and for flat 'union' merges key/value pairs from the base class with those from the type in question. Although the C code currently boxes things so that there is a distinction between which member is referred to, the QMP wire format does no

[Qemu-devel] [PULL 33/40] qapi: Drop tests for inline nested structs

2015-05-05 Thread Markus Armbruster
From: Eric Blake A future patch will be using a 'name':{dictionary} entry in the QAPI schema to specify a default value for an optional argument; but existing use of inline nested structs conflicts with that goal. More precisely, a definition in the QAPI schema associates a name with a set of pr

[Qemu-devel] [PULL 39/40] qapi: Support (subset of) \u escapes in strings

2015-05-05 Thread Markus Armbruster
From: Eric Blake The handling of \ inside QAPI strings was less than ideal, and really only worked JSON's \/, \\, \", and our extension of \' (an obvious extension, when you realize we use '' instead of "" for strings). For other things, like '\n', it resulted in a literal 'n' instead of a newli

[Qemu-devel] [PULL 36/40] qapi: Drop support for inline nested types

2015-05-05 Thread Markus Armbruster
From: Eric Blake A future patch will be using a 'name':{dictionary} entry in the QAPI schema to specify a default value for an optional argument (see previous commit messages for more details why); but existing use of inline nested structs conflicts with that goal. Now that all commands have been

[Qemu-devel] [PULL 28/40] qapi: Prefer 'struct' over 'type' in generator

2015-05-05 Thread Markus Armbruster
From: Eric Blake Referring to "type" as both a meta-type (built-in, enum, union, alternate, or struct) and a specific type (the name that the schema uses for declaring structs) is confusing. The confusion is only made worse by the fact that the generator mostly already refers to struct even when

[Qemu-devel] [PULL 34/40] qapi: Drop inline nested struct in query-version

2015-05-05 Thread Markus Armbruster
From: Eric Blake A future patch will be using a 'name':{dictionary} entry in the QAPI schema to specify a default value for an optional argument (see previous commit message for more details why); but existing use of inline nested structs conflicts with that goal. This patch fixes one of only two

Re: [Qemu-devel] [PATCH 0/7] disas: Unify target_disas and monitor_disas

2015-05-05 Thread Richard Henderson
On 05/04/2015 09:44 PM, Peter Crosthwaite wrote: > Alpha looks easier, but I have > no test case (can anyone link me a random elf or kernel? Doesn't need > to do anything meaningful other than enter execution of instructions). If all you need is some executed instructions, the included bios image

Re: [Qemu-devel] [PATCH 6/7] monitor: "i": Add ARM specifics

2015-05-05 Thread Peter Maydell
On 5 May 2015 at 05:45, Peter Crosthwaite wrote: > Add the ARM specific disassembly flags setup, so ARM can be correctly > disassembled from the monitor. > > Signed-off-by: Peter Crosthwaite > --- > monitor.c | 11 +++ > 1 file changed, 11 insertions(+) > > diff --git a/monitor.c b/monit

Re: [Qemu-devel] [PATCH 5/7] disas: arm-a64: Make printfer and stream variable

2015-05-05 Thread Richard Henderson
On 05/04/2015 09:45 PM, Peter Crosthwaite wrote: > -explicit QEMUDisassembler(FILE *stream) : stream_(stream) { } > +explicit QEMUDisassembler() { } The explicit is no longer helpful, and I'd still initialize stream_ to null. r~

[Qemu-devel] [PATCH 4/5] target-tricore: fix rslcx restoring the upper context instead of the lower

2015-05-05 Thread Bastian Koppelmann
Signed-off-by: Bastian Koppelmann --- target-tricore/op_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-tricore/op_helper.c b/target-tricore/op_helper.c index 9907e07..011f09f 100644 --- a/target-tricore/op_helper.c +++ b/target-tricore/op_helper.c @@ -2581,7 +

[Qemu-devel] [PATCH 2/5] target-tricore: fix SLR_LD_W and SLR_LD_W_POSTINC insn being a 2 byte memory access insted of 4

2015-05-05 Thread Bastian Koppelmann
Signed-off-by: Bastian Koppelmann --- target-tricore/translate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target-tricore/translate.c b/target-tricore/translate.c index d2cd640..663b2a0 100644 --- a/target-tricore/translate.c +++ b/target-tricore/translate.c @@ -3745

[Qemu-devel] [PATCH 1/5] target-tricore: Fix LOOP using wrong register for compare

2015-05-05 Thread Bastian Koppelmann
Signed-off-by: Bastian Koppelmann --- target-tricore/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-tricore/translate.c b/target-tricore/translate.c index 54a48cd..d2cd640 100644 --- a/target-tricore/translate.c +++ b/target-tricore/translate.c @@ -3440,7 +

Re: [Qemu-devel] [PATCH v6 01/17] Introduce stub routine cpu_desc_avail

2015-05-05 Thread Eduardo Habkost
On Tue, May 05, 2015 at 06:12:16PM +0200, Michael Mueller wrote: > On Tue, 5 May 2015 10:55:47 -0300 > Eduardo Habkost wrote: > > > On Mon, Apr 27, 2015 at 04:53:15PM +0200, Michael Mueller wrote: > > > This patch introduces the function cpu_desc_avail() which returns by > > > default true if not

[Qemu-devel] [PATCH 0/5] TriCore bugfixes

2015-05-05 Thread Bastian Koppelmann
Hi, here is a round of bugfixes for the TriCore, which are mostly one liner. Cheers, Bastian Bastian Koppelmann (5): target-tricore: Fix LOOP using wrong register for compare target-tricore: fix SLR_LD_W and SLR_LD_W_POSTINC insn being a 2 byte memory access insted of 4 target-tricore:

[Qemu-devel] [PATCH 3/5] target-tricore: fix BO_OFF10_SEXT calculating the wrong offset

2015-05-05 Thread Bastian Koppelmann
The lower part of the combined offset was sign extended and could lead to wrong results. Signed-off-by: Bastian Koppelmann --- target-tricore/tricore-opcodes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-tricore/tricore-opcodes.h b/target-tricore/tricore-opcodes.h

[Qemu-devel] [PATCH 5/5] target-tricore: fix rfe not restoring the PC

2015-05-05 Thread Bastian Koppelmann
Signed-off-by: Bastian Koppelmann --- target-tricore/op_helper.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target-tricore/op_helper.c b/target-tricore/op_helper.c index 011f09f..1c23aeb 100644 --- a/target-tricore/op_helper.c +++ b/target-tricore/op_helper.c @@ -2458,6 +2458,7 @@ void h

[Qemu-devel] qemu-img convert (vmdk)

2015-05-05 Thread Antoni Villalonga
Hi, Is my first email to that list ;) I can reproduce this bug with v2.2 and v2.3. I'm not sure about the results after testing with v2.1 (doesn't show errors but seems to be still broken). % qemu-img convert -f raw -O vmdk -o subformat=streamOptimized 100GB_inputfile.img outputfile0.vmdk (no

Re: [Qemu-devel] [PATCH 0/5] Extend TPM support with a QEMU-external TPM

2015-05-05 Thread Stefan Berger
On 05/04/2015 10:50 PM, Kevin O'Connor wrote: On Mon, May 04, 2015 at 11:41:54PM +0200, Igor Mammedov wrote: It's not really split implementation, it's installing an additional table which is purely SeaBIOS specific since QEMU doesn't care about PPID data at all nor does it need to do so. If bo

Re: [Qemu-devel] [PATCH 6/7] monitor: "i": Add ARM specifics

2015-05-05 Thread Richard Henderson
On 05/05/2015 10:19 AM, Peter Maydell wrote: > On 5 May 2015 at 05:45, Peter Crosthwaite wrote: >> Add the ARM specific disassembly flags setup, so ARM can be correctly >> disassembled from the monitor. >> >> Signed-off-by: Peter Crosthwaite >> --- >> monitor.c | 11 +++ >> 1 file change

<    1   2   3   4   >