Re: [Qemu-devel] [PATCH v4 16/28] qapi: Make string input and opts visitor require non-null input

2017-03-06 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > On 03/03/2017 09:32 AM, Markus Armbruster wrote: >> The string input visitor tries to cope with null input. Null input >> isn't used anywhere, and isn't covered by tests. Unsurprisingly, it >> doesn't fully work: start_list() crashes because it passes the input

Re: [Qemu-devel] [PATCH v4 10/28] qmp: Improve QMP dispatch error messages

2017-03-06 Thread Markus Armbruster
Eric Blake writes: > On 03/05/2017 02:01 AM, Markus Armbruster wrote: > @@ -41,15 +41,17 @@ static QDict *qmp_dispatch_check_obj(const QObject *request, Error **errp) if (!strcmp(arg_name, "execute")) { if (qobject_type(arg_obj) != QTYPE_QSTRING) {

Re: [Qemu-devel] [PATCH v10 1/8] msix: Rename and create a wrapper

2017-03-06 Thread Markus Armbruster
Uh, two weeks since your posted this already. I apologize for taking so long to review. Cao jin writes: > Rename msix_init to msix_validate_and_init, and use it from vfio which > might get a reasonable -EINVAL. New a wrapper msix_init which assert the > programming error for debug purpose and

Re: [Qemu-devel] [PULL v3 00/24] block: Command line option -blockdev

2017-03-06 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 1488871237-12332-1-git-send-email-arm...@redhat.com Subject: [Qemu-devel] [PULL v3 00/24] block: Command line option -blockdev Type: series === TEST SCRIPT BEGIN === #!/bin/bash BASE=bas

Re: [Qemu-devel] [RFC] x86: Allow to set NUMA distance for different NUMA nodes

2017-03-06 Thread Markus Armbruster
He Chen writes: > On Fri, Mar 03, 2017 at 02:10:50PM -0300, Eduardo Habkost wrote: >> On Fri, Mar 03, 2017 at 04:52:18PM +, Daniel P. Berrange wrote: >> > On Fri, Mar 03, 2017 at 01:47:51PM -0300, Eduardo Habkost wrote: >> > > On Fri, Mar 03, 2017 at 04:26:12PM +, Daniel P. Berrange wrote

[Qemu-devel] [PULL v3 24/24] keyval: Support lists

2017-03-06 Thread Markus Armbruster
Additionally permit non-negative integers as key components. A dictionary's keys must either be all integers or none. If all keys are integers, convert the dictionary to a list. The set of keys must be [0,N]. Examples: * list.1=goner,list.0=null,list.1=eins,list.2=zwei is equivalent to JSON

[Qemu-devel] [PULL v3 17/24] test-qapi-util: New, covering qapi/qapi-util.c

2017-03-06 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Kevin Wolf Message-Id: <1488317230-26248-18-git-send-email-arm...@redhat.com> --- tests/.gitignore | 1 + tests/Makefile.include | 3 +++ tests/test-qapi-util.c | 51 ++ 3 files changed, 55 inse

[Qemu-devel] [PULL v3 05/24] test-keyval: Cover use with qobject input visitor

2017-03-06 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Kevin Wolf Message-Id: <1488317230-26248-6-git-send-email-arm...@redhat.com> --- tests/test-keyval.c | 312 1 file changed, 312 insertions(+) diff --git a/tests/test-keyval.c b/tests/test-keyval.c

[Qemu-devel] [PULL v3 20/24] qapi: New qobject_input_visitor_new_str() for convenience

2017-03-06 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Message-Id: <1488317230-26248-21-git-send-email-arm...@redhat.com> --- include/qapi/qobject-input-visitor.h | 12 qapi/qobject-input-visitor.c | 36 2 files changed, 48 insertions(+) diff --git a/include/q

[Qemu-devel] [PULL v3 12/24] qobject: Propagate parse errors through qobject_from_json()

2017-03-06 Thread Markus Armbruster
The next few commits will put the errors to use where appropriate. Signed-off-by: Markus Armbruster Reviewed-by: Kevin Wolf Reviewed-by: Eric Blake Message-Id: <1488317230-26248-13-git-send-email-arm...@redhat.com> --- block.c| 2 +- include/qapi/qmp/qjson.h

Re: [Qemu-devel] [PULL RESEND 00/19] Net patches

2017-03-06 Thread Peter Maydell
On 6 March 2017 at 05:25, Jason Wang wrote: > The following changes since commit 17783ac828adc694d986698d2d7014aedfeb48c6: > > Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-2.9-20170303' > into staging (2017-03-04 16:31:14 +) > > are available in the git repository at: > > ht

[Qemu-devel] [PULL v3 19/24] keyval: Restrict key components to valid QAPI names

2017-03-06 Thread Markus Armbruster
Until now, key components are separated by '.'. This leaves little room for evolving the syntax, and is incompatible with the __RFQDN_ prefix convention for downstream extensions. Since key components will be commonly used as QAPI member names by the QObject input visitor, we can just as well bor

[Qemu-devel] [PULL v3 04/24] qapi: qobject input visitor variant for use with keyval_parse()

2017-03-06 Thread Markus Armbruster
From: "Daniel P. Berrange" Currently the QObjectInputVisitor assumes that all scalar values are directly represented as the final types declared by the thing being visited. i.e. it assumes an 'int' is using QInt, and a 'bool' is using QBool, etc. This is good when QObjectInputVisitor is fed a QO

[Qemu-devel] [PULL v3 08/24] qobject: Propagate parse errors through qobject_from_jsonv()

2017-03-06 Thread Markus Armbruster
The next few commits will put the errors to use where appropriate. Signed-off-by: Markus Armbruster Reviewed-by: Kevin Wolf Message-Id: <1488317230-26248-9-git-send-email-arm...@redhat.com> --- include/qapi/qmp/qjson.h | 3 ++- qobject/qjson.c| 12 te

[Qemu-devel] [PULL v3 13/24] block: More detailed syntax error reporting for JSON filenames

2017-03-06 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Kevin Wolf Message-Id: <1488317230-26248-14-git-send-email-arm...@redhat.com> --- block.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/block.c b/block.c index 5ef5c7c..fe7bddb 100644 --- a/block.c +++ b/block.c @@ -126

[Qemu-devel] [PULL v3 06/24] qapi: Factor out common part of qobject input visitor creation

2017-03-06 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Kevin Wolf Message-Id: <1488317230-26248-7-git-send-email-arm...@redhat.com> --- qapi/qobject-input-visitor.c | 61 +++- 1 file changed, 26 insertions(+), 35 deletions(-) diff --git a/qapi/qobject-input-visito

[Qemu-devel] [PATCH v3] linux-user: allocate heap memory for execve arguments

2017-03-06 Thread P J P
From: Prasad J Pandit Arguments passed to execve(2) call from user program could be large, allocating stack memory for them via alloca(3) call would lead to bad behaviour. Use 'g_new0' to allocate memory for such arguments. Reported-by: Jann Horn Signed-off-by: Prasad J Pandit --- linux-user/

[Qemu-devel] [PULL v3 16/24] monitor: Assert qmp_schema_json[] is sane

2017-03-06 Thread Markus Armbruster
qmp_query_qmp_schema() parses qmp_schema_json[] with qobject_from_json(). This must not fail, so pass &error_abort. Signed-off-by: Markus Armbruster Reviewed-by: Kevin Wolf Message-Id: <1488317230-26248-17-git-send-email-arm...@redhat.com> --- monitor.c | 2 +- 1 file changed, 1 insertion(+),

[Qemu-devel] [PULL v3 15/24] test-visitor-serialization: Pass &error_abort to qobject_from_json()

2017-03-06 Thread Markus Armbruster
qmp_deserialize() calls qobject_from_json() ignoring errors. It passes the result to qobject_input_visitor_new(), which asserts it's not null. Therefore, we can just as well pass &error_abort to qobject_from_json(). Signed-off-by: Markus Armbruster Reviewed-by: Kevin Wolf Message-Id: <14883172

[Qemu-devel] [PULL v3 07/24] qapi: Factor out common qobject_input_get_keyval()

2017-03-06 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Message-Id: <1488317230-26248-8-git-send-email-arm...@redhat.com> --- qapi/qobject-input-visitor.c | 87 ++-- 1 file changed, 35 insertions(+), 52 deletions(-) diff --git a/qapi/qobject-input-visito

[Qemu-devel] [PULL v3 23/24] docs/qapi-code-gen.txt: Clarify naming rules

2017-03-06 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Kevin Wolf Message-Id: <1488317230-26248-24-git-send-email-arm...@redhat.com> --- docs/qapi-code-gen.txt | 61 -- 1 file changed, 39 insertions(+), 22 deletions(-) diff --git a/docs/qapi-code-gen.txt b

[Qemu-devel] [PULL v3 14/24] check-qjson: Test errors from qobject_from_json()

2017-03-06 Thread Markus Armbruster
Pass &error_abort with known-good input. Else pass &err and check what comes back. This demonstrates that the parser fails silently for many errors. Signed-off-by: Markus Armbruster Reviewed-by: Kevin Wolf Message-Id: <1488317230-26248-15-git-send-email-arm...@redhat.com> --- tests/check-qjso

[Qemu-devel] [PULL v3 03/24] keyval: New keyval_parse()

2017-03-06 Thread Markus Armbruster
keyval_parse() parses KEY=VALUE,... into a QDict. Works like qemu_opts_parse(), except: * Returns a QDict instead of a QemuOpts (d'oh). * Supports nesting, unlike QemuOpts: a KEY is split into key fragments at '.' (dotted key convention; the block layer does something similar on top of QemuO

[Qemu-devel] [PULL v3 02/24] tests: Fix gcov-files-test-qemu-opts-y, gcov-files-test-logging-y

2017-03-06 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Kevin Wolf Message-Id: <1488317230-26248-3-git-send-email-arm...@redhat.com> --- tests/Makefile.include | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Makefile.include b/tests/Makefile.include i

[Qemu-devel] [PULL v3 21/24] block: Initial implementation of -blockdev

2017-03-06 Thread Markus Armbruster
The new command line option -blockdev works like QMP command blockdev-add. The option argument may be given in JSON syntax, exactly as in QMP. Example usage: -blockdev '{"node-name": "foo", "driver": "raw", "file": {"driver": "file", "filename": "foo.img"} }' The JSON argument doesn't exact

[Qemu-devel] [PULL v3 18/24] qapi: New parse_qapi_name()

2017-03-06 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Message-Id: <1488317230-26248-19-git-send-email-arm...@redhat.com> --- include/qapi/util.h| 2 ++ qapi/qapi-util.c | 47 +++ tests/test-qapi-util.c | 34 +++

[Qemu-devel] [PULL v3 22/24] qapi: Improve how keyval input visitor reports unexpected dicts

2017-03-06 Thread Markus Armbruster
Incorrect option -blockdev node-name=foo,driver=file,filename=foo.img,aio.unmap=on is rejected with "Invalid parameter type for 'aio', expected: string". To make sense of this, you almost have to translate it into the equivalent QMP command { "execute": "blockdev-add", "arguments": { "no

[Qemu-devel] [PULL v3 01/24] test-qemu-opts: Cover qemu_opts_parse() of "no"

2017-03-06 Thread Markus Armbruster
qemu_opts_parse() interprets "no" as negated empty key. Consistent with its acceptance of empty keys elsewhere, whatever that's worth. Signed-off-by: Markus Armbruster Reviewed-by: Kevin Wolf Message-Id: <1488317230-26248-2-git-send-email-arm...@redhat.com> --- tests/test-qemu-opts.c | 5 +

[Qemu-devel] [PULL v3 09/24] libqtest: Fix qmp() & friends to abort on JSON parse errors

2017-03-06 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Kevin Wolf Message-Id: <1488317230-26248-10-git-send-email-arm...@redhat.com> --- tests/libqtest.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/libqtest.c b/tests/libqtest.c index 9033c5f..a5c3d2b 100644 --- a/tests/lib

[Qemu-devel] [PULL v3 00/24] block: Command line option -blockdev

2017-03-06 Thread Markus Armbruster
Actually, the command line option is the least part of this series. Its bulk is about building infrastructure and getting errors out of the JSON parser. The design of the command line interface was discussed here: Subject: Non-flat command line option argument syntax Message-ID: <87bmukmlau@du

[Qemu-devel] [PULL v3 10/24] qjson: Abort earlier on qobject_from_jsonf() misuse

2017-03-06 Thread Markus Armbruster
Ignoring errors first, then asserting success is suboptimal. Pass &error_abort instead, so we abort earlier, and hopefully get more useful clues on what's wrong. Signed-off-by: Markus Armbruster Reviewed-by: Kevin Wolf Message-Id: <1488317230-26248-11-git-send-email-arm...@redhat.com> --- qobj

[Qemu-devel] [PULL v3 11/24] test-qobject-input-visitor: Abort earlier on bad test input

2017-03-06 Thread Markus Armbruster
visitor_input_test_init_internal() parses test input with qobject_from_jsonv(), and asserts it succeeds. Pass &error_abort for good measure. Signed-off-by: Markus Armbruster Reviewed-by: Kevin Wolf Message-Id: <1488317230-26248-12-git-send-email-arm...@redhat.com> --- tests/test-qobject-input-

Re: [Qemu-devel] [PATCH RFC 0/1] vmstate: fix the failed iotests case 68 and 91

2017-03-06 Thread QingFeng Hao
在 2017/3/7 14:37, Fam Zheng 写道: On Tue, 03/07 03:53, QingFeng Hao wrote: Hi All, I am not sure if the fix is correct because I am not very clear about the logic in vmstate.c. From my test, once size=0, the iotests case 68 failed due to the assert. So just send this draft patch for your comment

Re: [Qemu-devel] -rtc clock=vm with -icount 1, sleep=off introduces unexpected delays in device interactions

2017-03-06 Thread Pavel Dovgalyuk
I also encountered icount problems with new MTTCG patches. Record/replay now cannot work, because iothread requests timers without kicking the CPU. And cpu thread updates icount (that are used for the clock). Therefore invocation of iothread uses incorrect clock and all virtual timers behave inco

Re: [Qemu-devel] [PATCH] Fix the vm state after vm migration when vm panic

2017-03-06 Thread hangaohuai
debugging the migration step with the same steps. with libvirt version:1.3.4 qemu version:2.8.50 I found qemu held the right state. But libvirt will send cont at the end of the migration, it will rewrite the vm's state. after migration HOSTA | HOSTB virs

Re: [Qemu-devel] [PATCH] target/alpha: Take BQL around clock manipulations

2017-03-06 Thread Alex Bennée
Richard Henderson writes: > On 03/07/2017 08:00 AM, Paolo Bonzini wrote: >>> Signed-off-by: Richard Henderson >>> --- >>> This is similar to the patch that I saw go by for MIPS. >>> >>> I hadn't noticed any problems caused by this lack of locking. This may >>> be because interrupts cannot be d

Re: [Qemu-devel] [PATCH RFC 0/1] vmstate: fix the failed iotests case 68 and 91

2017-03-06 Thread Fam Zheng
On Tue, 03/07 03:53, QingFeng Hao wrote: > Hi All, > I am not sure if the fix is correct because I am not very clear about the > logic in vmstate.c. From my test, once size=0, the iotests case 68 failed > due to the assert. So just send this draft patch for your comments! > The patch is based on co

Re: [Qemu-devel] [RFC PATCH] configure: remove --enable-replication/--disable-replication

2017-03-06 Thread Zhang Chen
On 03/06/2017 08:54 PM, Paolo Bonzini wrote: On 06/03/2017 11:03, Zhang Chen wrote: On 03/06/2017 05:08 PM, Dr. David Alan Gilbert wrote: * Bruce Rogers (brog...@suse.com) wrote: On 2/6/2017 at 4:57 AM, wrote: * Paolo Bonzini (pbonz...@redhat.com) wrote: On 03/02/2017 07:00, Stefan Hajn

Re: [Qemu-devel] [PATCH 2/2] vl: Print CPU help after we've registered the CPU accelerators

2017-03-06 Thread David Gibson
On Mon, Mar 06, 2017 at 08:47:52AM -0300, Eduardo Habkost wrote: > On Mon, Mar 06, 2017 at 10:06:27AM +1100, David Gibson wrote: > > On Fri, Mar 03, 2017 at 11:58:07AM -0300, Eduardo Habkost wrote: > > > On Tue, Jan 31, 2017 at 02:11:59PM +0100, Thomas Huth wrote: > > > > When running with KVM on P

[Qemu-devel] [PATCH RFC 0/1] vmstate: fix the failed iotests case 68 and 91

2017-03-06 Thread QingFeng Hao
Hi All, I am not sure if the fix is correct because I am not very clear about the logic in vmstate.c. From my test, once size=0, the iotests case 68 failed due to the assert. So just send this draft patch for your comments! The patch is based on commit 17783ac828a "Merge remote-tracking branch 'rem

[Qemu-devel] [PATCH RFC 1/1] vmstate: draft fix for failed iotests case 68 and 91

2017-03-06 Thread QingFeng Hao
I am not very clear about the logic in vmstate.c, but from its context in vmstate_save_state, it seems size should not be 0, otherwise the followed for loop will keep working on the same element. So I just add a simple check to pass that case, not sure if it's right but it can pass iotest case 68 a

[Qemu-devel] [PATCH] file-posix: Incoporate max_segments in block limit

2017-03-06 Thread Fam Zheng
Linux exposes a separate limit, /sys/block/.../queue/max_segments, which in the worst case can be more restrictive than BLKSECTGET (as they are two different things). Similar to the BLKSECTGET story, guests don't see this limit and send big requests will get -EINVAL error on SG_IO. Lean on the saf

[Qemu-devel] [PATCH 7/8] xen/9pfs: send responses back to the frontend

2017-03-06 Thread Stefano Stabellini
Once a request is completed, xen_9pfs_push_and_notify gets called. In xen_9pfs_push_and_notify, update the indexes (data has already been copied to the sg by the common code) and send a notification to the frontend. Schedule the bottom-half to check if we already have any other requests pending.

[Qemu-devel] [PATCH 6/8] xen/9pfs: implement in/out_iov_from_pdu and vmarshal/vunmarshal

2017-03-06 Thread Stefano Stabellini
Implement xen_9pfs_init_in/out_iov_from_pdu and xen_9pfs_pdu_vmarshal/vunmarshall by creating new sg pointing to the data on the ring. This is safe as we only handle one request per ring at any given time. Signed-off-by: Stefano Stabellini CC: anthony.per...@citrix.com CC: jgr...@suse.com CC: An

[Qemu-devel] [PATCH 5/8] xen/9pfs: receive requests from the frontend

2017-03-06 Thread Stefano Stabellini
Upon receiving an event channel notification from the frontend, schedule the bottom half. From the bottom half, read one request from the ring, create a pdu and call pdu_submit to handle it. For now, only handle one request per ring at a time. Signed-off-by: Stefano Stabellini CC: anthony.per...

[Qemu-devel] [PATCH 4/8] xen/9pfs: connect to the frontend

2017-03-06 Thread Stefano Stabellini
Write the limits of the backend to xenstore. Connect to the frontend. Upon connection, allocate the rings according to the protocol specification. Initialize a QEMUBH to schedule work upon receiving an event channel notification from the frontend. Signed-off-by: Stefano Stabellini CC: anthony.pe

[Qemu-devel] [PATCH 2/8] xen: introduce the header file for the Xen 9pfs transport protocol

2017-03-06 Thread Stefano Stabellini
It uses the new ring.h macros to declare rings and interfaces. Signed-off-by: Stefano Stabellini CC: anthony.per...@citrix.com CC: jgr...@suse.com --- hw/9pfs/xen_9pfs.h | 20 1 file changed, 20 insertions(+) create mode 100644 hw/9pfs/xen_9pfs.h diff --git a/hw/9pfs/xen_9

[Qemu-devel] [PATCH 1/8] xen: import ring.h from xen

2017-03-06 Thread Stefano Stabellini
Do not use the ring.h header installed on the system. Instead, import the header into the QEMU codebase. This avoids problems when QEMU is built against a Xen version too old to provide all the ring macros. Signed-off-by: Stefano Stabellini CC: anthony.per...@citrix.com CC: jgr...@suse.com --- NB

[Qemu-devel] [PATCH 3/8] xen/9pfs: introduce Xen 9pfs backend

2017-03-06 Thread Stefano Stabellini
Introduce the Xen 9pfs backend: add struct XenDevOps to register as a Xen backend and add struct V9fsTransport to register as v9fs transport. All functions are empty stubs for now. Signed-off-by: Stefano Stabellini CC: anthony.per...@citrix.com CC: jgr...@suse.com CC: Aneesh Kumar K.V CC: Greg

[Qemu-devel] [PATCH 8/8] xen/9pfs: build and register Xen 9pfs backend

2017-03-06 Thread Stefano Stabellini
Signed-off-by: Stefano Stabellini CC: anthony.per...@citrix.com CC: jgr...@suse.com CC: Aneesh Kumar K.V CC: Greg Kurz --- hw/9pfs/Makefile.objs| 1 + hw/xen/xen_backend.c | 1 + include/hw/xen/xen_backend.h | 1 + 3 files changed, 3 insertions(+) diff --git a/hw/9pfs/Makefile.

[Qemu-devel] [PATCH 0/8] xen/9pfs: introduce the Xen 9pfs backend

2017-03-06 Thread Stefano Stabellini
Hi all, This patch series implements a new transport for 9pfs, aimed at Xen systems. The transport is based on a traditional Xen frontend and backend drivers pair. This patch series implements the backend, which typically runs in Dom0. I sent another series to implement the frontend in Linux (htt

Re: [Qemu-devel] [RFC] x86: Allow to set NUMA distance for different NUMA nodes

2017-03-06 Thread He Chen
On Fri, Mar 03, 2017 at 02:10:50PM -0300, Eduardo Habkost wrote: > On Fri, Mar 03, 2017 at 04:52:18PM +, Daniel P. Berrange wrote: > > On Fri, Mar 03, 2017 at 01:47:51PM -0300, Eduardo Habkost wrote: > > > On Fri, Mar 03, 2017 at 04:26:12PM +, Daniel P. Berrange wrote: > > > > On Fri, Mar 0

Re: [Qemu-devel] [PATCH v2 08/11] target/xtensa: hold BQL for interrupt processing

2017-03-06 Thread Max Filippov
On Thu, Mar 2, 2017 at 11:53 AM, Alex Bennée wrote: > Make sure we have the BQL held when processing interrupts. > > Reported-by: Thomas Huth > Signed-off-by: Alex Bennée > --- > target/xtensa/helper.c| 1 + > target/xtensa/op_helper.c | 7 +++ > 2 files changed, 8 insertions(+) Acked-

Re: [Qemu-devel] [PATCH for-2.9] nbd/client: fix drop_sync [CVE-2017-2630]

2017-03-06 Thread Philippe Mathieu-Daudé
Hi Vladimir, On 03/06/2017 07:30 PM, Eric Blake wrote: From: Vladimir Sementsov-Ogievskiy Comparison symbol is misused. It may lead to memory corruption. Introduced in commit 7d3123e. Signed-off-by: Vladimir Sementsov-Ogievskiy Message-Id: <20170203154757.36140-6-vsement...@virtuozzo.com> [e

Re: [Qemu-devel] [PATCH 06/10] block: Factor out should_update_child()

2017-03-06 Thread Philippe Mathieu-Daudé
On Mon, Mar 6, 2017 at 5:35 PM, Eric Blake wrote: > On 03/06/2017 10:21 AM, Kevin Wolf wrote: >> Signed-off-by: Kevin Wolf >> --- >> block.c | 42 +++--- >> 1 file changed, 27 insertions(+), 15 deletions(-) >> > > Reviewed-by: Eric Blake Reviewed-by: Philipp

[Qemu-devel] [Bug 1670509] Re: sgabios outputs incorrect video modes

2017-03-06 Thread Herbie Robinson
** Changed in: qemu Assignee: (unassigned) => Herbie Robinson (hrob) -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1670509 Title: sgabios outputs incorrect video modes Status in QEMU: New

Re: [Qemu-devel] [PATCH v5 1/7] qcow2: Assert that cluster operations are aligned

2017-03-06 Thread Eric Blake
On 02/15/2017 06:25 AM, Kevin Wolf wrote: > Am 14.02.2017 um 20:25 hat Eric Blake geschrieben: >> qcow2_discard_clusters() is set up to silently ignore sub-cluster >> head or tail on unaligned requests. However, it is easy to audit >> the various callers: qcow2_snapshot_create() has always passed

[Qemu-devel] [Bug 1670509] [NEW] sgabios outputs incorrect video modes

2017-03-06 Thread Herbie Robinson
Public bug reported: When run with a bootstrap loader that uses int 0x10 with 0x1301 in %ax, incorrect video modes are output to the serial port. I believe the VGA image will be correct. This might also affect the returned values for some interrupts. This is caused because the set_cursor_positi

Re: [Qemu-devel] [PATCH 0/4] some migration bugs

2017-03-06 Thread Denis V. Lunev
On 02/25/2017 10:31 PM, Vladimir Sementsov-Ogievskiy wrote: > Hi all! > > Here are some migration related bugs, two about INACTIVE bdses and one > use-after-free. > > I'm absolutely not sure, that these bugs should be fixed like I'm fixing, > but problem definitely exists. > > Reset in stopped stat

[Qemu-devel] [PULL 0/2] xtensa updates

2017-03-06 Thread Max Filippov
repository at: git://github.com/OSLL/qemu-xtensa.git tags/20170306-xtensa for you to fetch changes up to cb3825b9afdb1800cef1be9c9a732c803d8bb29e: target/xtensa: add two missing headers to core import script (2017-02-23 10:5

[Qemu-devel] [PATCH for-2.9] nbd/client: fix drop_sync [CVE-2017-2630]

2017-03-06 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy Comparison symbol is misused. It may lead to memory corruption. Introduced in commit 7d3123e. Signed-off-by: Vladimir Sementsov-Ogievskiy Message-Id: <20170203154757.36140-6-vsement...@virtuozzo.com> [eblake: add CVE details] Signed-off-by: Eric Blake Reviewe

Re: [Qemu-devel] [PATCH 1/1] virtio-blk: fix race on guest notifiers

2017-03-06 Thread Halil Pasic
On 03/06/2017 03:55 PM, Paolo Bonzini wrote: > > On 03/03/2017 20:43, Halil Pasic wrote: >> Uh, this is complicated. I'm not out of questions, but I fear taking to >> much of your precious time. I will ask again nevertheless, but please >> just cut the conversation with -EBUSY if it gets to expe

Re: [Qemu-devel] [PATCH 1/3] hw/arm/exynos: Convert fprintf to error_report()

2017-03-06 Thread Peter Maydell
On 6 March 2017 at 17:07, Krzysztof Kozlowski wrote: > On Mon, Mar 06, 2017 at 10:55:12AM -0600, Eric Blake wrote: >> I don't see a 0/3 cover letter. When sending multiple patches, it's >> always best to package them in-reply-to the cover letter ('git config >> format.coverLetter auto' makes it ea

Re: [Qemu-devel] [PATCH 10/10] block: Fix error handling in bdrv_replace_in_backing_chain()

2017-03-06 Thread Eric Blake
On 03/06/2017 10:22 AM, Kevin Wolf wrote: > When adding an Error parameter, bdrv_replace_in_backing_chain() would > become nothing more than a wrapper around change_parent_backing_link(). > So make the latter public, renamed as bdrv_replace_node(), and remove > bdrv_replace_in_backing_chain(). > >

Re: [Qemu-devel] [PATCH 09/10] block: Handle permission errors in change_parent_backing_link()

2017-03-06 Thread Eric Blake
On 03/06/2017 10:22 AM, Kevin Wolf wrote: > Instead of just trying to change parents by parent over to reference @to > instead of @from, and abort()ing whenever the permissions don't allow > this, do proper permission checking beforehand and pass any error to the > callers. > > Signed-off-by: Kevi

Re: [Qemu-devel] [PULL 0/6] 9pfs fixes for 2.9 2017-03-06

2017-03-06 Thread Mark Cave-Ayland
On 06/03/17 17:54, Greg Kurz wrote: > The following changes since commit 56b51708e9e22809d2a78f38d0ac84bb3f3fca92: > > Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-2.9-20170306' > into staging (2017-03-06 13:06:30 +) > > are available in the git

Re: [Qemu-devel] [PATCH for-2.10 0/3] block: Add errp to b{lk, drv}_turncate()

2017-03-06 Thread Max Reitz
On 06.03.2017 20:58, no-re...@patchew.org wrote: > Hi, > > This series seems to have some coding style problems. See output below for > more information: > > Message-id: 20170306195255.15806-1-mre...@redhat.com > Subject: [Qemu-devel] [PATCH for-2.10 0/3] block: Add errp to b{lk, > drv}_turncate

Re: [Qemu-devel] [PATCH] target/alpha: Take BQL around clock manipulations

2017-03-06 Thread Richard Henderson
On 03/07/2017 08:00 AM, Paolo Bonzini wrote: Signed-off-by: Richard Henderson --- This is similar to the patch that I saw go by for MIPS. I hadn't noticed any problems caused by this lack of locking. This may be because interrupts cannot be delivered while in PALmode while these registers are

Re: [Qemu-devel] [PATCH for-2.10 2/3] block: Add errp to BD.bdrv_truncate()

2017-03-06 Thread Max Reitz
On 06.03.2017 20:54, Max Reitz wrote: > Add an Error parameter to the block drivers' bdrv_truncate() interface. > If a block driver does not set this in case of an error, the generic > bdrv_truncate() implementation will do so. > > Where it is obvious, this patch also makes some block drivers set

Re: [Qemu-devel] [PATCH 08/10] block: Ignore multiple children in bdrv_check_update_perm()

2017-03-06 Thread Eric Blake
On 03/06/2017 10:22 AM, Kevin Wolf wrote: > change_parent_backing_link() will need to update multiple BdrvChild > objects at once. Checking permissions reference by reference doesn't > work because permissions need to be consistent only with all parents > moved to the new child. > > Signed-off-by:

Re: [Qemu-devel] [PULL v2 07/24] nbd: convert to use qio_channel_yield

2017-03-06 Thread Max Reitz
On 21.02.2017 12:56, Stefan Hajnoczi wrote: > From: Paolo Bonzini > > In the client, read the reply headers from a coroutine, switching the > read side between the "read header" coroutine and the I/O coroutine that > reads the body of the reply. > > In the server, if the server can read more req

Re: [Qemu-devel] [PATCH] target/alpha: Take BQL around clock manipulations

2017-03-06 Thread Paolo Bonzini
> Signed-off-by: Richard Henderson > --- > This is similar to the patch that I saw go by for MIPS. > > I hadn't noticed any problems caused by this lack of locking. This may > be because interrupts cannot be delivered while in PALmode while these > registers are being manipulated. However, it's

Re: [Qemu-devel] Qemu deadlocks in tb_lock when using SVM+SoftMMU

2017-03-06 Thread Paolo Bonzini
- Original Message - > From: "Alexander Boettcher" > To: "Alex Bennée" > Cc: qemu-devel@nongnu.org, r...@twiddle.net, "fred konrad" > , pbonz...@redhat.com, > "crosthwaite peter" > Sent: Monday, March 6, 2017 9:11:04 PM > Subject: Re: Qemu deadlocks in tb_lock when using SVM+SoftMMU >

[Qemu-devel] [PATCH] target/alpha: Take BQL around clock manipulations

2017-03-06 Thread Richard Henderson
Signed-off-by: Richard Henderson --- This is similar to the patch that I saw go by for MIPS. I hadn't noticed any problems caused by this lack of locking. This may be because interrupts cannot be delivered while in PALmode while these registers are being manipulated. However, it's always better

[Qemu-devel] [PATCH v3] tests/docker: support proxy / corporate firewall

2017-03-06 Thread Philippe Mathieu-Daudé
if ftp_proxy/http_proxy/https_proxy standard environment variables available, pass them to the docker daemon to build images. this is required when building behind corporate proxy/firewall, but also help when using local cache server (ie: apt/yum). Signed-off-by: Philippe Mathieu-Daudé --- v3: c

Re: [Qemu-devel] [PATCH for-2.10 3/3] block: Add some bdrv_truncate() error messages

2017-03-06 Thread Eric Blake
On 03/06/2017 02:48 PM, Max Reitz wrote: > On 06.03.2017 21:21, Eric Blake wrote: >> On 03/06/2017 02:14 PM, Max Reitz wrote: >> > if (S_ISREG(st.st_mode)) { > if (ftruncate(s->fd, offset) < 0) { > +/* The generic error message will be fine */ >

Re: [Qemu-devel] [PATCH for-2.10 3/3] block: Add some bdrv_truncate() error messages

2017-03-06 Thread Max Reitz
On 06.03.2017 21:21, Eric Blake wrote: > On 03/06/2017 02:14 PM, Max Reitz wrote: > if (S_ISREG(st.st_mode)) { if (ftruncate(s->fd, offset) < 0) { +/* The generic error message will be fine */ return -errno; >>> >>> Relying on a generic er

Re: [Qemu-devel] [PATCH 07/10] block: Factor out bdrv_replace_child_noperm()

2017-03-06 Thread Eric Blake
On 03/06/2017 10:21 AM, Kevin Wolf wrote: > Signed-off-by: Kevin Wolf > --- > block.c | 38 +- > 1 file changed, 25 insertions(+), 13 deletions(-) > Reviewed-by: Eric Blake -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library

Re: [Qemu-devel] [PATCH 06/10] block: Factor out should_update_child()

2017-03-06 Thread Eric Blake
On 03/06/2017 10:21 AM, Kevin Wolf wrote: > Signed-off-by: Kevin Wolf > --- > block.c | 42 +++--- > 1 file changed, 27 insertions(+), 15 deletions(-) > Reviewed-by: Eric Blake -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization lib

Re: [Qemu-devel] [PATCH 05/10] block: Fix blockdev-snapshot error handling

2017-03-06 Thread Eric Blake
On 03/06/2017 10:21 AM, Kevin Wolf wrote: > For blockdev-snapshot, external_snapshot_prepare() accepts an arbitrary > node reference at first and only checks later whether it already has a > backing file. Between those places, other errors can occur. > > Therefore checking in external_snapshot_abo

[Qemu-devel] [PATCH v2] tests/docker: support proxy / corporate firewall

2017-03-06 Thread Philippe Mathieu-Daudé
if ftp_proxy/http_proxy/https_proxy standard environment variables available, pass them to the docker daemon to build images. this is required when building behind corporate proxy/firewall, but also help when using local cache server (ie: apt/yum). Signed-off-by: Philippe Mathieu-Daudé --- v2: u

Re: [Qemu-devel] [PATCH for-2.10 3/3] block: Add some bdrv_truncate() error messages

2017-03-06 Thread Eric Blake
On 03/06/2017 02:14 PM, Max Reitz wrote: >>> if (S_ISREG(st.st_mode)) { >>> if (ftruncate(s->fd, offset) < 0) { >>> +/* The generic error message will be fine */ >>> return -errno; >> >> Relying on a generic error message in the caller is awkward. I see it as

Re: [Qemu-devel] [PATCH 04/10] mirror: Fix error path for dirty bitmap creation

2017-03-06 Thread Eric Blake
On 03/06/2017 10:21 AM, Kevin Wolf wrote: > mirror_top_bs must be removed from the graph again when creating the > dirty bitmap fails. > > Signed-off-by: Kevin Wolf > --- > block/mirror.c | 5 + > 1 file changed, 1 insertion(+), 4 deletions(-) Reviewed-by: Eric Blake > > diff --git a/blo

Re: [Qemu-devel] [PATCH for-2.10 3/3] block: Add some bdrv_truncate() error messages

2017-03-06 Thread Max Reitz
On 06.03.2017 21:09, Eric Blake wrote: > On 03/06/2017 01:54 PM, Max Reitz wrote: >> Add missing error messages for the drivers I am comfortable to do this >> in. >> >> Signed-off-by: Max Reitz >> --- >> block/file-posix.c | 8 +++- >> block/qcow2.c | 2 ++ >> block/qed.c| 4 +++-

Re: [Qemu-devel] [PATCH 03/10] mirror: Fix permissions for removing mirror_top_bs

2017-03-06 Thread Eric Blake
On 03/06/2017 10:21 AM, Kevin Wolf wrote: > mirror_top_bs takes write permissions on its backing file, which can > make it impossible to attach that backing file node to another parent. > However, this is exactly what needs to be done in order to remove > mirror_top_bs from the backing chain. So gi

Re: [Qemu-devel] Qemu deadlocks in tb_lock when using SVM+SoftMMU

2017-03-06 Thread Alexander Boettcher
Hello, thank you for your effort. With your patch I get now a 0x3f exception shown by the hypervisor, which I have never encountered so far before. The guest kernel seems not to start, at least no life sign is shown. For me the patch of Paolo Bonzini works reliable. How to proceed ? Thanks, A

Re: [Qemu-devel] [PATCH for-2.10 3/3] block: Add some bdrv_truncate() error messages

2017-03-06 Thread Eric Blake
On 03/06/2017 01:54 PM, Max Reitz wrote: > Add missing error messages for the drivers I am comfortable to do this > in. > > Signed-off-by: Max Reitz > --- > block/file-posix.c | 8 +++- > block/qcow2.c | 2 ++ > block/qed.c| 4 +++- > block/raw-format.c | 2 ++ > 4 files changed

Re: [Qemu-devel] Qemu deadlocks in tb_lock when using SVM+SoftMMU

2017-03-06 Thread Alexander Boettcher
Hello, I applied the patch and beside two uint64 -> uint64_t in do_vmexit() it compiles and solves the issue for me reliable. Great ! On 06.03.2017 17:58, Paolo Bonzini wrote: > > > On 06/03/2017 02:34, Richard Henderson wrote: >> On 03/06/2017 08:32 AM, Alex Bennée wrote: #5 0x0

Re: [Qemu-devel] [PATCH 02/10] mirror: Fix permission problem with 'replaces'

2017-03-06 Thread Eric Blake
On 03/06/2017 10:21 AM, Kevin Wolf wrote: > The 'replaces' option of drive-mirror can be used to mirror a Quorum > node to a new image and then let the target image replace one of the > Quorum children. In order for this graph modification to succeed, the > mirror job needs to lift its restrictions

Re: [Qemu-devel] [PATCH for-2.10 0/3] block: Add errp to b{lk, drv}_turncate()

2017-03-06 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 20170306195255.15806-1-mre...@redhat.com Subject: [Qemu-devel] [PATCH for-2.10 0/3] block: Add errp to b{lk, drv}_turncate() Type: series === TEST SCRIPT BEGIN === #!/bin/bash BASE=base

[Qemu-devel] [PATCH for-2.10 3/3] block: Add some bdrv_truncate() error messages

2017-03-06 Thread Max Reitz
Add missing error messages for the drivers I am comfortable to do this in. Signed-off-by: Max Reitz --- block/file-posix.c | 8 +++- block/qcow2.c | 2 ++ block/qed.c| 4 +++- block/raw-format.c | 2 ++ 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/block/file-p

[Qemu-devel] [PATCH for-2.10 1/3] block: Add errp to b{lk, drv}_truncate()

2017-03-06 Thread Max Reitz
For one thing, this allows us to drop the error message generation from qemu-img.c and blockdev.c and instead have it unified in bdrv_truncate(). Signed-off-by: Max Reitz --- include/block/block.h | 2 +- include/sysemu/block-backend.h | 2 +- block.c| 16 +

[Qemu-devel] [PATCH for-2.10 2/3] block: Add errp to BD.bdrv_truncate()

2017-03-06 Thread Max Reitz
Add an Error parameter to the block drivers' bdrv_truncate() interface. If a block driver does not set this in case of an error, the generic bdrv_truncate() implementation will do so. Where it is obvious, this patch also makes some block drivers set this value. Signed-off-by: Max Reitz --- incl

[Qemu-devel] [PATCH for-2.10 0/3] block: Add errp to b{lk, drv}_turncate()

2017-03-06 Thread Max Reitz
Having an Error parameter for these functions makes sense because we sometimes want a bit more information than just "Something failed". Some drivers already use error_report() and the like to emit this additional information, so it's rather obvious that we do want a real error object here. Max Re

Re: [Qemu-devel] [PATCH v2 02/15] sheepdog: Fix error handling in sd_snapshot_delete()

2017-03-06 Thread Eric Blake
On 03/06/2017 01:00 PM, Markus Armbruster wrote: > As a bdrv_snapshot_delete() method, sd_snapshot_delete() must set an > error and return negative errno on failure. It sometimes returns -1, > and sometimes neglects to set an error. It also prints error messages > with error_report(). Fix all th

Re: [Qemu-devel] [PATCH] target/i386: move nested exception check to x86_cpu_exec_interrupt

2017-03-06 Thread Richard Henderson
On 03/07/2017 02:57 AM, Alex Bennée wrote: cs->exception_index = intno; env->error_code = error_code; env->exception_is_int = is_int; env->exception_next_eip = env->eip + next_eip_addend; +env->exception_retaddr = retaddr; cpu_loop_exit_restore(cs, retaddr); Since y

Re: [Qemu-devel] [PATCH v2 01/15] sheepdog: Defuse time bomb in sd_open() error handling

2017-03-06 Thread Eric Blake
On 03/06/2017 01:00 PM, Markus Armbruster wrote: > When qemu_opts_absorb_qdict() fails, sd_open() closes stdin, because > sd->fd is still zero. Fortunately, qemu_opts_absorb_qdict() can't > fail, because: > > 1. it only fails when qemu_opt_parse() fails, and > 2. the only member of runtime_opts.d

Re: [Qemu-devel] Qemu deadlocks in tb_lock when using SVM+SoftMMU

2017-03-06 Thread Richard Henderson
On 03/07/2017 03:58 AM, Paolo Bonzini wrote: On 06/03/2017 02:34, Richard Henderson wrote: My guess is that everything from cpu_svm_check_intercept_param on should be done from do_interrupt instead of during raise_interrupt. From cpu_svm_check_intercept_param, or from cpu_vmexit? The former

Re: [Qemu-devel] [PATCH v2 5/5] xen: use libxendevicemodel when available

2017-03-06 Thread Stefano Stabellini
On Mon, 6 Mar 2017, Paul Durrant wrote: > > -Original Message- > > From: Qemu-devel [mailto:qemu-devel- > > bounces+paul.durrant=citrix@nongnu.org] On Behalf Of Paul Durrant > > Sent: 06 March 2017 09:15 > > To: 'Stefano Stabellini' > > Cc: Anthony Perard ; xen- > > de...@lists.xenproj

[Qemu-devel] [PATCH v2 11/15] gluster: Don't duplicate qapi-util.c's qapi_enum_parse()

2017-03-06 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Niels de Vos --- block/gluster.c | 30 +- 1 file changed, 9 insertions(+), 21 deletions(-) diff --git a/block/gluster.c b/block/gluster.c index 7236d59..6fbcf9e 100644 --- a/block/gluster.c +++ b/block/gluster.c @@ -12,6

  1   2   3   >