[Qemu-devel] [PATCH v2 03/29] qapi: Generate up-to-date copyright notice

2018-02-11 Thread Markus Armbruster
Each generator carries a copyright notice for the generator itself, and another one for the files it generates. Only the former have been updated along the way, the latter have not, and are all out of date. Fix by copying the generator's copyright notice to the generated files instead. Note

[Qemu-devel] [PATCH v2 25/29] docs/devel/writing-qmp-commands: Update for modular QAPI

2018-02-11 Thread Markus Armbruster
With modular code generation, putting stuff right into qapi-schema.json is a bad idea. Update writing-qmp-commands.txt accordingly. Signed-off-by: Markus Armbruster --- docs/devel/writing-qmp-commands.txt | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-)

[Qemu-devel] [PATCH v2 05/29] qapi: New classes QAPIGenC, QAPIGenH, QAPIGenDoc

2018-02-11 Thread Markus Armbruster
These classes encapsulate accumulating and writing output. Convert C code generation to QAPIGenC and QAPIGenH. The conversion is rather shallow: most of the output accumulation is not converted. Left for later. The indentation machinery uses a single global variable indent_level, even though we

[Qemu-devel] [PATCH v2 20/29] qapi/types qapi/visit: Generate built-in stuff into separate files

2018-02-11 Thread Markus Armbruster
Linking code from multiple separate QAPI schemata into the same program is possible, but involves some weirdness around built-in types: * We generate code for built-in types into .c only with option --builtins. The user is responsible for generating code for exactly one QAPI schema per

[Qemu-devel] [PATCH v2 19/29] qapi: Make code-generating visitors use QAPIGen more

2018-02-11 Thread Markus Armbruster
The use of QAPIGen is rather shallow so far: most of the output accumulation is not converted. Take the next step: convert output accumulation in the code-generating visitor classes. Helper functions outside these classes are not converted. Signed-off-by: Markus Armbruster

[Qemu-devel] [PATCH v2 27/29] qapi: Move qapi-schema.json to qapi/, rename generated files

2018-02-11 Thread Markus Armbruster
Move qapi-schema.json to qapi/, so it's next to its modules, and all files get generated to qapi/, not just the ones generated for modules. Consistently name the generated files qapi-MODULE.EXT: qmp-commands.[ch] become qapi-commands.[ch], qapi-event.[ch] become qapi-events.[ch], and

Re: [Qemu-devel] [PATCHv2 05/12] cuda: rename frequency property to tb_frequency

2018-02-11 Thread David Gibson
On Sun, Feb 11, 2018 at 10:59:05AM +, Mark Cave-Ayland wrote: > On 10/02/18 23:11, David Gibson wrote: > > > On Sun, Feb 11, 2018 at 09:32:14AM +1100, David Gibson wrote: > > > On Fri, Feb 09, 2018 at 06:51:35PM +, Mark Cave-Ayland wrote: > > > > This allows us to more easily

Re: [Qemu-devel] [PATCH 1/3] qapi: Pass '-u' when doing non-silent diff

2018-02-11 Thread Markus Armbruster
Eric Blake writes: > Ed-script diffs are awful compared to context diffs. Fix another > 'diff -q' while in the area (if the files are different, being > noisy makes it easier to diagnose why). > > Fixes: 46ec4fce > Signed-off-by: Eric Blake > --- >

Re: [Qemu-devel] [PATCH] net: fix misaligned member access

2018-02-11 Thread Marc-André Lureau
Hi On Fri, Feb 9, 2018 at 8:50 PM, Philippe Mathieu-Daudé wrote: > Hi Marc-André, > > On 02/09/2018 04:03 PM, Marc-André Lureau wrote: >> Fixes the following ASAN warnings: >> >> /home/elmarco/src/qemu/hw/net/net_tx_pkt.c:201:27: runtime error: member >> access within

[Qemu-devel] [PATCH v2 14/29] qapi: Concentrate QAPISchemaParser.exprs updates in .__init__()

2018-02-11 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Marc-André Lureau --- scripts/qapi/common.py | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/scripts/qapi/common.py b/scripts/qapi/common.py index

[Qemu-devel] [PATCH v2 21/29] qapi/common: Fix guardname() for funny filenames

2018-02-11 Thread Markus Armbruster
guardname() fails to return a valid C identifier for arguments containing anything but [A-Za-z0-9_.-']. Fix that. Don't bother protecting ticklish identifiers; header guards are all-caps, and no ticklish identifiers are. Signed-off-by: Markus Armbruster Reviewed-by:

[Qemu-devel] [PATCH v2 10/29] qapi: Touch generated files only when they change

2018-02-11 Thread Markus Armbruster
A massive number of objects depends on QAPI-generated headers. In my "build everything" tree, it's roughly 4800 out of 5100. This is particularly annoying when only some of the generated files change, say for a doc fix. Improve qapi-gen.py to touch its output files only if they actually change.

[Qemu-devel] [PATCH v2 28/29] Fix up dangling references to qmp-commands.* in comment and doc

2018-02-11 Thread Markus Armbruster
Fix up the reference to qmp-commands.hx in qmp.c. Missed in commit 5032a16d1d. Fix up the reference to qmp-commands.txt in docs/xen-save-devices-state.txt. Missed in commit 4d8bb958fa. Signed-off-by: Markus Armbruster --- docs/xen-save-devices-state.txt | 3 +-- qmp.c

[Qemu-devel] [PATCH v2 22/29] qapi: Generate separate .h, .c for each module

2018-02-11 Thread Markus Armbruster
Our qapi-schema.json is composed of modules connected by include directives, but the generated code is monolithic all the same: one qapi-types.h with all the types, one qapi-visit.h with all the visitors, and so forth. These monolithic headers get included all over the place. In my "build

Re: [Qemu-devel] [PATCH v2 00/29] Modularize generated QAPI code

2018-02-11 Thread no-reply
Hi, This series failed docker-mingw@fedora build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. Type: series Message-id: 20180211093607.27351-1-arm...@redhat.com Subject: [Qemu-devel] [PATCH v2 00/29]

[Qemu-devel] [PATCH v2 04/29] qapi: Rename variable holding the QAPISchemaGenFOOVisitor

2018-02-11 Thread Markus Armbruster
Rename the variable holding the QAPISchemaGenFOOVisitor from gen to vis, to avoid confusion in the next commit. Signed-off-by: Markus Armbruster --- scripts/qapi-commands.py | 8 scripts/qapi-event.py | 8 scripts/qapi-introspect.py | 8

[Qemu-devel] [PATCH v2 12/29] qapi/common: Eliminate QAPISchema.exprs

2018-02-11 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Marc-André Lureau --- scripts/qapi/common.py | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/qapi/common.py

[Qemu-devel] [PATCH v2 29/29] qapi: Don't create useless directory qapi-generated

2018-02-11 Thread Markus Armbruster
We used to generate first test and later QGA QAPI code into qapi-generated/. Commit b93b63f574 moved the test code to tests/. Commit 54c2e50205 moved the QGA code to qga/qapi-generated/. The directory has been unused since. Signed-off-by: Markus Armbruster --- .gitignore |

[Qemu-devel] [PATCH v2 09/29] qapi-gen: Convert from getopt to argparse

2018-02-11 Thread Markus Armbruster
argparse is nicer to use than getopt, and gives us --help almost for free. Signed-off-by: Markus Armbruster --- scripts/qapi-gen.py| 48 ++-- scripts/qapi/common.py | 43 --- 2 files

[Qemu-devel] [PATCH v2 13/29] qapi: Lift error reporting from QAPISchema.__init__() to callers

2018-02-11 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Marc-André Lureau --- scripts/qapi-gen.py| 8 ++-- scripts/qapi/common.py | 23 +-- tests/qapi-schema/test-qapi.py | 10 -- 3 files changed, 23

[Qemu-devel] [PATCH v2 11/29] qapi: Improve include file name reporting in error messages

2018-02-11 Thread Markus Armbruster
Error messages print absolute file names of included files even if the user gave a relative one on the command line: $ PYTHONPATH=scripts python -B tests/qapi-schema/test-qapi.py tests/qapi-schema/include-cycle.json In file included from tests/qapi-schema/include-cycle.json:1: In

[Qemu-devel] [PATCH v2 16/29] qapi: Generate in source order

2018-02-11 Thread Markus Armbruster
The generators' conversion to visitors (merge commit 9e72681d16) changed the processing order of entities from source order to alphabetical order. The next commit needs source order, so change it back. Signed-off-by: Markus Armbruster Reviewed-by: Marc-André Lureau

[Qemu-devel] [PATCH v2 06/29] qapi: Reduce use of global variables in generators some

2018-02-11 Thread Markus Armbruster
In preparation of the next commit, which will turn the generators into modules. These global variables will become local to main() then. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Marc-André Lureau

Re: [Qemu-devel] [PATCH 2/3] qapi: Rename QMP and QGA schema files

2018-02-11 Thread Markus Armbruster
Eric Blake writes: > Having two files in the tree both named qapi-schema.json just adds > confusion. Rename these files, and relocate them into the common > qapi/ subdirectory. Update all build rules that refer to the file > names, and adjust other documentation and comment

Re: [Qemu-devel] [PATCH v2 02/19] spapr: introduce a skeleton for the XIVE interrupt controller

2018-02-11 Thread David Gibson
On Thu, Jan 18, 2018 at 08:27:52AM +1100, Benjamin Herrenschmidt wrote: > On Wed, 2018-01-17 at 15:39 +0100, Cédric Le Goater wrote: > > Migration is a problem. We will need both backend QEMU objects to be > > available anyhow if we want to migrate. So we are back to the current > > solution

[Qemu-devel] [PATCH v2 23/29] Include less of the generated modular QAPI headers

2018-02-11 Thread Markus Armbruster
In my "build everything" tree, a change to the types in qapi-schema.json triggers a recompile of about 4800 out of 5100 objects. The previous commit split up qmp-commands.h, qmp-event.h, qmp-visit.h, qapi-types.h. Each of these headers still includes all its shards. Reduce compile time by

[Qemu-devel] [PATCH v2 07/29] qapi: Turn generators into modules

2018-02-11 Thread Markus Armbruster
The next commit will introduce a common driver program for all generators. The generators need to be modules for that. qapi2texi.py already is. Make the other generators follow suit. The changes are actually trivial. Obvious in the diffs once you view them with whitespace changes ignored.

[Qemu-devel] [PATCH v2 26/29] docs: Correct outdated information on QAPI

2018-02-11 Thread Markus Armbruster
* Fix guidance on error classes * Point to generated documentation * Drop plea for documentation, because the QAPI code generator enforces it since commit 3313b6124b * Minor tweaks here and there Signed-off-by: Markus Armbruster --- docs/devel/writing-qmp-commands.txt |

[Qemu-devel] [PATCH v2 17/29] qapi: Record 'include' directives in intermediate representation

2018-02-11 Thread Markus Armbruster
The include directive permits modular QAPI schemata, but the generated code is monolithic all the same. To permit generating modular code, the front end needs to pass more information on inclusions to the back ends. The commit before last added the necessary information to the parse tree. This

[Qemu-devel] [PATCH v2 02/29] qapi: Streamline boilerplate comment generation

2018-02-11 Thread Markus Armbruster
Every generator has separate boilerplate for .h and .c, and their differences are boring. All of them repeat the license note. Reduce the repetition as follows. Move common text like the license note to common open_output(), next to the existing common text there. For each generator, replace

[Qemu-devel] [PATCH v2 01/29] Include qapi/qmp/qerror.h exactly where needed

2018-02-11 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- block.c | 1 - block/qcow2.c | 1 - chardev/char-fe.c | 1 + chardev/char.c | 1 + qom/object_interfaces.c | 1 + scripts/qapi-visit.py | 2 +- 6 files changed, 4 insertions(+), 3 deletions(-)

[Qemu-devel] [PATCH v2 00/29] Modularize generated QAPI code

2018-02-11 Thread Markus Armbruster
Our qapi-schema.json is composed of modules connected by include directives, but the generated code is monolithic all the same: one qapi-types.h with all the types, one qapi-visit.h with all the visitors, and so forth. These monolithic headers get included all over the place. In my "build

[Qemu-devel] [PATCH v2 15/29] qapi: Record 'include' directives in parse tree

2018-02-11 Thread Markus Armbruster
The parse tree is a list of expressions. Except include expressions currently get replaced by the included file's parse tree. Instead of throwing away the include expression, keep it with the file name expanded so you don't have to track the including file's directory to make sense of it. A

Re: [Qemu-devel] [PATCH 0/3] QAPI file renames

2018-02-11 Thread Markus Armbruster
Eric Blake writes: > This has been mentioned on list before as a possible improvement, > so I went ahead and did some renames to figure out how it would > look. Patch 1 is something I hit on the way while debugging > patch 2 and 3; patch 2 is rather non-controversial, and

Re: [Qemu-devel] [PATCHv2 05/12] cuda: rename frequency property to tb_frequency

2018-02-11 Thread Mark Cave-Ayland
On 10/02/18 23:11, David Gibson wrote: On Sun, Feb 11, 2018 at 09:32:14AM +1100, David Gibson wrote: On Fri, Feb 09, 2018 at 06:51:35PM +, Mark Cave-Ayland wrote: This allows us to more easily differentiate between the timebase frequency used to calibrate the MacOS timers and the actual

[Qemu-devel] [PATCHv2] linux-user: Fix sched_getaffinity mask size

2018-02-11 Thread Samuel Thibault
We properly computed the capped mask size to be put to the application buffer, but didn't actually used it. Also, we need to return the capped mask size instead of 0 on success. Signed-off-by: Samuel Thibault --- Difference from v1: - simplify fix ---

[Qemu-devel] [Bug 1748756] [NEW] [Feature request] Support of TI AM1808 for Lego EV3

2018-02-11 Thread Sturov Fedor
Public bug reported: It would be great if emulating TI AM1808 would be possible. It will be a big step towards Lego Mindstorms EV3 emulation. ** Affects: qemu Importance: Undecided Status: New -- You received this bug notification because you are a member of qemu- devel-ml, which

[Qemu-devel] Fan mail

2018-02-11 Thread Per Gunnarsson via Qemu-devel
Thanks a lot for this software! Now I can make Windows tutorials without having to buy a new hard drive. (I asked Microsoft support how to install Windows on a hard drive with other operating systems on it. Their reply was to start diskpart, select a drive and type the command "clean".)

[Qemu-devel] [PATCH v2 5/7] target/arm: Handle SVE registers when using clear_vec_high

2018-02-11 Thread Richard Henderson
When storing to an AdvSIMD FP register, all of the high bits of the SVE register are zeroed. Therefore, call it more often with is_q as a parameter. Signed-off-by: Richard Henderson --- target/arm/translate-a64.c | 162 +

[Qemu-devel] [PATCH v2 1/7] target/arm: Remove ARM_CP_64BIT from ZCR_EL registers

2018-02-11 Thread Richard Henderson
Because they are ARM_CP_STATE_AA64, ARM_CP_64BIT is implied. Signed-off-by: Richard Henderson --- target/arm/helper.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/target/arm/helper.c b/target/arm/helper.c index 180ab75458..4b102ec356

[Qemu-devel] [PATCH v2 0/7] target/arm: More SVE prep work

2018-02-11 Thread Richard Henderson
Changes for v2: Include signal frames and PR_SVE_SET/GET_VL. Blurb for v1: First, we had noted that ARM_CP_64BIT needed to be removed from the ZCR_EL registers, but the patch set was applied without actually fixing that. Second, there's an existing bug by which the FPCR/FPSR registers are not

[Qemu-devel] [PATCH v2 3/7] target/arm: Suppress TB end for FPCR/FPSR

2018-02-11 Thread Richard Henderson
Nothing in either register affects the TB. Signed-off-by: Richard Henderson --- target/arm/helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/arm/helper.c b/target/arm/helper.c index d41fb8371f..e0184c7162 100644 ---

[Qemu-devel] [PATCH v2 6/7] linux-user: Support SVE in aarch64 signal frames

2018-02-11 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/signal.c | 348 ++-- 1 file changed, 283 insertions(+), 65 deletions(-) diff --git a/linux-user/signal.c b/linux-user/signal.c index 9a380b9e31..af953175db 100644 ---

[Qemu-devel] [PATCH v2 2/7] target/arm: Enforce FP access to FPCR/FPSR

2018-02-11 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/cpu.h | 35 ++- target/arm/helper.c| 6 -- target/arm/translate-a64.c | 3 +++ 3 files changed, 25 insertions(+), 19 deletions(-) diff --git a/target/arm/cpu.h

[Qemu-devel] [PATCH v2 4/7] target/arm: Enforce access to ZCR_EL at translation

2018-02-11 Thread Richard Henderson
This also makes sure that we get the correct ordering of SVE vs FP exceptions. Signed-off-by: Richard Henderson --- target/arm/cpu.h | 3 ++- target/arm/internals.h | 6 ++ target/arm/helper.c| 22 --

[Qemu-devel] [PATCH] tcg: Improve tcg_gen_muli_i32/i64

2018-02-11 Thread Richard Henderson
Convert multiplication by power of two to left shift. Signed-off-by: Richard Henderson --- tcg/tcg-op.c | 24 ++-- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/tcg/tcg-op.c b/tcg/tcg-op.c index 3467787323..34b96d68f3 100644 ---

[Qemu-devel] [PATCH v2 7/7] linux-user: Implement aarch64 PR_SVE_SET/GET_VL

2018-02-11 Thread Richard Henderson
As an implementation choice, widening VL has zeroed the previously inaccessible portion of the sve registers. Signed-off-by: Richard Henderson --- target/arm/cpu.h | 2 ++ linux-user/syscall.c | 20 + target/arm/cpu64.c | 61

Re: [Qemu-devel] [PATCH qemu v7 2/4] vfio/pci: Relax DMA map errors for MMIO regions

2018-02-11 Thread David Gibson
On Fri, Feb 09, 2018 at 06:55:01PM +1100, Alexey Kardashevskiy wrote: > At the moment if vfio_memory_listener is registered in the system memory > address space, it maps/unmaps every RAM memory region for DMA. > It expects system page size aligned memory sections so vfio_dma_map > would not fail

Re: [Qemu-devel] [RFC PATCH v6 00/20] replay additions

2018-02-11 Thread Pavel Dovgalyuk
I tested ARM only with –kernel and –initrd. Can you provide the full command line and the disk image? Pavel Dovgalyuk From: Ciro Santilli [mailto:ciro.santi...@gmail.com] Sent: Saturday, February 10, 2018 3:09 AM To: Pavel Dovgalyuk Cc: Pavel Dovgalyuk; qemu-devel@nongnu.org;

[Qemu-devel] [PATCH v2 18/29] qapi: Rename generated qmp-marshal.c to qmp-commands.c

2018-02-11 Thread Markus Armbruster
All generated .c are named like their .h, except for qmp-marshal.c and qmp-commands.h. To add to the confusion, tests-qmp-commands.c falsely matches generated test-qmp-commands.h. Get rid of this unnecessary complication. Signed-off-by: Markus Armbruster --- .gitignore

[Qemu-devel] [PATCH v2 08/29] qapi-gen: New common driver for code and doc generators

2018-02-11 Thread Markus Armbruster
Whenever qapi-schema.json changes, we run six programs eleven times to update eleven files. Similar for qga/qapi-schema.json. This is silly. Replace the six programs by a single program that spits out all eleven files. The programs become modules in new Python package qapi, along with the

Re: [Qemu-devel] [PATCH v2 02/19] spapr: introduce a skeleton for the XIVE interrupt controller

2018-02-11 Thread Benjamin Herrenschmidt
On Sun, 2018-02-11 at 19:08 +1100, David Gibson wrote: > On Thu, Jan 18, 2018 at 08:27:52AM +1100, Benjamin Herrenschmidt wrote: > > On Wed, 2018-01-17 at 15:39 +0100, Cédric Le Goater wrote: > > > Migration is a problem. We will need both backend QEMU objects to be > > > available anyhow if we

Re: [Qemu-devel] [PATCH v6 00/28] Migration: postcopy failure recovery

2018-02-11 Thread no-reply
Hi, This series failed build test on ppc host. Please find the details below. Type: series Message-id: 20180208103132.28452-1-pet...@redhat.com Subject: [Qemu-devel] [PATCH v6 00/28] Migration: postcopy failure recovery === TEST SCRIPT BEGIN === #!/bin/bash # Testing script will be invoked

[Qemu-devel] [PATCH v2] scripts: Add decodetree.py

2018-02-11 Thread Richard Henderson
To be used to decode ARM SVE, but could be used for any fixed-width ISA. Signed-off-by: Richard Henderson --- Changes since v1: * Pass pycodestyle-{2,3}. * Support 16-bit and 32-bit insns (I have a def file for thumb1). * Testsuite (only negative tests so

Re: [Qemu-devel] [PATCH v2] scripts: Add decodetree.py

2018-02-11 Thread no-reply
Hi, This series failed docker-quick@centos6 build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. Type: series Message-id: 20180211224656.12767-1-richard.hender...@linaro.org Subject: [Qemu-devel] [PATCH v2]

Re: [Qemu-devel] [PATCH v2] scripts: Add decodetree.py

2018-02-11 Thread Richard Henderson
> Changes since v1: > * Pass pycodestyle-{2,3}. > * Support 16-bit and 32-bit insns (I have a def file for thumb1). For the record, here's the thumb1 definition. ./scripts/decodetree.py -w16 thumb1.def r~ %reg_0_77:1 0:3 @rd_rs .. rs:3 rd:3 @rt_rn_rm

Re: [Qemu-devel] [PATCH v2 1/2] hw/arm/aspeed: directly map the serial device to the system address space

2018-02-11 Thread Andrew Jeffery
On Fri, 2018-02-09 at 05:57 -0300, Philippe Mathieu-Daudé wrote: > (qemu) info mtree > address-space: cpu-memory-0 >- (prio 0, i/o): system > -07ff (prio 0, rom): aspeed.boot_rom > 1e60-1e7f (prio

Re: [Qemu-devel] [PATCH v2 2/2] hw/arm/aspeed: simplify using the 'unimplemented device' for aspeed_soc.io

2018-02-11 Thread Andrew Jeffery
On Fri, 2018-02-09 at 05:57 -0300, Philippe Mathieu-Daudé wrote: > (qemu) info mtree > address-space: cpu-memory-0 >- (prio 0, i/o): system > -07ff (prio 0, rom): aspeed.boot_rom > -1e60-1e7f (prio

Re: [Qemu-devel] [PATCH v2 02/19] spapr: introduce a skeleton for the XIVE interrupt controller

2018-02-11 Thread Alexey Kardashevskiy
On 12/02/18 09:55, Benjamin Herrenschmidt wrote: > On Sun, 2018-02-11 at 19:08 +1100, David Gibson wrote: >> On Thu, Jan 18, 2018 at 08:27:52AM +1100, Benjamin Herrenschmidt wrote: >>> On Wed, 2018-01-17 at 15:39 +0100, Cédric Le Goater wrote: Migration is a problem. We will need both backend

[Qemu-devel] [Bug 1748756] Re: [Feature request] Support of TI AM1808 for Lego EV3

2018-02-11 Thread Thomas Huth
** Changed in: qemu Importance: Undecided => Wishlist -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1748756 Title: [Feature request] Support of TI AM1808 for Lego EV3 Status in QEMU: New

Re: [Qemu-devel] [PATCH v2 02/19] spapr: introduce a skeleton for the XIVE interrupt controller

2018-02-11 Thread Cédric Le Goater
On 02/11/2018 11:55 PM, Benjamin Herrenschmidt wrote: > On Sun, 2018-02-11 at 19:08 +1100, David Gibson wrote: >> On Thu, Jan 18, 2018 at 08:27:52AM +1100, Benjamin Herrenschmidt wrote: >>> On Wed, 2018-01-17 at 15:39 +0100, Cédric Le Goater wrote: Migration is a problem. We will need both

[Qemu-devel] [PATCH RFC 05/14] qapi2texi: minor python code simplification

2018-02-11 Thread Markus Armbruster
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Markus Armbruster --- scripts/qapi/doc.py | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/scripts/qapi/doc.py

[Qemu-devel] [PATCH RFC 08/14] qapi: leave the ifcond attribute undefined until check()

2018-02-11 Thread Markus Armbruster
From: Marc-André Lureau We commonly initialize attributes to None in .init(), then set their real value in .check(). Accessing the attribute before .check() yields None. If we're lucky, the code that accesses the attribute prematurely chokes on None. It won't for

[Qemu-devel] [PATCH RFC 01/14] qlit: use QType instead of int

2018-02-11 Thread Markus Armbruster
From: Marc-André Lureau Suggested-by: Markus Armbruster Signed-off-by: Marc-André Lureau --- include/qapi/qmp/qlit.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/qapi/qmp/qlit.h

[Qemu-devel] [PATCH RFC 03/14] qapi/introspect: Simplify WIP

2018-02-11 Thread Markus Armbruster
--- scripts/qapi/introspect.py | 20 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/scripts/qapi/introspect.py b/scripts/qapi/introspect.py index f66c397fb0..6c86673a09 100644 --- a/scripts/qapi/introspect.py +++ b/scripts/qapi/introspect.py @@ -51,36 +51,32

[Qemu-devel] [PATCH RFC 13/14] qapi-introspect: Add #if conditions to introspection value

2018-02-11 Thread Markus Armbruster
Generated tests/test-qapi-introspect.c changes as follows: --- test-qapi-introspect.c.old 2018-02-11 17:36:15.039696522 +0100 +++ tests/test-qapi-introspect.c2018-02-11 17:36:34.455419852 +0100 @@ -118,6 +118,9 @@ QLIT_QDICT(((QLitDictEntry[]) { { "ret-type",

Re: [Qemu-devel] [PATCHv2] linux-user: Fix sched_getaffinity mask size

2018-02-11 Thread Laurent Vivier
Le 11/02/2018 à 18:47, Samuel Thibault a écrit : > We properly computed the capped mask size to be put to the application > buffer, but didn't actually used it. Also, we need to return the capped mask > size instead of 0 on success. > > Signed-off-by: Samuel Thibault

[Qemu-devel] [PATCH RFC 06/14] qapi: add 'if' to top-level expressions

2018-02-11 Thread Markus Armbruster
From: Marc-André Lureau Accept 'if' key in top-level elements, accepted as string or list of string type. The following patches will modify the test visitor to check the value is correctly saved, and generate #if/#endif code (as a single #if/endif line or a series

Re: [Qemu-devel] [PATCH 2/2] 9p: fix leak in synth_name_to_path()

2018-02-11 Thread Greg Kurz
On Fri, 9 Feb 2018 19:29:20 +0100 Marc-André Lureau wrote: > Leak found thanks to ASAN: > > Direct leak of 8 byte(s) in 1 object(s) allocated from: > #0 0x55995789ac90 in __interceptor_malloc >

Re: [Qemu-devel] [RFC PATCH v6 00/20] replay additions

2018-02-11 Thread Pavel Dovgalyuk
> From: Ciro Santilli [mailto:ciro.santi...@gmail.com] > Awesome! This worked with my test procedure described at: > https://stackoverflow.com/questions/46970215/how-to-use-qemus-deterministic-record-and-replay-feature-for-a-linux-kernel-boo > While we are a it, can we clarify the following

Re: [Qemu-devel] [PATCH qemu v7 2/4] vfio/pci: Relax DMA map errors for MMIO regions

2018-02-11 Thread Alexey Kardashevskiy
On 12/02/18 16:19, David Gibson wrote: > On Fri, Feb 09, 2018 at 06:55:01PM +1100, Alexey Kardashevskiy wrote: >> At the moment if vfio_memory_listener is registered in the system memory >> address space, it maps/unmaps every RAM memory region for DMA. >> It expects system page size aligned memory

[Qemu-devel] [PATCH RFC 14/14] qapi: Add #if conditions to commands, events, types, visitors

2018-02-11 Thread Markus Armbruster
Example change to generated code: diff -rup test-qapi-events.h.old test-qapi-events.h --- test-qapi-events.h.old 2018-02-12 07:02:45.672737544 +0100 +++ test-qapi-events.h 2018-02-12 07:03:01.128517669 +0100 @@ -30,8 +30,10 @@ void qapi_event_send_event_e(UserDefZero

[Qemu-devel] [PATCH RFC 11/14] qapi: add #if/#endif helpers

2018-02-11 Thread Markus Armbruster
From: Marc-André Lureau Add helpers to wrap generated code with #if/#endif lines. Signed-off-by: Marc-André Lureau --- scripts/qapi/common.py | 18 ++ 1 file changed, 18 insertions(+) diff --git

[Qemu-devel] [PATCH RFC 12/14] qapi-introspect: modify to_qlit() to append ', ' on level > 0

2018-02-11 Thread Markus Armbruster
From: Marc-André Lureau The following patch is going to break list entries with #if/#endif, so they should have the trailing ',' as suffix. Signed-off-by: Marc-André Lureau Reviewed-by: Markus Armbruster ---

[Qemu-devel] [PATCH RFC 10/14] qapi: mcgen() shouldn't indent # lines

2018-02-11 Thread Markus Armbruster
From: Marc-André Lureau Skip preprocessor lines when adding indentation, since that would likely result in invalid code. Signed-off-by: Marc-André Lureau --- scripts/qapi/common.py | 4 ++-- 1 file changed, 2 insertions(+), 2

[Qemu-devel] [PATCH RFC 02/14] qlit: add qobject_from_qlit()

2018-02-11 Thread Markus Armbruster
From: Marc-André Lureau Instantiate a QObject* from a literal QLitObject. LitObject only supports int64_t for now. uint64_t and double aren't implemented. Signed-off-by: Marc-André Lureau Reviewed-by: Markus Armbruster

[Qemu-devel] [PATCH RFC 09/14] qapi: Pass ifcond to visitors

2018-02-11 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- scripts/qapi/common.py | 15 +++ tests/qapi-schema/qapi-schema-test.out | 9 + tests/qapi-schema/test-qapi.py | 19 +++ 3 files changed, 43 insertions(+) diff --git

[Qemu-devel] [PATCH RFC 07/14] qapi: pass 'if' condition into QAPISchemaEntity objects

2018-02-11 Thread Markus Armbruster
From: Marc-André Lureau Built-in objects remain unconditional. Explicitly defined objects use the condition specified in the schema. Implicitly defined objects inherit their condition from their users. For most of them, there is exactly one user, so the condition

[Qemu-devel] [PATCH RFC 04/14] qapi: generate a literal qobject for introspection

2018-02-11 Thread Markus Armbruster
From: Marc-André Lureau Replace the generated json string with a literal qobject. The later is easier to deal with, at run time as well as compile time: adding #if conditionals will be easier than in a json string. Signed-off-by: Marc-André Lureau

Re: [Qemu-devel] [PATCHv2 10/12] cuda: convert to use the shared mos6522 device

2018-02-11 Thread David Gibson
On Fri, Feb 09, 2018 at 06:51:40PM +, Mark Cave-Ayland wrote: > Add the relevant hooks as required for the MacOS timer calibration and delayed > SR interrupt. > > Signed-off-by: Mark Cave-Ayland Applied, thanks. > --- > hw/misc/macio/cuda.c | 606 >

[Qemu-devel] [PULL 02/12] hw/ppc: rename functions in comments

2018-02-11 Thread David Gibson
From: Daniel Henrique Barboza Commit bcb5ce08cf ("spapr: Rename machine init functions for clarity") renamed ppc_spapr_reset to spapr_machine_reset and ppc_spapr_init to spapr_machine_init. Let's also rename the references in comments. Signed-off-by: Daniel Henrique

[Qemu-devel] [PULL 00/12] ppc-for-2.12 queue 20180212

2018-02-11 Thread David Gibson
The following changes since commit c7b02d7d032d6022060e4b393827c963c93ce63f: Merge remote-tracking branch 'remotes/stsquad/tags/pull-travis-speedup-090218-1' into staging (2018-02-09 16:12:34 +) are available in the Git repository at: git://github.com/dgibson/qemu.git

[Qemu-devel] [PULL 04/12] cuda: don't allow writes to port output pins

2018-02-11 Thread David Gibson
From: Mark Cave-Ayland Use the direction registers as a mask to ensure that only input pins are updated upon write. Signed-off-by: Mark Cave-Ayland Reviewed-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé

[Qemu-devel] [PULL 05/12] spapr: set vsmt to MAX(8, smp_threads)

2018-02-11 Thread David Gibson
From: Laurent Vivier We ignore silently the value of smp_threads when we set the default VSMT value, and if smp_threads is greater than VSMT kernel is going into trouble later. Fixes: 8904e5a750 ("spapr: Adjust default VSMT value for better migration compatibility")

[Qemu-devel] [PULL 06/12] cuda: introduce CUDAState parameter to get_counter()

2018-02-11 Thread David Gibson
From: Mark Cave-Ayland This will be required shortly and also happens to match nicely with the corresponding signature for set_counter(). Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé

Re: [Qemu-devel] [PATCH RFC/D] docs: document our stable process

2018-02-11 Thread Michael Roth
Quoting Cornelia Huck (2018-02-09 07:11:12) > Some pointers on how to get a patch into stable. Thanks for putting this together. I made some minor suggestions below that might help clarify some points. > > Signed-off-by: Cornelia Huck > --- > > This probably needs more

[Qemu-devel] [PULL 01/12] spapr: add missing break in h_get_cpu_characteristics()

2018-02-11 Thread David Gibson
From: Greg Kurz Detected by Coverity (CID 1385702). This fixes the recently added hypercall to let guests properly apply Spectre and Meltdown workarounds. Fixes: c59704b25473 "target/ppc/spapr: Add H-Call H_GET_CPU_CHARACTERISTICS" Reported-by: Paolo Bonzini

[Qemu-devel] [PULL 07/12] cuda: rename frequency property to tb_frequency

2018-02-11 Thread David Gibson
From: Mark Cave-Ayland This allows us to more easily differentiate between the timebase frequency used to calibrate the MacOS timers and the actual frequency of the hardware clock as indicated by CUDA_TIMER_FREQ. Signed-off-by: Mark Cave-Ayland

[Qemu-devel] [PULL 08/12] cuda: minor cosmetic tidy-ups to get_next_irq_time()

2018-02-11 Thread David Gibson
From: Mark Cave-Ayland Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: David Gibson --- hw/misc/macio/cuda.c | 23 --- 1 file

[Qemu-devel] [PULL 09/12] cuda: don't call cuda_update() when writing to ACR register

2018-02-11 Thread David Gibson
From: Mark Cave-Ayland The wire protocol for reading data to/from the VIA is triggered by changing inputs on port B rather than changing the timer configuration via the ACR. Signed-off-by: Mark Cave-Ayland Signed-off-by: David

[Qemu-devel] [PULL 10/12] cuda: set timer 1 frequency property to CUDA_TIMER_FREQ

2018-02-11 Thread David Gibson
From: Mark Cave-Ayland Now that we have successfully decoupled the timebase frequency and the hardware timer frequency, set the timer 1 frequency property to CUDA_TIMER_FREQ and alter get_next_irq_time() to use it rather than the hard-coded constant. In addition

[Qemu-devel] [PULL 11/12] cuda: factor out timebase-derived counter value and load time

2018-02-11 Thread David Gibson
From: Mark Cave-Ayland Commit b981289c49 "PPC: Cuda: Use cuda timer to expose tbfreq to guest" altered the timer calculations from those based upon the hardware CUDA clock frequency to those based upon the CPU timebase frequency. In fact we can isolate the

[Qemu-devel] [PULL 03/12] cuda: do not use old_mmio accesses

2018-02-11 Thread David Gibson
From: Mark Cave-Ayland Signed-off-by: Mark Cave-Ayland Signed-off-by: David Gibson --- hw/misc/macio/cuda.c | 40 1 file changed, 8 insertions(+), 32

[Qemu-devel] [PULL 12/12] misc: introduce new mos6522 VIA device and enable it for ppc builds

2018-02-11 Thread David Gibson
From: Mark Cave-Ayland The MOS6522 VIA forms the bridge part of several Mac devices, including the Mac via-cuda and via-pmu devices. Introduce a standard mos6522 device that can be shared amongst multiple implementations. This is effectively taking the 6522 parts