[Qemu-devel] [PULL 08/32] tests/test-qga: Demonstrate the guest-agent ignores "id"

2018-07-03 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Message-Id: <20180703085358.13941-9-arm...@redhat.com> --- tests/test-qga.c | 20 1 file changed, 20 insertions(+) diff --git a/tests/test-qga.c b/tests/test-qga.c index 30c9643257..6b632e3da4 100644 --- a/tests/test-

[Qemu-devel] [PULL 10/32] tests/test-qga: Demonstrate the guest-agent ignores "control"

2018-07-03 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Message-Id: <20180703085358.13941-11-arm...@redhat.com> --- tests/test-qga.c | 17 + 1 file changed, 17 insertions(+) diff --git a/tests/test-qga.c b/tests/test-qga.c index 564a4594b5..2e9e0f73bb 100644 --- a/tests/test-qg

[Qemu-devel] [PATCH v4 10/12] linux-user/strace: Let print_sockaddr() have a 'last' argument

2018-07-03 Thread Philippe Mathieu-Daudé
If the format is not the syscall last argument, a comma is append. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Laurent Vivier --- linux-user/strace.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/linux-user/strace.c b/linux-user/strace.c index 54060eed93.

Re: [Qemu-devel] [PATCH v3 0/3] Use of unique identifier for pairing virtio and passthrough devices...

2018-07-03 Thread Roman Kagan
On Tue, Jul 03, 2018 at 09:28:17AM -0500, Venu Busireddy wrote: > On 2018-07-03 12:58:25 +0300, Roman Kagan wrote: > > My point with these two questions is that since this patchset is > > defining external interfaces -- with guest OS, with management layer -- > > This patch set is not defining any

[Qemu-devel] [PULL 13/32] qmp: Revert change to handle_qmp_command tracepoint

2018-07-03 Thread Markus Armbruster
Commit 71da4667db6 "monitor: separate QMP parser and dispatcher" moved the handle_qmp_command tracepoint from handle_qmp_command() to monitor_qmp_dispatch_one(). This delays tracing from enqueue time to dequeue time. Revert that. Dequeue remains adequately visible via tracepoint monitor_qmp_cmd_

[Qemu-devel] [PULL 01/32] qmp: Say "out-of-band" instead of "Out-Of-Band"

2018-07-03 Thread Markus Armbruster
Affects documentation and a few error messages. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Message-Id: <20180703085358.13941-2-arm...@redhat.com> --- docs/devel/qapi-code-gen.txt| 2 +- docs/interop/qmp-spec.txt | 2 +- monitor.c

[Qemu-devel] [PULL 14/32] qmp: Always free QMPRequest with qmp_request_free()

2018-07-03 Thread Markus Armbruster
monitor_qmp_dispatch_one() frees a QMPRequest manually, because it needs to keep a reference to ->id. Premature optimization. Take an additional reference so we can use qmp_request_free(). Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Message-Id: <20180703085358.13941-15-arm...@redh

[Qemu-devel] [PULL 04/32] qmp: Document COMMAND_DROPPED design flaw

2018-07-03 Thread Markus Armbruster
Events are broadcast to all monitors. If another monitor's client has a command with the same ID in flight, the event will incorrectly claim that command was dropped. This must be fixed before out-of-band execution can graduate from "experimental". Signed-off-by: Markus Armbruster Reviewed-by:

[Qemu-devel] [PULL 28/32] qmp: Switch timestamp_put() to qdict_from_jsonf_nofail()

2018-07-03 Thread Markus Armbruster
There's just one use of qobject_from_jsonf() to parse a JSON object left: timestamp_put(). Switch it to qdict_from_jsonf_nofail(). Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Message-Id: <20180703085358.13941-29-arm...@redhat.com> --- qapi/qmp-event.c | 10 +- 1 file chang

[Qemu-devel] [PULL 15/32] qmp: Simplify code around monitor_qmp_dispatch_one()

2018-07-03 Thread Markus Armbruster
Change monitor_qmp_dispatch_one() to take its parameters unwrapped, move monitor_resume() to the one caller that needs it, rename the function to monitor_qmp_dispatch(). Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Message-Id: <20180703085358.13941-16-arm...@redhat.com> --- monitor.

[Qemu-devel] [PULL 02/32] monitor: Spell "I/O thread" consistently in comments

2018-07-03 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Message-Id: <20180703085358.13941-3-arm...@redhat.com> --- monitor.c | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/monitor.c b/monitor.c index 208d7c7cfd..4f4f309d45 100644 --- a/m

[Qemu-devel] [PULL 07/32] qmp: Make "id" optional again even in "oob" monitors

2018-07-03 Thread Markus Armbruster
Commit cf869d53172 "qmp: support out-of-band (oob) execution" made "id" mandatory for all commands when the client accepted capability "oob". This is rather onerous when you play with QMP by hand, and unnecessarily so: only out-of-band commands need an ID for reliable matching of response to comma

[Qemu-devel] [PULL 26/32] qmp: Simplify monitor_qmp_respond()

2018-07-03 Thread Markus Armbruster
monitor_qmp_respond() takes both a response object and an error object. If an error object is non-null, the response object must be null, and the response is built from the error object. Of the two callers, one always passes a null response object, and one a null error object. Move building the

[Qemu-devel] [PULL 20/32] monitor: Peel off @mon_global wrapper

2018-07-03 Thread Markus Armbruster
Wrapping global variables in a struct without a use for the wrapper struct buys us nothing but longer lines. Unwrap them. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Message-Id: <20180703085358.13941-21-arm...@redhat.com> --- monitor.c | 60 +++-

[Qemu-devel] [PULL 27/32] qmp: Add some comments around null responses

2018-07-03 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Message-Id: <20180703085358.13941-28-arm...@redhat.com> --- qapi/qmp-dispatch.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qapi/qmp-dispatch.c b/qapi/qmp-dispatch.c index 761812e924..6f2d466596 100644 --- a/qapi/qmp-dispatch.c +

[Qemu-devel] [PULL 30/32] qmp: Clean up capability negotiation after commit 02130314d8c

2018-07-03 Thread Markus Armbruster
qmp_greeting() offers capabilities to the client, and qmp_qmp_capabilities() accepts or denies capabilities requested by the client. The two compute the set of available capabilities independently. Not nice. Clean this up as follows. Compute available capabilities just once in monitor_qmp_caps_

[Qemu-devel] [PULL 00/32] Monitor patches for 2018-07-03

2018-07-03 Thread Markus Armbruster
The following changes since commit e8c858944ea61923ca563bb5905bf04624d05f16: Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging (2018-07-02 19:07:19 +0100) are available in the Git repository at: git://repo.or.cz/qemu/armbru.git tags/pull-monitor-2018-07-03 for y

[Qemu-devel] [PULL 17/32] qmp: Don't let malformed in-band commands jump the queue

2018-07-03 Thread Markus Armbruster
handle_qmp_command() reports certain errors right away. This is wrong when OOB is enabled, because the errors can "jump the queue" then, as the previous commit demonstrates. To fix, we need to delay errors until dispatch. Do that for semantic errors, mostly by reverting ill-advised parts of comm

[Qemu-devel] [PULL 03/32] docs/interop/qmp: Improve OOB documentation

2018-07-03 Thread Markus Armbruster
OOB documentation is spread over qmp-spec.txt sections 2.2.1 Capabilities and 2.3 Issuing Commands. The amount of detail is a bit distracting there. Move the meat of the matter to new section 2.3.1 Out of band execution. Throw in a few other improvements while there: * 2.2 Server Greeting: Drop

[Qemu-devel] [PULL 09/32] qmp qemu-ga: Revert change that accidentally made qemu-ga accept "id"

2018-07-03 Thread Markus Armbruster
Commit cf869d53172 "qmp: support out-of-band (oob) execution" changed how we check "id": Note that in the patch I exported qmp_dispatch_check_obj() to be used to check the request earlier, and at the same time allowed "id" field to be there since actually we always allow that. The par

[Qemu-devel] [PATCH v7 00/14] qapi: add #if pre-processor conditions to generated code (part 1)

2018-07-03 Thread Marc-André Lureau
Hi, In order to clean-up some hacks in qapi (having to unregister commands at runtime), I proposed a "[PATCH v5 02/20] qapi.py: add a simple #ifdef condition" (see http://lists.gnu.org/archive/html/qemu-devel/2016-08/msg03106.html). However, we decided to drop that patch from the series and sol

[Qemu-devel] [PULL 05/32] qmp: Get rid of x-oob-test command

2018-07-03 Thread Markus Armbruster
tests/qmp-test tests an out-of-band command overtaking a slow in-band command. To do that, it needs: 1. An in-band command that *reliably* takes long enough to be overtaken. 2. An out-of-band command to do the overtaking. 3. To avoid delays, a way to make the in-band command complete quickly

[Qemu-devel] [PULL 31/32] monitor: Improve some comments

2018-07-03 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Message-Id: <20180703085358.13941-32-arm...@redhat.com> --- monitor.c | 100 -- 1 file changed, 45 insertions(+), 55 deletions(-) diff --git a/monitor.c b/monitor.c index f8b88ba105..511

[Qemu-devel] [PULL 18/32] qmp: Don't let JSON errors jump the queue

2018-07-03 Thread Markus Armbruster
handle_qmp_command() reports JSON syntax errors right away. This is wrong when OOB is enabled, because the errors can "jump the queue" then. The previous commit fixed the same bug for semantic errors, by delaying the checking until dispatch. We can't delay the checking, so delay the reporting.

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

2018-07-03 Thread 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 to use is obvious. The exception is wrapped types gener

[Qemu-devel] [PULL 23/32] qmp: Use QDict * instead of QObject * for response objects

2018-07-03 Thread Markus Armbruster
By using the more specific type, we get fewer downcasts. The downcasts are safe, but not obviously so, at least not locally. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Message-Id: <20180703085358.13941-24-arm...@redhat.com> --- include/qapi/qmp/dispatch.h | 4 ++-- monitor.c

[Qemu-devel] [PULL 25/32] qmp: Replace get_qmp_greeting() by qmp_greeting()

2018-07-03 Thread Markus Armbruster
get_qmp_greeting() returns a QDict * as QObject *. It's caller converts it right back. Return QDict * instead. While there, rename to qmp_greeting(). Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Message-Id: <20180703085358.13941-26-arm...@redhat.com> --- monitor.c | 13 +++---

[Qemu-devel] [PULL 16/32] tests/qmp-test: Demonstrate QMP errors jumping the queue

2018-07-03 Thread Markus Armbruster
When OOB is enabled, out-of-band commands are executed right away, everything else is queued. This lets out-of-band commands "jump the queue". However, certain errors are always reported right away, and therefore can jump the queue even when the erroneous input does not request out-of-band execut

Re: [Qemu-devel] [PATCH v2 07/32] qmp: Make "id" optional again even in "oob" monitors

2018-07-03 Thread Eric Blake
On 07/03/2018 03:53 AM, Markus Armbruster wrote: Commit cf869d53172 "qmp: support out-of-band (oob) execution" made "id" mandatory for all commands when the client accepted capability "oob". This is rather onerous when you play with QMP by hand, and unnecessarily so: only out-of-band commands ne

[Qemu-devel] [PATCH v7 04/14] qapi: add 'ifcond' to visitor methods

2018-07-03 Thread Marc-André Lureau
Modify the test visitor to check correct passing of values. Signed-off-by: Marc-André Lureau Reviewed-by: Markus Armbruster --- scripts/qapi/commands.py | 2 +- scripts/qapi/common.py | 31 ++ scripts/qapi/doc.py| 10 +++

[Qemu-devel] [PULL 24/32] qmp: Replace monitor_json_emitter{, raw}() by qmp_{queue, send}_response()

2018-07-03 Thread Markus Armbruster
monitor_json_emitter() and monitor_json_emitter_raw() are unnecessarily general: they can send arbitrary JSON values, even though we only ever use them for QMP, which may send only JSON objects. Specialize the argument from QObject * to QDict *, and rename to qmp_queue_response(), qmp_send_respons

[Qemu-devel] [PULL 21/32] qobject: New qdict_from_jsonf_nofail()

2018-07-03 Thread Markus Armbruster
Many uses of qobject_from_jsonf() convert JSON objects. Create new convenience function qdict_from_jsonf_nofail() that includes the conversion to QDict. The next few commits will put it to use. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Message-Id: <20180703085358.13941-22-arm...

[Qemu-devel] [PULL 12/32] qmp: Redo how the client requests out-of-band execution

2018-07-03 Thread Markus Armbruster
Commit cf869d53172 "qmp: support out-of-band (oob) execution" added a general mechanism for command-independent arguments just for an out-of-band flag: The "control" key is introduced to store this extra flag. "control" field is used to store arguments that are shared by all the commands,

[Qemu-devel] [PULL 19/32] monitor: Rename use_io_thr to use_io_thread

2018-07-03 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Message-Id: <20180703085358.13941-20-arm...@redhat.com> --- monitor.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/monitor.c b/monitor.c index ea5421399a..b3c5dcc685 100644 --- a/monitor.c ++

[Qemu-devel] [PATCH v7 14/14] qapi: add conditions to SPICE type/commands/events on the schema

2018-07-03 Thread Marc-André Lureau
Add #if defined(CONFIG_SPICE) in generated code, and adjust the qmp/hmp code accordingly. query-qmp-schema no longer reports the command/events etc as available when disabled at compile time. Commands made conditional: * query-spice Before the patch, the command for !CONFIG_SPICE is unregiste

[Qemu-devel] [PULL 22/32] qmp: De-duplicate error response building

2018-07-03 Thread Markus Armbruster
All callers of qmp_build_error_object() duplicate the code to wrap it in a response object. Replace it by qmp_error_response() that captures the duplicated code, including error_free(). Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Message-Id: <20180703085358.13941-23-arm...@redhat.c

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

2018-07-03 Thread 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 .ifcond, because None is a legitimate value. Leave the

[Qemu-devel] [PULL 29/32] qobject: Let qobject_from_jsonf() fail instead of abort

2018-07-03 Thread Markus Armbruster
qobject_from_jsonf() aborts on error, unlike qobject_from_jsonv(), which returns null. Since all remaining users of qobject_from_jsonf() cope fine with null, change it to return null. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Message-Id: <20180703085358.13941-30-arm...@redhat.com

Re: [Qemu-devel] [PULL v2 0/7] riscv-pull queue

2018-07-03 Thread Alistair Francis
On Sat, Jun 30, 2018 at 5:53 AM, Peter Maydell wrote: > On 29 June 2018 at 18:22, Alistair Francis wrote: >> The following changes since commit 75507f1aba6feb73ae43329922d51571550b9128: >> >> Merge remote-tracking branch 'remotes/berrange/tags/min-glib-pull-request' >> into staging (2018-06-29

[Qemu-devel] [PULL 32/32] qapi: Polish command flags documentation in qapi-code-gen.txt

2018-07-03 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Message-Id: <20180703085358.13941-33-arm...@redhat.com> --- docs/devel/qapi-code-gen.txt | 61 +++- 1 file changed, 25 insertions(+), 36 deletions(-) diff --git a/docs/devel/qapi-code-gen.txt b/docs/devel/q

[Qemu-devel] [PATCH v7 09/14] qapi/commands: add #if conditions to commands

2018-07-03 Thread Marc-André Lureau
Wrap generated code with #if/#endif using an 'ifcontext' on QAPIGenCSnippet objects. Signed-off-by: Marc-André Lureau --- scripts/qapi/commands.py | 26 +- tests/test-qmp-cmds.c| 4 ++-- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/scripts/qapi/co

[Qemu-devel] [PULL 11/32] qmp qemu-ga: Fix qemu-ga not to accept "control"

2018-07-03 Thread Markus Armbruster
Commit cf869d53172 "qmp: support out-of-band (oob) execution" accidentally made qemu-ga accept and ignore "control". Fix that. Out-of-band execution in a monitor that doesn't support it now fails with {"error": {"class": "GenericError", "desc": "QMP input member 'control' is unexpected"}}

Re: [Qemu-devel] [PATCH v2 12/32] qmp: Redo how the client requests out-of-band execution

2018-07-03 Thread Eric Blake
On 07/03/2018 03:53 AM, Markus Armbruster wrote: Commit cf869d53172 "qmp: support out-of-band (oob) execution" added a general mechanism for command-independent arguments just for an out-of-band flag: The "control" key is introduced to store this extra flag. "control" field is used to

[Qemu-devel] [PATCH v7 06/14] qapi: add #if/#endif helpers

2018-07-03 Thread Marc-André Lureau
Add helpers to wrap generated code with #if/#endif lines. A later patch wants to use QAPIGen for generating C snippets rather than full C files with copyright headers etc. Splice in class QAPIGenCCode between QAPIGen and QAPIGenC. Add a 'with' statement context manager that will be used to wrap

Re: [Qemu-devel] [PATCH v2 05/32] qmp: Get rid of x-oob-test command

2018-07-03 Thread Eric Blake
On 07/03/2018 03:53 AM, Markus Armbruster wrote: tests/qmp-test tests an out-of-band command overtaking a slow in-band command. To do that, it needs: Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake R-b stands, although: --- +static void setup_blocking_cmd(void) +{ +int

Re: [Qemu-devel] [PATCH v6 07/15] qapi: add #if/#endif helpers

2018-07-03 Thread Marc-André Lureau
Hi On Tue, Jul 3, 2018 at 5:34 PM, Markus Armbruster wrote: > Marc-André Lureau writes: > >> Hi >> >> On Tue, Jul 3, 2018 at 3:37 PM, Markus Armbruster wrote: >>> Marc-André Lureau writes: >>> Hi On Tue, Jul 3, 2018 at 1:53 PM, Markus Armbruster wrote: > Marc-André Lu

[Qemu-devel] [PATCH v7 12/14] qapi: add 'If:' section to generated documentation

2018-07-03 Thread Marc-André Lureau
The documentation is generated only once, and doesn't know C pre-conditions. Add 'If:' sections for top-level entities. Signed-off-by: Marc-André Lureau Reviewed-by: Markus Armbruster --- scripts/qapi/doc.py | 22 -- tests/qapi-schema/doc-good.json | 2 +- tests

Re: [Qemu-devel] [PATCH v3 01/13] linux-user/syscall: Verify recvfrom(addr) is user-writable

2018-07-03 Thread Philippe Mathieu-Daudé
On 07/03/2018 11:55 AM, Laurent Vivier wrote: > Le 02/07/2018 à 19:50, Philippe Mathieu-Daudé a écrit : >> Signed-off-by: Philippe Mathieu-Daudé >> Tested-By: Guido Günther >> Reviewed-by: Laurent Vivier >> --- >> linux-user/syscall.c | 5 + >> 1 file changed, 5 insertions(+) >> >> diff --g

Re: [Qemu-devel] [PATCH v7 01/14] qapi: add 'if' to top-level expressions

2018-07-03 Thread Markus Armbruster
Marc-André Lureau writes: > 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 for a list). > > Examp

Re: [Qemu-devel] [PATCH 2/4] tests/vm: Add a dependency to qemu-img

2018-07-03 Thread Philippe Mathieu-Daudé
Hi Fam, On 07/02/2018 12:19 PM, Philippe Mathieu-Daudé wrote: > On 07/02/2018 04:18 AM, Fam Zheng wrote: >> On Thu, 06/28 12:35, Philippe Mathieu-Daudé wrote: >>> Before the first use, the VM image are resized with qemu-img. >>> >>> Add a dependency to the qemu-img tool to fix: >>> >>> $ make vm

Re: [Qemu-devel] [PATCH v2 03/32] docs/interop/qmp: Improve OOB documentation

2018-07-03 Thread Markus Armbruster
Eric Blake writes: > On 07/03/2018 03:53 AM, Markus Armbruster wrote: >> OOB documentation is spread over qmp-spec.txt sections 2.2.1 >> Capabilities and 2.3 Issuing Commands. The amount of detail is a bit >> distracting there. Move the meat of the matter to new section 2.3.1 >> Out of band exe

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

2018-07-03 Thread 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 for a list). Example of 'if' key: { 'struct': 'TestIfStru

Re: [Qemu-devel] [PATCH] qga: report disk size and free space

2018-07-03 Thread Eric Blake
On 07/03/2018 03:31 AM, Tomáš Golembiovský wrote: Report total file system size and free space in output of command "guest-get-fsinfo". Values are optional and it is not an error if they cannot be retrieved for some reason. Signed-off-by: Tomáš Golembiovský --- qga/commands-posix.c | 18 +

Re: [Qemu-devel] [PATCH v2 2/2] iotests: New test 223 for exporting dirty bitmap over NBD

2018-07-03 Thread Eric Blake
On 07/03/2018 05:09 AM, Vladimir Sementsov-Ogievskiy wrote: 02.07.2018 22:14, Eric Blake wrote: Although this test is NOT a full test of image fleecing (as it intentionally uses just a single block device directly exported over NBD, rather than trying to set up a blockdev-backup job with multipl

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

2018-07-03 Thread Marc-André Lureau
Skip preprocessor lines when adding indentation, since that would likely result in invalid code. Signed-off-by: Marc-André Lureau Reviewed-by: Markus Armbruster --- scripts/qapi/common.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/qapi/common.py b/scripts/qa

Re: [Qemu-devel] [PATCH 09/12] ring: introduce lockless ring buffer

2018-07-03 Thread Paul E. McKenney
On Fri, Jun 29, 2018 at 11:55:08AM +0800, Xiao Guangrong wrote: > > > On 06/28/2018 07:55 PM, Wei Wang wrote: > >On 06/28/2018 06:02 PM, Xiao Guangrong wrote: > >> > >>CC: Paul, Peter Zijlstra, Stefani, Lai who are all good at memory barrier. > >> > >> > >>On 06/20/2018 12:52 PM, Peter Xu wrote:

[Qemu-devel] [PATCH v7 08/14] qapi-introspect: add preprocessor conditions to generated QLit

2018-07-03 Thread Marc-André Lureau
This commit adds 'ifcond' conditions to top-level QLit objects. Future work will add them to object and enum type members, i.e. within QLit objects. Extend the QLit generator to_qlit() to accept (@obj, @cond) tuples in addition to just @obj. The tuple causes the QLit generated for objects for @ob

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

2018-07-03 Thread 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 --- scripts/qapi/introspect.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/qapi/

[Qemu-devel] [PATCH v7 10/14] qapi/events: add #if conditions to events

2018-07-03 Thread Marc-André Lureau
Wrap generated code with #if/#endif using an 'ifcontext' on QAPIGenCSnippet objects. This makes a conditional event's qapi_event_send_FOO() compile-time conditional, but its enum QAPIEvent member remains unconditional for now. A follow up patch "qapi-event: add 'if' condition to implicit event enu

[Qemu-devel] [PATCH v7 11/14] qapi-types: add #if conditions to types & visitors

2018-07-03 Thread Marc-André Lureau
From: Markus Armbruster Types & visitors are coupled and must be handled together to avoid temporary build regression. Wrap generated types/visitor code with #if/#endif using the context helpers. Derived from a patch by Marc-André. Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbrus

[Qemu-devel] [PATCH v7 13/14] qapi: add conditions to VNC type/commands/events on the schema

2018-07-03 Thread Marc-André Lureau
Add #if defined(CONFIG_VNC) in generated code, and adjust the qmp/hmp code accordingly. query-qmp-schema no longer reports the command/events etc as available when disabled at compile. Commands made conditional: * query-vnc, query-vnc-servers, change-vnc-password Before the patch, the command

[Qemu-devel] [PULL 5/7] linux-user: update do_setsockopt()

2018-07-03 Thread Laurent Vivier
add IPV6_MULTICAST_HOPS and IPV6_MULTICAST_LOOP that need 32bit value conversion Signed-off-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20180627212152.26525-3-laur...@vivier.eu> --- linux-user/syscall.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/linux-user/sys

[Qemu-devel] [PULL v3 6/7] hw/riscv/sifive_u: Move the uart device tree node under /soc/

2018-07-03 Thread Alistair Francis
Signed-off-by: Alistair Francis Reviewed-by: Michael Clark --- hw/riscv/sifive_u.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/riscv/sifive_u.c b/hw/riscv/sifive_u.c index f71527eaff..46459cd368 100644 --- a/hw/riscv/sifive_u.c +++ b/hw/riscv/sifive_u.c @@ -194,7 +194,

[Qemu-devel] [PULL 7/7] linux-user/strace: Improve recvmsg() output

2018-07-03 Thread Laurent Vivier
From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Tested-By: Guido Günther Reviewed-by: Laurent Vivier Message-Id: <20180628034652.24152-7-f4...@amsat.org> Signed-off-by: Laurent Vivier --- linux-user/strace.list | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --

[Qemu-devel] [PATCH] scripts/qemu-binfmt-conf.sh: allow clearing of entries

2018-07-03 Thread Alex Bennée
Currently running the script twice will fail with "sh: echo: I/O error" as the registration is already complete. Add a new option --clear to reset the entries to save the user doing it by hand. Signed-off-by: Alex Bennée --- scripts/qemu-binfmt-conf.sh | 16 ++-- 1 file changed, 14 i

[Qemu-devel] [PULL 1/7] qemu-binfmt-conf.sh: cleanup --credential

2018-07-03 Thread Laurent Vivier
move credential value to its own variable to be able to manage more flags Signed-off-by: Laurent Vivier Message-Id: <20180627205317.10343-2-laur...@vivier.eu> --- scripts/qemu-binfmt-conf.sh | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/scripts/qemu-bin

Re: [Qemu-devel] [PATCH v2 1/2] nbd/client: Add x-dirty-bitmap to query bitmap from server

2018-07-03 Thread Eric Blake
On 07/03/2018 04:46 AM, Vladimir Sementsov-Ogievskiy wrote:   # +# @x-dirty-bitmap: A "qemu:dirty-bitmap:NAME" string to query in place of +#  traditional "base:allocation" block status (see +#  NBD_OPT_LIST_META_CONTEXT in the NBD protocol) (since 3.0) +# "

Re: [Qemu-devel] [PULL v3 00/25] OpenRISC updates for 3.0

2018-07-03 Thread Peter Maydell
ase consider for pull: > > The following changes since commit 646f34fa5482e495483de230b4cf0f2ae4fd2781: > > tcg: Fix --disable-tcg build breakage (2018-07-02 13:42:05 +0100) > > are available in the Git repository at: > > g...@github.com:stffrdhrn/qemu.git ta

[Qemu-devel] [PULL 3/7] qemu-binfmt-conf.sh: allow to provide a suffix to the interpreter name

2018-07-03 Thread Laurent Vivier
some distros provide a qemu-CPU-static binary beside the qemu-CPU one. This change allows to use it by providing "--qemu-suffix -static" to the script. Signed-off-by: Laurent Vivier Message-Id: <20180627205317.10343-4-laur...@vivier.eu> --- scripts/qemu-binfmt-conf.sh | 41 ++

Re: [Qemu-devel] [PATCH v2 2/3] block/fleecing-filter: new filter driver for fleecing

2018-07-03 Thread Vladimir Sementsov-Ogievskiy
03.07.2018 14:15, Kevin Wolf wrote: Am 02.07.2018 um 14:09 hat Vladimir Sementsov-Ogievskiy geschrieben: 29.06.2018 20:40, Eric Blake wrote: On 06/29/2018 12:30 PM, John Snow wrote: On 06/29/2018 11:15 AM, Vladimir Sementsov-Ogievskiy wrote: We need to synchronize backup job with reading fro

Re: [Qemu-devel] [PATCH v7 04/14] qapi: add 'ifcond' to visitor methods

2018-07-03 Thread Markus Armbruster
Marc-André Lureau writes: > Modify the test visitor to check correct passing of values. > > Signed-off-by: Marc-André Lureau > Reviewed-by: Markus Armbruster > --- [...] > diff --git a/roms/seabios b/roms/seabios > index f9626ccb91..0551a4be2c 16 > --- a/roms/seabios > +++ b/roms/seabios >

[Qemu-devel] [PULL v3 1/7] hw/riscv/sifive_u: Create a SiFive U SoC object

2018-07-03 Thread Alistair Francis
Create a SiFive Unleashed U54 SoC and use that in the sifive_u machine. We leave the SoC, RAM, device tree and reset/fdt loading as part of the machine. All the other device creation has been moved to the SoC. Signed-off-by: Alistair Francis Reviewed-by: Michael Clark --- hw/riscv/sifive_u.c

Re: [Qemu-devel] [PATCH] qga: report disk size and free space

2018-07-03 Thread Eric Blake
On 07/03/2018 05:54 AM, Tomáš Golembiovský wrote: On Tue, 3 Jul 2018 10:31:20 +0200 Tomáš Golembiovský wrote: diff --git a/qga/commands-win32.c b/qga/commands-win32.c index 70ee5379f6..6d6ca05281 100644 --- a/qga/commands-win32.c +++ b/qga/commands-win32.c @@ -706,6 +706,22 @@ static GuestFil

Re: [Qemu-devel] [PATCH v3 01/13] linux-user/syscall: Verify recvfrom(addr) is user-writable

2018-07-03 Thread Laurent Vivier
Le 03/07/2018 à 17:39, Philippe Mathieu-Daudé a écrit : > On 07/03/2018 11:55 AM, Laurent Vivier wrote: >> Le 02/07/2018 à 19:50, Philippe Mathieu-Daudé a écrit : >>> Signed-off-by: Philippe Mathieu-Daudé >>> Tested-By: Guido Günther >>> Reviewed-by: Laurent Vivier >>> --- >>> linux-user/syscal

Re: [Qemu-devel] [PATCH 1/2] drity-bitmap: refactor merge: separte can_merge

2018-07-03 Thread Eric Blake
On 07/03/2018 05:53 AM, Vladimir Sementsov-Ogievskiy wrote: In the subject: s/drity/dirty/, s/separte/separate/ Separate can_merge, to reuse it for transaction support for merge command. Also, switch some asserts to errors. Signed-off-by: Vladimir Sementsov-Ogievskiy --- Reviewed-by: Eric

Re: [Qemu-devel] [PATCH v3 00/11] NBD reconnect

2018-07-03 Thread Eric Blake
On 07/03/2018 08:46 AM, Vladimir Sementsov-Ogievskiy wrote: Hi all. before v4 realization, I'd like to discuss some questions. Our proposal for v4 is the following: 1. don't reconnect on nbd_open. So, on open we do only one connect attempt, and if it fails, open fails. 2. don't configure tim

Re: [Qemu-devel] [PATCH 2/2] qapi: add transaction support for x-block-dirty-bitmap-merge

2018-07-03 Thread Eric Blake
On 07/03/2018 05:53 AM, Vladimir Sementsov-Ogievskiy wrote: Signed-off-by: Vladimir Sementsov-Ogievskiy --- qapi/transaction.json | 2 ++ blockdev.c| 53 ++- 2 files changed, 54 insertions(+), 1 deletion(-) I'll let John handle t

[Qemu-devel] [PULL 6/7] linux-user/strace: Improve capget()/capset() output

2018-07-03 Thread Laurent Vivier
From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Tested-By: Guido Günther Reviewed-by: Laurent Vivier Message-Id: <20180628034652.24152-3-f4...@amsat.org> Signed-off-by: Laurent Vivier --- linux-user/strace.list | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) dif

Re: [Qemu-devel] question: disk missing in the guest contingently when hotplug several virtio scsi disks consecutively.

2018-07-03 Thread Paolo Bonzini
On 03/07/2018 09:20, l00284672 wrote: > > } > > The scsi inqury request from guest is cancelled by qemu. The qemu bt is > below: > > (gdb) bt > #0  scsi_req_cancel_async (req=0x7f86d00055c0, notifier=0x0) at > hw/scsi/scsi-bus.c:1825 > #1  0x55b50ac254c7 in scsi_device_purge_requests > (sdev

[Qemu-devel] [PULL v3 4/7] hw/riscv/sifive_u: Set the soc device tree node as a simple-bus

2018-07-03 Thread Alistair Francis
To allow Linux to ennumerate devices on the /soc/ node set it as a "simple-bus". Signed-off-by: Alistair Francis Reviewed-by: Michael Clark --- hw/riscv/sifive_u.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/riscv/sifive_u.c b/hw/riscv/sifive_u.c index 3883d7ff9c..f43

[Qemu-devel] [PULL 0/7] Linux user for 3.0 patches

2018-07-03 Thread Laurent Vivier
The following changes since commit ab08440a4ee09032d1a9cb22fdcab23bc7e1c656: Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20180702' into staging (2018-07-02 17:57:46 +0100) are available in the Git repository at: git://github.com/vivier/qemu.git tags/linux-user-for-3.0-pull-reque

[Qemu-devel] [PULL 4/7] linux-user: add netlink CARRIER_UP_COUNT/CARRIER_DOWN_COUNT

2018-07-03 Thread Laurent Vivier
Error is reported with libuv test suite: not ok 311 - udp_multicast_interface6 # exit code 134 # Output from process `udp_multicast_interface6`: # Unknown host QEMU_IFLA type: 47 # Unknown host QEMU_IFLA type: 48 # Unknown host QEMU_IFLA type: 47 # Unknown host QEMU_IFLA type: 48 # Unknown

Re: [Qemu-devel] [PATCH v7 09/14] qapi/commands: add #if conditions to commands

2018-07-03 Thread Markus Armbruster
Marc-André Lureau writes: > Wrap generated code with #if/#endif using an 'ifcontext' on > QAPIGenCSnippet objects. > > Signed-off-by: Marc-André Lureau Reviewed-by: Markus Armbruster

[Qemu-devel] [PULL 2/7] qemu-binfmt-conf.sh: add persistent (F) flags

2018-07-03 Thread Laurent Vivier
Since kernel commit 948b701a607f (binfmt_misc: add persistent opened binary handler for containers) kernel allows to load the interpreter at the configuration time. In case of chroot, it allows to have the interpreter in the host root filesystem and not to copy it to the chroot filesystem. Signed

Re: [Qemu-devel] [PATCH v7 00/14] qapi: add #if pre-processor conditions to generated code (part 1)

2018-07-03 Thread Markus Armbruster
Applied to qapi-next, testing still in progress.

[Qemu-devel] [PULL v3 0/7] riscv-pull queue

2018-07-03 Thread Alistair Francis
The following changes since commit f988c7e191141e92de2059d04a5f9a9bb01f399c: Merge remote-tracking branch 'remotes/shorne/tags/pull-or-20180703' into staging (2018-07-03 16:04:41 +0100) are available in the Git repository at: g...@github.com:alistair23/qemu.git tags/pull-

Re: [Qemu-devel] [PATCH] scripts/qemu-binfmt-conf.sh: allow clearing of entries

2018-07-03 Thread Laurent Vivier
Le 03/07/2018 à 18:00, Alex Bennée a écrit : > Currently running the script twice will fail with "sh: echo: I/O > error" as the registration is already complete. Add a new option > --clear to reset the entries to save the user doing it by hand. > > Signed-off-by: Alex Bennée > --- > scripts/qemu

[Qemu-devel] [PULL v3 3/7] hw/riscv/sifive_plic: Use gpios instead of irqs

2018-07-03 Thread Alistair Francis
Instead of creating the interrupt in lines with qemu_allocate_irq() use qdev_init_gpio_in() as this gives us the ability to use the qdev*gpio*() helpers later on. Signed-off-by: Alistair Francis Suggested-by: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Michael Clark

[Qemu-devel] [PULL v3 5/7] hw/riscv/sifive_u: Set the interrupt controler number of interrupts

2018-07-03 Thread Alistair Francis
Set the interrupt-controller ndev to the correct number taken from the HiFive Unleashed board. Signed-off-by: Alistair Francis Reviewed-by: Michael Clark --- hw/riscv/sifive_u.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/riscv/sifive_u.c b/hw/riscv/sifive_u.c index f

[Qemu-devel] [PULL v3 2/7] hw/riscv/sifive_e: Create a SiFive E SoC object

2018-07-03 Thread Alistair Francis
Signed-off-by: Alistair Francis Reviewed-by: Michael Clark --- hw/riscv/sifive_e.c | 97 +++-- include/hw/riscv/sifive_e.h | 16 +- 2 files changed, 86 insertions(+), 27 deletions(-) diff --git a/hw/riscv/sifive_e.c b/hw/riscv/sifive_e.c index e4ecb7a

Re: [Qemu-devel] [PATCH] hw/char/cmsdk-apb-timer: Correctly identify and set one-shot mode

2018-07-03 Thread Peter Maydell
On 2 July 2018 at 19:37, Guenter Roeck wrote: > Please try http://server.roeck-us.net/qemu/an385/ > > vmlinux is plain v4.18-rc3 compiled with the provided defconfig and > the provided toolchain (position independent, created with buildroot). > defconfig is mps2_defconfig+CONFIG_BLK_DEV_INITRD=y.

[Qemu-devel] [PULL v3 7/7] hw/riscv/sifive_u: Connect the Cadence GEM Ethernet device

2018-07-03 Thread Alistair Francis
Connect the Cadence GEM ethernet device. This also requires us to expose the plic interrupt lines. Signed-off-by: Alistair Francis Reviewed-by: Michael Clark --- default-configs/riscv32-softmmu.mak | 2 ++ default-configs/riscv64-softmmu.mak | 2 ++ hw/riscv/sifive_u.c | 50 ++

Re: [Qemu-devel] [PATCH v7 06/14] qapi: add #if/#endif helpers

2018-07-03 Thread Markus Armbruster
Marc-André Lureau writes: > Add helpers to wrap generated code with #if/#endif lines. > > A later patch wants to use QAPIGen for generating C snippets rather > than full C files with copyright headers etc. Splice in class > QAPIGenCCode between QAPIGen and QAPIGenC. > > Add a 'with' statement co

[Qemu-devel] [PATCH for-3.0 0/4] cmsdk-apb-timer: various bugfixes

2018-07-03 Thread Peter Maydell
This patchseries includes Guenter's recent patch to suppress warning messages from the ptimer layer that otherwise occur from the way the Linux driver for this timer device operates. The other patches here fix more obscure things: * the timer interrupt is only supposed to trigger when the coun

Re: [Qemu-devel] [Qemu-block] [PULL 3/3] backup: Use copy offloading

2018-07-03 Thread John Snow
On 07/02/2018 11:46 PM, Jeff Cody wrote: > From: Fam Zheng > > The implementation is similar to the 'qemu-img convert'. In the > beginning of the job, offloaded copy is attempted. If it fails, further > I/O will go through the existing bounce buffer code path. > > Then, as Kevin pointed out,

[Qemu-devel] [PATCH for-3.0 3/4] hw/timer/cmsdk-apb-timer: Correctly identify and set one-shot mode

2018-07-03 Thread Peter Maydell
From: Guenter Roeck The CMSDK APB timer is currently always configured as periodic timer. This results in the following messages when trying to boot Linux. Timer with delta zero, disabling If the timer limit set with the RELOAD command is 0, the timer needs to be enabled as one-shot timer. Sig

[Qemu-devel] [PATCH for-3.0 4/4] hw/timer/cmsdk-apb-timer: run or stop timer on writes to RELOAD and VALUE

2018-07-03 Thread Peter Maydell
If the CMSDK APB timer is set up with a zero RELOAD value then it will count down to zero, fire once and then stay at zero. From the point of view of the ptimer system, the timer is disabled; but the enable bit in the CTRL register is still set and if the guest subsequently writes to the RELOAD or

[Qemu-devel] [PATCH for-3.0 2/4] hw/timer/cmsdk-apb-timer: Correct ptimer policy settings

2018-07-03 Thread Peter Maydell
The CMSDK timer interrupt triggers when the counter goes from 1 to 0, so we want to trigger immediately, rather than waiting for a clock cycle. Drop the incorrect NO_IMMEDIATE_TRIGGER setting. We also do not want to get an interrupt if the guest sets the counter directly to zero, so use the new TRI

[Qemu-devel] [PATCH for-3.0 1/4] ptimer: Add TRIGGER_ONLY_ON_DECREMENT policy option

2018-07-03 Thread Peter Maydell
The CMSDK timer behaviour is that an interrupt is triggered when the counter counts down from 1 to 0; however one is not triggered if the counter is manually set to 0 by a guest write to the counter register. Currently ptimer can't handle this; add a policy option to allow a ptimer user to request

Re: [Qemu-devel] [PULL 0/2] Usb 20180703 patches

2018-07-03 Thread Peter Maydell
git repository at: > > git://git.kraxel.org/qemu tags/usb-20180703-pull-request > > for you to fetch changes up to 8f36ec708834dfad58af6feb0b69bb0be6077f0f: > > xhci: fix guest-triggerable assert (2018-07-03 09:50:39 +0200) > > --

  1   2   3   4   5   >