Re: [Qemu-devel] [PATCH 3/5] PXB: convert to realize()

2015-12-21 Thread Marcel Apfelbaum
On 12/22/2015 05:58 AM, Cao jin wrote: On 12/21/2015 11:49 PM, Paolo Bonzini wrote: On 20/12/2015 12:38, Cao jin wrote: +object_unref(OBJECT(ds)); +object_unref(OBJECT(bds)); +object_unref(OBJECT(bus)); I think these should be object_unparent, not unref. But, it seems thes

Re: [Qemu-devel] [PATCH v14 Resend 10/13] pci: add pci device pre-post reset callbacks for host bus reset

2015-12-21 Thread Chen Fan
On 12/22/2015 05:07 AM, Alex Williamson wrote: On Fri, 2015-12-18 at 11:29 +0800, Chen Fan wrote: On 12/18/2015 04:31 AM, Alex Williamson wrote: On Thu, 2015-12-17 at 09:41 +0800, Cao jin wrote: From: Chen Fan Particularly, For vfio devices, Once need to recovery devices by bus reset such a

Re: [Qemu-devel] [PATCH 0/3] correct some register return values for vxmnet3

2015-12-21 Thread Dmitry Fleytman
> On 22 Dec 2015, at 04:44 AM, Miao Yan wrote: > > Hi Dmitry, > > 2015-12-22 1:19 GMT+08:00 Dmitry Fleytman : >> Hello Miao, >> >> While patches look good technically, I cannot find any code snippets that >> prove correctness of these changes. > > Linux driver does not read those registers c

Re: [Qemu-devel] [PATCH COLO-Frame v12 10/38] COLO: Implement colo checkpoint protocol

2015-12-21 Thread Hailiang Zhang
Hi Markus, On 2015/12/19 16:54, Markus Armbruster wrote: Jumping in at v12 for a bit of QAPI review (and whatever else catched my eye nearby), please pardon my ignorance of COLO in general, and previous review of this series in particular. Thanks all the same :) zhanghailiang writes: We

[Qemu-devel] [PATCH 1/1] block: fix inability to start VM with native AIO

2015-12-21 Thread Denis V. Lunev
error: Failed to start domain rhel7 error: internal error: process exited while connecting to monitor: 2015-12-22T06:55:18.812637Z qemu-system-x86_64: -drive file=/var/lib/libvirt/images/rhel7.qcow2,if=none, id=drive-scsi0-0-0-0,format=qcow2,cache=none,aio=native: aio=native was

Re: [Qemu-devel] [PATCH v3] qmp: return err msg when powerdown a vm when it isn't in running state

2015-12-21 Thread P J P
+-- On Tue, 22 Dec 2015, Qinghua Jin wrote --+ | -void qmp_system_powerdown(Error **erp) | +void qmp_system_powerdown(Error **errp) | { | +if (!runstate_check(RUN_STATE_RUNNING)) { | +error_setg(errp, | + "Can not powerdown virtual machine as it is not running"); | +

Re: [Qemu-devel] Question about nonblocking stderr and lost logs

2015-12-21 Thread Stefan Hajnoczi
On Wed, Dec 16, 2015 at 11:53:16AM +1100, Sam Bobroff wrote: > On Mon, Dec 14, 2015 at 03:29:49PM +0800, Stefan Hajnoczi wrote: > > On Mon, Dec 14, 2015 at 04:19:50PM +1100, Sam Bobroff wrote: > > > On Thu, Dec 10, 2015 at 04:37:22PM +0800, Stefan Hajnoczi wrote: > > > > On Mon, Dec 07, 2015 at 02:

Re: [Qemu-devel] 回复: 回复: someconfusion on qemu i/o pocess and the qcow2format

2015-12-21 Thread Stefan Hajnoczi
On Mon, Dec 21, 2015 at 10:48:07AM +0800, 浩樊啊 wrote: > I want to change the queue_size of virtio-blk ring from 128 to 1024, so I > change here: > s->vq = virtio_add_queue(vdev, 128, virtio_blk_handle_output); > but the vm will not work. Are any thing i missed ? I think 1024 should work in theory

[Qemu-devel] [PATCH v2 0/4] correct some register return values for vxmnet3

2015-12-21 Thread Miao Yan
Qemu vmxnet3 emulation doesn't recognize VMXNET3_CMD_GET_DID_LO, VMXNET3_CMD_GET_DID_HI and VMXNET3_CMD_GET_DEV_EXTRA_INFO command and returns -1 on all of them. This patchset makes them return correct values. Changes in v2: - return 0 on unknown command Miao Yan (4): net/vmxnet3: return 1 o

[Qemu-devel] [PATCH v2 4/4] net/vmxnet3: return 0 on unknown command

2015-12-21 Thread Miao Yan
Return 0 on unknown command, this is what esxi behaves. Signed-off-by: Miao Yan --- hw/net/vmxnet3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c index b8bc360..a429405 100644 --- a/hw/net/vmxnet3.c +++ b/hw/net/vmxnet3.c @@ -1706,7 +170

[Qemu-devel] [PATCH v2 3/4] net/vmxnet3: return correct value for VMXNET3_CMD_GET_DEV_EXTRA_INFO

2015-12-21 Thread Miao Yan
VMXNET3_CMD_GET_DEV_EXTRA_INFO should return 0 for emulation mode This behavior can be observed by the following steps: 1) run a Linux distro on esxi server 2) modify vmxnet3 Linux driver to read the register: VMXNET3_WRITE_BAR1_REG(adapter, VMXNET3_REG_CMD, VMXNET3_CMD_GET_DEV_EXTRA_INFO);

[Qemu-devel] [PATCH v2 1/4] net/vmxnet3: return 1 on device activation failure

2015-12-21 Thread Miao Yan
When reading device status, 0 means device is successfully activated and 1 means error. This behavior can be observed by the following steps: 1) run a Linux distro on esxi server 2) modify vmxnet3 Linux driver to give it an invalid address to 'adapter->shared_pa' which is the shared memory

[Qemu-devel] [PATCH v2 2/4] net/vmxnet3: return correct value for VMXNET3_CMD_GET_DID_* command

2015-12-21 Thread Miao Yan
VMXNET3_CMD_GET_DID_LO should return PCI ID of the device and VMXNET3_CMD_GET_DID_HI should return vmxnet3 revision ID. This behavior can be observed by the following steps: 1) run a Linux distro on esxi server 2) modify vmxnet3 Linux driver to read DID_HI and DID_LO: VMXNET3_WRITE_BAR1_REG(ad

Re: [Qemu-devel] [PATCH v5 RFC] spec: add qcow2 bitmaps extension specification

2015-12-21 Thread Vladimir Sementsov-Ogievskiy
On 22.12.2015 02:56, Max Reitz wrote: On 21.12.2015 16:25, Vladimir Sementsov-Ogievskiy wrote: The new feature for qcow2: storing bitmaps. Only bitmaps, relative to the virtual disk, stored in qcow2 file, should be stored in this qcow2 file. Strings started from +# are RFC-strings, not to be c

Re: [Qemu-devel] [PATCH 3/5] PXB: convert to realize()

2015-12-21 Thread Cao jin
On 12/21/2015 11:49 PM, Paolo Bonzini wrote: On 20/12/2015 12:38, Cao jin wrote: +object_unref(OBJECT(ds)); +object_unref(OBJECT(bds)); +object_unref(OBJECT(bus)); I think these should be object_unparent, not unref. But, it seems these 3 objects isn`t added as a child-prope

Re: [Qemu-devel] [PATCH] SeaBios: Fix reset procedure reentrancy problem on qemu-kvm platform

2015-12-21 Thread Xulei (Stone)
Hi, Kevin, Can you tell how to reset/reboot this VM, if it goes to the handle_hwpic1() on its booting procedure? I mean, usually, SeaBIOS would not go to handle_hwpic routine. But in my test case, SeaBIOS calls handle_hwpic when KVM injects a #UD expcetion (not irq) and SeaBIOS will loop to handl

[Qemu-devel] [PATCH v3] qmp: return err msg when powerdown a vm when it isn't in running state

2015-12-21 Thread Qinghua Jin
When send system_powerdown to QMP when the vm isn't in RUN_STATE_RUNNING, it will be ignored by system. So reply a err msg with the situation. Signed-off-by: Qinghua Jin --- This is an update of the patch as per Fam Zheng's suggestion: http://lists.gnu.org/archive/html/qemu-devel/2015-12/msg03

Re: [Qemu-devel] [PATCH 1/3] net/vmxnet3: return 1 on device activation failure

2015-12-21 Thread Miao Yan
2015-12-22 2:15 GMT+08:00 P J P : > +-- On Mon, 21 Dec 2015, Miao Yan wrote --+ > | So return 1 on device activation failure instead of -1; > | > | Signed-off-by: Miao Yan > | --- > | hw/net/vmxnet3.c | 2 +- > | 1 file changed, 1 insertion(+), 1 deletion(-) > | > | diff --git a/hw/net/vmxnet3.c

[Qemu-devel] [PATCH v2 11/11] iotests: 095: Filter _img_info output

2015-12-21 Thread Fam Zheng
Signed-off-by: Fam Zheng --- tests/qemu-iotests/095 | 4 ++-- tests/qemu-iotests/095.out | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/qemu-iotests/095 b/tests/qemu-iotests/095 index 57a730e..dad04b9 100755 --- a/tests/qemu-iotests/095 +++ b/tests/qemu-iotests/0

[Qemu-devel] [PATCH v2 09/11] iotests: 050: Use TEST_IMG override instead of "mv"

2015-12-21 Thread Fam Zheng
Signed-off-by: Fam Zheng Reviewed-by: Max Reitz --- tests/qemu-iotests/050 | 9 +++-- tests/qemu-iotests/050.out | 4 ++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/tests/qemu-iotests/050 b/tests/qemu-iotests/050 index 07802bc..13006dd 100755 --- a/tests/qemu-iotests

[Qemu-devel] [PATCH v2 07/11] iotests: 037: Use TEST_IMG override instead of "mv"

2015-12-21 Thread Fam Zheng
Signed-off-by: Fam Zheng Reviewed-by: Max Reitz --- tests/qemu-iotests/037 | 5 - tests/qemu-iotests/037.out | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/037 b/tests/qemu-iotests/037 index 9171d8c..5862451 100755 --- a/tests/qemu-iotests/037 +

[Qemu-devel] [PATCH v2 08/11] iotests: 038: Use TEST_IMG override instead of "mv"

2015-12-21 Thread Fam Zheng
Signed-off-by: Fam Zheng Reviewed-by: Max Reitz --- tests/qemu-iotests/038 | 5 - tests/qemu-iotests/038.out | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/038 b/tests/qemu-iotests/038 index cfaf00a..34fe698 100755 --- a/tests/qemu-iotests/038 +

[Qemu-devel] [PATCH v2 06/11] iotests: 034: Use TEST_IMG override instead of "mv"

2015-12-21 Thread Fam Zheng
Signed-off-by: Fam Zheng Reviewed-by: Max Reitz --- tests/qemu-iotests/034 | 6 +- tests/qemu-iotests/034.out | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/034 b/tests/qemu-iotests/034 index 69c7858..c769dd8 100755 --- a/tests/qemu-iotests/034

[Qemu-devel] [PATCH v2 04/11] iotests: 024: Use TEST_IMG override instead of "mv"

2015-12-21 Thread Fam Zheng
Signed-off-by: Fam Zheng Reviewed-by: Max Reitz --- tests/qemu-iotests/024 | 10 -- tests/qemu-iotests/024.out | 4 ++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/tests/qemu-iotests/024 b/tests/qemu-iotests/024 index 9bf99e1..2c2d148 100755 --- a/tests/qemu-iot

[Qemu-devel] [PATCH v2 03/11] iotests: 020: Use TEST_IMG override instead of "mv"

2015-12-21 Thread Fam Zheng
Signed-off-by: Fam Zheng Reviewed-by: Max Reitz --- tests/qemu-iotests/020 | 7 +-- tests/qemu-iotests/020.out | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/qemu-iotests/020 b/tests/qemu-iotests/020 index 2f258dc..6625b55 100755 --- a/tests/qemu-iotests/020

[Qemu-devel] [PATCH v2 01/11] iotests: 018: Use TEST_IMG override instead of "mv"

2015-12-21 Thread Fam Zheng
Signed-off-by: Fam Zheng Reviewed-by: Max Reitz --- tests/qemu-iotests/018 | 8 tests/qemu-iotests/018.out | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/qemu-iotests/018 b/tests/qemu-iotests/018 index d8a7d43..07b2de9 100755 --- a/tests/qemu-iotests/01

[Qemu-devel] [PATCH v2 00/11] iotests: Clean up "mv $TEST_IMG $TEST_IMG.XXX"

2015-12-21 Thread Fam Zheng
v2: Add Max's rev-by in patches 1-9. Fix quote bugs in patch 10 and split out _img_info filtering patch 11. Commit 794d00f71d fixed two "mv" commands into the TEST_IMG override approach. There are still more occasions of "mv", this series fixes them. The benefit is it drops the assumption tha

[Qemu-devel] [PATCH v2 10/11] iotests: 095: Use TEST_IMG override instead of "mv"

2015-12-21 Thread Fam Zheng
Signed-off-by: Fam Zheng --- tests/qemu-iotests/095 | 6 ++ tests/qemu-iotests/095.out | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/tests/qemu-iotests/095 b/tests/qemu-iotests/095 index 6630181..57a730e 100755 --- a/tests/qemu-iotests/095 +++ b/tests/qemu-iotes

[Qemu-devel] [PATCH v2 02/11] iotests: 019: Use TEST_IMG override instead of "mv"

2015-12-21 Thread Fam Zheng
Signed-off-by: Fam Zheng Reviewed-by: Max Reitz --- tests/qemu-iotests/019 | 13 +++-- tests/qemu-iotests/019.out | 4 ++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/tests/qemu-iotests/019 b/tests/qemu-iotests/019 index f5ecbf5..0937b5c 100755 --- a/tests/qemu-i

[Qemu-devel] [PATCH v2 05/11] iotests: 028: Use TEST_IMG override instead of "mv"

2015-12-21 Thread Fam Zheng
Signed-off-by: Fam Zheng Reviewed-by: Max Reitz --- tests/qemu-iotests/028 | 5 - tests/qemu-iotests/028.out | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/028 b/tests/qemu-iotests/028 index a1f4423..009510d 100755 --- a/tests/qemu-iotests/028 +

Re: [Qemu-devel] [PATCH 0/3] correct some register return values for vxmnet3

2015-12-21 Thread Miao Yan
Hi Dmitry, 2015-12-22 1:19 GMT+08:00 Dmitry Fleytman : > Hello Miao, > > While patches look good technically, I cannot find any code snippets that > prove correctness of these changes. Linux driver does not read those registers currently, not sure about Windows version. > How do you know this

[Qemu-devel] [PATCH v2] xen-pvdevice: convert to realize()

2015-12-21 Thread Cao jin
Signed-off-by: Cao jin --- hw/i386/xen/xen_pvdevice.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/i386/xen/xen_pvdevice.c b/hw/i386/xen/xen_pvdevice.c index c218947..9abcf25 100644 --- a/hw/i386/xen/xen_pvdevice.c +++ b/hw/i386/xen/xen_pvdevice.c @@ -69,14

Re: [Qemu-devel] [PATCH v2] qmp: return err msg when powerdown a vm when it isn't in running state

2015-12-21 Thread Qinghua Jin
Thanks for helping me, i'll use the patch format suggested by you. At 2015-12-22 10:06:17, "Fam Zheng" wrote: >On Tue, 12/22 09:42, Qinghua Jin wrote: >> This is an update of patch previously show in msg: >> >> http://lists.gnu.org/archive/html/qemu-devel/2015-12/msg03817.html > >The patch lo

Re: [Qemu-devel] [PATCH 5/5] xen-pvdevice: convert to realize()

2015-12-21 Thread Cao jin
Hi On 12/22/2015 09:24 AM, Cao jin wrote: On 12/21/2015 11:15 PM, Stefano Stabellini wrote: On Fri, 18 Dec 2015, Cao jin wrote: [...] This doesn't even compile: you are missing a ';' Please at least build test patches. Yup...sorry for the silly mistake...but weird, I did build and didn

Re: [Qemu-devel] [PATCH 10/10] iotests: 095: Use TEST_IMG override instead of "mv"

2015-12-21 Thread Fam Zheng
On Fri, 12/18 19:18, Max Reitz wrote: > On 16.12.2015 10:54, Fam Zheng wrote: > > Signed-off-by: Fam Zheng > > --- > > tests/qemu-iotests/095 | 12 ++-- > > tests/qemu-iotests/095.out | 8 > > 2 files changed, 10 insertions(+), 10 deletions(-) > > > > diff --git a/tests/qem

Re: [Qemu-devel] [PATCH] SeaBios: Fix reset procedure reentrancy problem on qemu-kvm platform

2015-12-21 Thread Gonglei (Arei)
> -Original Message- > From: Kevin O'Connor [mailto:ke...@koconnor.net] > Sent: Tuesday, December 22, 2015 2:47 AM > To: Gonglei (Arei) > Cc: Xulei (Stone); Paolo Bonzini; qemu-devel; seab...@seabios.org; > Huangweidong (C); k...@vger.kernel.org; Radim Krcmar > Subject: Re: [Qemu-devel] [PA

Re: [Qemu-devel] [PATCH v2] qmp: return err msg when powerdown a vm when it isn't in running state

2015-12-21 Thread Fam Zheng
On Tue, 12/22 09:42, Qinghua Jin wrote: > This is an update of patch previously show in msg: > > http://lists.gnu.org/archive/html/qemu-devel/2015-12/msg03817.html The patch looks good to me, thanks for submitting the patch! There is only one minor comment: Patch revision note should go after

Re: [Qemu-devel] [PATCH v2] linux-user/mmap.c: Always zero MAP_ANONYMOUS memory inmmap_frag()

2015-12-21 Thread Chen Gang
> From: "Laurent Vivier";; > > Le 21/12/2015 03:33, cheng...@emindsoft.com.cn a écrit : >> From: Chen Gang >> >> When mapping MAP_ANONYMOUS memory fragments, still need notice about to >> set it zero, or it will cause issues. > > Perhaps you can explain in the commit message why this page is n

Re: [Qemu-devel] [PATCH v3 2/4] target-tilegx: Add single floating point implementation

2015-12-21 Thread Richard Henderson
On 12/21/2015 10:54 AM, Chen Gang wrote: The both do, in that you re-normalize to produce that HBIT. That's the whole point. Oh, yes. But all together, we want to normalize the float value in fsingle_pack2, so we can not use float64_to_float32()... Of course not. I told you that you couldn

[Qemu-devel] [PATCH v2] qmp: return err msg when powerdown a vm when it isn't in running state

2015-12-21 Thread Qinghua Jin
This is an update of patch previously show in msg: http://lists.gnu.org/archive/html/qemu-devel/2015-12/msg03817.html When send system_powerdown to QMP when the vm isn't in RUN_STATE_RUNNING, it will be ignored by system. So reply a err msg with the situation. Signed-off-by: Qinghua Jin ---

Re: [Qemu-devel] [PATCH 5/5] xen-pvdevice: convert to realize()

2015-12-21 Thread Cao jin
On 12/21/2015 11:15 PM, Stefano Stabellini wrote: On Fri, 18 Dec 2015, Cao jin wrote: Signed-off-by: Cao jin --- hw/i386/xen/xen_pvdevice.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/i386/xen/xen_pvdevice.c b/hw/i386/xen/xen_pvdevice.c index c218947

Re: [Qemu-devel] [PATCH v3 18/24] vmdk: Clean up "Invalid extent lines" error message

2015-12-21 Thread Fam Zheng
On Fri, 12/18 16:35, Markus Armbruster wrote: > vmdk_parse_extents() reports parse errors like this: > > error_setg(errp, "Invalid extent lines:\n%s", p); > > where p points to the beginning of the malformed line in the image > descriptor. This results in a multi-line error message > >

[Qemu-devel] [PATCH v2 14/14] qemu-img: Use new JSON output formatter

2015-12-21 Thread Eric Blake
Now that we can pretty-print straight to JSON from a visitor, we can eliminate the temporary conversion into QObject inside qemu-img. The changes to qemu-iotests 043 expected output demonstrates the fact that output is now done in qapi declaration order, rather than QDict hash order. Signed-off-b

[Qemu-devel] [PATCH v2 09/14] Revert "qjson: Simplify by using json-output-visitor"

2015-12-21 Thread Eric Blake
This reverts commit 5859ad241516eed8cb9ba60889efa0ed47648b38. The revert is here only to show the difference between two alternatives, the final series will have just one choice of patch 8, or of patches 10-11 --- qjson.c | 61 +++-- 1 file

[Qemu-devel] [PATCH v2 01/14] qapi: Rename (one) qjson.h to qobject-json.h

2015-12-21 Thread Eric Blake
We have two different JSON visitors in the tree; and having both named 'qjson.h' can cause include confusion. Rename the qapi version. Why did I pick that one? A later patch plans on deleting the top-level qjson.c once we have a native JSON output visitor; we could have renamed that one for less

[Qemu-devel] [PATCH v2 08/14] qjson: Simplify by using json-output-visitor

2015-12-21 Thread Eric Blake
Instead of rolling our own limited JSON outputter, we can just wrap the more full-featured JSON output Visitor. This slightly changes the output (different spacing), but the result is still equivalent JSON contents. Signed-off-by: Eric Blake --- v2: rebase to earlier changes This is alternativ

[Qemu-devel] [PATCH v2 11/14] qjson: Remove unused file

2015-12-21 Thread Eric Blake
Now that we have a JSON output visitor, and the previous patch fixed the only client of vmstate to use it, we no longer need the simpler QJSON object doing the same thing. Signed-off-by: Eric Blake --- v2: new patch This is part of alternative 2, along with patch 10. See also patch 8 for alter

[Qemu-devel] [PATCH v2 06/14] qapi: Add qstring_append_format()

2015-12-21 Thread Eric Blake
Back in commit 764c1ca (Nov 2009), we added qstring_append_int(). However, it did not see any use until commit 190c882 (Jan 2015). Furthermore, it has a rather limited use case - to print anything else, callers still have to format into a temporary buffer, unless we want to introduce an explosion o

[Qemu-devel] [PATCH v2 04/14] qapi: Factor out JSON number formatting

2015-12-21 Thread Eric Blake
Pull out a new qstring_append_json_number() helper, so that all JSON output producers can use a consistent style for printing floating point without duplicating code (since we are doing more data massaging than a simple printf format can handle). Address one FIXME by adding an Error parameter and

[Qemu-devel] [PATCH v2 13/14] qapi: Support pretty printing in JSON output visitor

2015-12-21 Thread Eric Blake
Similar to pretty printing in the QObject visitor. The rickiest parts are the fact that during type_any(), we have to coordinate with QObject to also print pretty; and the fact that the testsuite now has to honor parameterization on whether pretty printing is enabled. Signed-off-by: Eric Blake

[Qemu-devel] [PATCH v2 07/14] qapi: add json output visitor

2015-12-21 Thread Eric Blake
We have several places that want to go from qapi to JSON; right now, they have to create an intermediate QObject to do the work. That also has the drawback that the JSON formatting of a QDict will rearrange keys (according to a deterministic, but unpredictable, hash), when humans have an easier ti

[Qemu-devel] [PATCH v2 02/14] qapi: Improve use of qmp/types.h

2015-12-21 Thread Eric Blake
'qobject-json.h' is not a QObject subtype; include this file directly in .c files that are using it, rather than abusing qmp/types.h for that purpose. Meanwhile, for files that include a list of individual QObject subtypes, it's easier to just use qmp/types.h for that purpose. Signed-off-by: Eric

[Qemu-devel] [PATCH v2 03/14] qapi: Factor out JSON string escaping

2015-12-21 Thread Eric Blake
Pull out a new qstring_append_json_string() helper, so that all JSON output producers can use the same output escaping rules. While it appears that vmstate's use of the simpler qjson.c formatter is not currently encountering any string that needs escapes to be valid JSON, it is better to be safe t

[Qemu-devel] [PATCH v2 10/14] vmstate: use new JSON output visitor

2015-12-21 Thread Eric Blake
Rather than using a QJSON object and converting the QString result to a char *, we can use the new JSON output visitor and get directly to a char *. The conversions are a bit tricky in place (in places, we have to copy an integer to an int64_t temporary to get the right pointer for visit_type_int(

[Qemu-devel] [PATCH v2 05/14] qapi: Use qstring_append_chr() where appropriate

2015-12-21 Thread Eric Blake
No need to create a temporary buffer, when we already have a function available for our needs. Signed-off-by: Eric Blake --- qobject/json-parser.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/qobject/json-parser.c b/qobject/json-parser.c index 441c6e9..fc5510e 100644

[Qemu-devel] [PATCH v2 12/14] qapi: Add qobject_to_json_pretty_prefix()

2015-12-21 Thread Eric Blake
The next patch will add pretty indentation to the JSON visitor. But in order to support pretty output in the type_any() callback, we need to prefix every line of the QObject visitor by the current indentation in the JSON visitor. Hence, a new function qobject_to_json_pretty_indent(), and the old f

[Qemu-devel] [PATCH v2 00/14] Add qapi-to-JSON output visitor

2015-12-21 Thread Eric Blake
Prerequisites: + my qapi cleanups subset E v8: https://lists.gnu.org/archive/html/qemu-devel/2015-12/msg03863.html I wrote this series for several reasons: 1. I've been doing a lot of churn in the qapi visitor interfaces lately; adding a new visitor is good proof whether the changes still make sen

Re: [Qemu-devel] [PATCH 1/8] bcm2835_sbm: add BCM2835 mailboxes

2015-12-21 Thread Andrew Baumann
> From: Peter Crosthwaite [mailto:crosthwaitepe...@gmail.com] > Sent: Monday, 21 December 2015 15:33 > On Mon, Dec 21, 2015 at 3:15 PM, Andrew Baumann > wrote: > >> From: Peter Crosthwaite [mailto:crosthwaitepe...@gmail.com] > >> Sent: Monday, 21 December 2015 14:49 > >> On Thu, Dec 3, 2015 at 10:

Re: [Qemu-devel] [PATCH v5 RFC] spec: add qcow2 bitmaps extension specification

2015-12-21 Thread Max Reitz
On 21.12.2015 16:25, Vladimir Sementsov-Ogievskiy wrote: > The new feature for qcow2: storing bitmaps. > > Only bitmaps, relative to the virtual disk, stored in qcow2 file, should > be stored in this qcow2 file. > > Strings started from +# are RFC-strings, not to be commited of course > > Signed

Re: [Qemu-devel] [PATCH 1/8] bcm2835_sbm: add BCM2835 mailboxes

2015-12-21 Thread Peter Crosthwaite
On Mon, Dec 21, 2015 at 3:15 PM, Andrew Baumann wrote: > Hi Peter, > > Thanks for the review! > >> From: Peter Crosthwaite [mailto:crosthwaitepe...@gmail.com] >> Sent: Monday, 21 December 2015 14:49 >> On Thu, Dec 3, 2015 at 10:01 PM, Andrew Baumann >> wrote: >> > This adds the system mailboxes w

Re: [Qemu-devel] [PATCH] qmp: return err msg when powerdown a vm when it isn't in running state

2015-12-21 Thread Qinghua Jin
Thanks for your help, i'll resubmit the patch right away. At 2015-12-22 01:55:35, "P J P" wrote: >+-- On Mon, 21 Dec 2015, Qinghua Jin wrote --+ >| -void qmp_system_powerdown(Error **erp) >| +void qmp_system_powerdown(Error **errp) >| { >| +if (!runstate_is_running()) { >| +error_se

Re: [Qemu-devel] [PATCH 1/8] bcm2835_sbm: add BCM2835 mailboxes

2015-12-21 Thread Andrew Baumann
Hi Peter, Thanks for the review! > From: Peter Crosthwaite [mailto:crosthwaitepe...@gmail.com] > Sent: Monday, 21 December 2015 14:49 > On Thu, Dec 3, 2015 at 10:01 PM, Andrew Baumann > wrote: > > This adds the system mailboxes which are used to communicate with a > > number of GPU peripherals o

Re: [Qemu-devel] [PATCH v2 2/3] hw/sd: model a power-up delay, as a workaround for an EDK2 bug

2015-12-21 Thread Peter Crosthwaite
On Mon, Dec 21, 2015 at 2:25 PM, Andrew Baumann wrote: >> From: qemu-devel-bounces+andrew.baumann=microsoft@nongnu.org >> [mailto:qemu-devel- >> bounces+andrew.baumann=microsoft@nongnu.org] On Behalf Of >> Peter Crosthwaite >> Sent: Monday, 21 December 2015 13:46 >> On Wed, Dec 16, 2015 at

Re: [Qemu-devel] [PATCH 1/8] bcm2835_sbm: add BCM2835 mailboxes

2015-12-21 Thread Peter Crosthwaite
On Thu, Dec 3, 2015 at 10:01 PM, Andrew Baumann wrote: > This adds the system mailboxes which are used to communicate with a > number of GPU peripherals on Pi/Pi2. > > Signed-off-by: Andrew Baumann > --- > default-configs/arm-softmmu.mak | 1 + > hw/misc/Makefile.objs| 1

[Qemu-devel] [PATCH v3 2/3] sdhci: don't raise a command index error for an unexpected response

2015-12-21 Thread Andrew Baumann
This deletes a block of code that raised a command index error if a command returned response data, but the guest did not set the appropriate bits in the response register to handle such a response. I cannot find any documentation that suggests the controller should behave in this way, the error co

[Qemu-devel] [PATCH v3 3/3] sdhci: add optional quirk property to disable card insertion/removal interrupts

2015-12-21 Thread Andrew Baumann
This is needed for a quirk of the Raspberry Pi (bcm2835/6) MMC controller, where the card insert bit is documented as unimplemented (always reads zero, doesn't generate interrupts) but is in fact observed on hardware as set at power on, but is cleared (and remains clear) on subsequent controller re

[Qemu-devel] [PATCH v3 0/3] sdhci patches to enable Raspberry Pi

2015-12-21 Thread Andrew Baumann
This is a series of three tweaks needed to enable the generic sdhci controller to emulate Raspberry Pi (bcm2835/2836), and boot Linux and Windows. There was some discussion of these changes in the following thread: https://lists.gnu.org/archive/html/qemu-devel/2015-12/msg01401.html v2 is function

[Qemu-devel] [PATCH v3 1/3] sd: sdhci: Delete over-zealous power check

2015-12-21 Thread Andrew Baumann
From: Peter Crosthwaite This check was conditionalising SD card operation on the card being powered by the SDHCI host controller. It is however possible (particularly in embedded systems) for the power control of the SD card to be managed outside of SDHCI. This can be as trivial as hard-wiring th

Re: [Qemu-devel] [PATCH v2 2/3] hw/sd: model a power-up delay, as a workaround for an EDK2 bug

2015-12-21 Thread Andrew Baumann
> From: qemu-devel-bounces+andrew.baumann=microsoft@nongnu.org > [mailto:qemu-devel- > bounces+andrew.baumann=microsoft@nongnu.org] On Behalf Of > Peter Crosthwaite > Sent: Monday, 21 December 2015 13:46 > On Wed, Dec 16, 2015 at 11:02 AM, Andrew Baumann > wrote: > > The SD spec for ACMD41

Re: [Qemu-devel] [PATCH v2 3/3] sdhci: add optional quirk property to disable card insertion/removal interrupts

2015-12-21 Thread Andrew Baumann
> From: Peter Crosthwaite [mailto:crosthwaitepe...@gmail.com] > Sent: Monday, 21 December 2015 13:42 > On Mon, Dec 21, 2015 at 1:31 PM, Andrew Baumann > wrote: > > This is needed for a quirk of the Raspberry Pi (bcm2835/6) MMC > > controller, where the card insert bit is documented as unimplemente

[Qemu-devel] [PATCH v2 0/3] sdhci patches to enable Raspberry Pi

2015-12-21 Thread Andrew Baumann
This is a series of three tweaks needed to enable the generic sdhci controller to emulate Raspberry Pi (bcm2835/2836), and boot Linux and Windows. There was some discussion of these changes in the following thread: https://lists.gnu.org/archive/html/qemu-devel/2015-12/msg01401.html v2 is function

Re: [Qemu-devel] [PATCH v2 2/3] hw/sd: model a power-up delay, as a workaround for an EDK2 bug

2015-12-21 Thread Peter Crosthwaite
On Wed, Dec 16, 2015 at 11:02 AM, Andrew Baumann wrote: > The SD spec for ACMD41 says that a zero argument is an "inquiry" > ACMD41, which does not start initialisation and is used only for > retrieving the OCR. However, Tianocore EDK2 (UEFI) has a bug [1]: it > first sends an inquiry (zero) ACMD4

Re: [Qemu-devel] [PATCH v2 2/3] hw/sd: model a power-up delay, as a workaround for an EDK2 bug

2015-12-21 Thread Peter Crosthwaite
On Mon, Dec 21, 2015 at 1:04 PM, Andrew Baumann wrote: >> From: Peter Crosthwaite [mailto:crosthwaitepe...@gmail.com] >> Sent: Sunday, 20 December 2015 14:58 >> On Wed, Dec 16, 2015 at 11:02 AM, Andrew Baumann >> wrote: >> > The SD spec for ACMD41 says that a zero argument is an "inquiry" >> > AC

Re: [Qemu-devel] [PATCH v2 3/3] sdhci: add optional quirk property to disable card insertion/removal interrupts

2015-12-21 Thread Peter Crosthwaite
On Mon, Dec 21, 2015 at 1:31 PM, Andrew Baumann wrote: > This is needed for a quirk of the Raspberry Pi (bcm2835/6) MMC > controller, where the card insert bit is documented as unimplemented > (always reads zero, doesn't generate interrupts) but is in fact > observed on hardware as set at power on

[Qemu-devel] [PATCH v2 2/3] sdhci: don't raise a command index error for an unexpected response

2015-12-21 Thread Andrew Baumann
This deletes a block of code that raised a command index error if a command returned response data, but the guest did not set the appropriate bits in the response register to handle such a response. I cannot find any documentation that suggests the controller should behave in this way, the error co

[Qemu-devel] [PATCH v2 1/3] sd: sdhci: Delete over-zealous power check

2015-12-21 Thread Andrew Baumann
From: Peter Crosthwaite This check was conditionalising SD card operation on the card being powered by the SDHCI host controller. It is however possible (particularly in embedded systems) for the power control of the SD card to be managed outside of SDHCI. This can be as trivial as hard-wiring th

[Qemu-devel] [PATCH v2 3/3] sdhci: add optional quirk property to disable card insertion/removal interrupts

2015-12-21 Thread Andrew Baumann
This is needed for a quirk of the Raspberry Pi (bcm2835/6) MMC controller, where the card insert bit is documented as unimplemented (always reads zero, doesn't generate interrupts) but is in fact observed on hardware as set at power on, but is cleared (and remains clear) on subsequent controller re

Re: [Qemu-devel] [Qemu-block] [PATCH COLO-Frame v12 25/38] qmp event: Add event notification for COLO error

2015-12-21 Thread John Snow
On 12/19/2015 05:02 AM, Markus Armbruster wrote: > Copying qemu-block because this seems related to generalising block jobs > to background jobs. > > zhanghailiang writes: > >> If some errors happen during VM's COLO FT stage, it's important to notify >> the users >> of this event. Together wi

Re: [Qemu-devel] [PATCH v14 Resend 10/13] pci: add pci device pre-post reset callbacks for host bus reset

2015-12-21 Thread Alex Williamson
On Fri, 2015-12-18 at 11:29 +0800, Chen Fan wrote: > On 12/18/2015 04:31 AM, Alex Williamson wrote: > > On Thu, 2015-12-17 at 09:41 +0800, Cao jin wrote: > > > From: Chen Fan > > > > > > Particularly, For vfio devices, Once need to recovery devices > > > by bus reset such as AER, we always need t

Re: [Qemu-devel] [PATCH v2 2/3] hw/sd: model a power-up delay, as a workaround for an EDK2 bug

2015-12-21 Thread Andrew Baumann
> From: Peter Crosthwaite [mailto:crosthwaitepe...@gmail.com] > Sent: Sunday, 20 December 2015 14:58 > On Wed, Dec 16, 2015 at 11:02 AM, Andrew Baumann > wrote: > > The SD spec for ACMD41 says that a zero argument is an "inquiry" > > ACMD41, which does not start initialisation and is used only for

Re: [Qemu-devel] [Qemu-block] Jobs 2.0 QAPI [RFC]

2015-12-21 Thread John Snow
On 12/21/2015 11:58 AM, Alberto Garcia wrote: > On Thu 17 Dec 2015 01:50:08 AM CET, John Snow wrote: >> In working through a prototype to enable multiple block jobs. A few >> problem spots in our API compatibility become apparent. >> >> In a nutshell, old Blockjobs rely on the "device" to identi

Re: [Qemu-devel] [PATCH] ivshmem: remove redundant assignment, fix crash with msi=off

2015-12-21 Thread P J P
+-- On Mon, 21 Dec 2015, marcandre.lur...@redhat.com wrote --+ | diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c | index 7d14222..dcfc8cc 100644 | --- a/hw/misc/ivshmem.c | +++ b/hw/misc/ivshmem.c | @@ -355,12 +355,9 @@ static CharDriverState* create_eventfd_chr_device(IVShmemState *s, |

Re: [Qemu-devel] [PATCH v3 2/4] target-tilegx: Add single floating point implementation

2015-12-21 Thread Chen Gang
On 12/21/15 23:01, Richard Henderson wrote: > On 12/20/2015 07:30 AM, Chen Gang wrote: >> And we have to still check TILEGX_F_CALC_CVT, for they are really two >> different format: TILEGX_F_CALC_CVT has no HBIT, but TILEGX_F_CALC_NCVT >> has HBIT (which we need process it specially). > > The both

[Qemu-devel] [Bug 893208] Re: qemu on ARM hosts can't boot i386 image

2015-12-21 Thread PeteVine
Still present in 2.5. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/893208 Title: qemu on ARM hosts can't boot i386 image Status in QEMU: New Status in Linaro QEMU: New Bug description: If

Re: [Qemu-devel] [PATCH] SeaBios: Fix reset procedure reentrancy problem on qemu-kvm platform

2015-12-21 Thread Kevin O'Connor
On Mon, Dec 21, 2015 at 09:41:32AM +, Gonglei (Arei) wrote: > When the gurb of OS is booting, then the softirq and C function send_disk_op() > may use extra stack of SeaBIOS. If we inject a NMI, romlayout.S: > irqentry_extrastack > is invoked, and the extra stack will be used again. And the st

Re: [Qemu-devel] [PATCH 1/3] net/vmxnet3: return 1 on device activation failure

2015-12-21 Thread P J P
+-- On Mon, 21 Dec 2015, Miao Yan wrote --+ | So return 1 on device activation failure instead of -1; | | Signed-off-by: Miao Yan | --- | hw/net/vmxnet3.c | 2 +- | 1 file changed, 1 insertion(+), 1 deletion(-) | | diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c | index e168285..9185408 100644

Re: [Qemu-devel] [PATCH] scsi: initialise info object with appropriate size

2015-12-21 Thread P J P
+-- On Mon, 21 Dec 2015, Paolo Bonzini wrote --+ | I can add the Cc to the commit message as well. For now it's enough to | send a message in Cc so that the qemu-stable people notice it. Okay, great! Thank you. -- Prasad J Pandit / Red Hat Product Security Team 47AF CE69 3A90 54AA 9045 1053 DD13

Re: [Qemu-devel] [PATCH] qmp: return err msg when powerdown a vm when it isn't in running state

2015-12-21 Thread P J P
+-- On Mon, 21 Dec 2015, Qinghua Jin wrote --+ | -void qmp_system_powerdown(Error **erp) | +void qmp_system_powerdown(Error **errp) | { | +if (!runstate_is_running()) { | +error_setg(errp, "Can't powerdown the Virtual Machine when it isn't running"); | +return; | +} |

Re: [Qemu-devel] [PATCH] gtk: use setlocale() for LC_MESSAGES only

2015-12-21 Thread Eric Blake
On 12/18/2015 12:55 PM, Markus Armbruster wrote: > Alberto Garcia writes: > > We do however have translations for a few simple strings for the GTK+ > menu items, so in order to run QEMU using the C locale, and yet have a > translated UI let's use setlocale() for LC_MESSAGES only.

Re: [Qemu-devel] Jobs 2.0 QAPI [RFC]

2015-12-21 Thread John Snow
On 12/21/2015 07:31 AM, Kevin Wolf wrote: > Am 17.12.2015 um 01:50 hat John Snow geschrieben: >> In working through a prototype to enable multiple block jobs. A few >> problem spots in our API compatibility become apparent. >> >> In a nutshell, old Blockjobs rely on the "device" to identify the j

Re: [Qemu-devel] [PATCH v2 26/74] pc: acpi: memhp: move MHPD._STA method into SSDT

2015-12-21 Thread Igor Mammedov
On Sun, 20 Dec 2015 15:41:22 +0200 "Michael S. Tsirkin" wrote: > On Wed, Dec 16, 2015 at 03:47:35PM +0100, Igor Mammedov wrote: [...] > > +method = aml_method("_STA", 0, AML_NOTSERIALIZED); > > +ifctx = aml_if(aml_equal(a_slots_nr, a_zero)); > > +{ > > + aml_ap

Re: [Qemu-devel] [PATCH 0/3] correct some register return values for vxmnet3

2015-12-21 Thread Dmitry Fleytman
Hello Miao, While patches look good technically, I cannot find any code snippets that prove correctness of these changes. How do you know this is the correct behaviour? Could you please extend commit messages with corresponding references? Thanks, Dmitry > On 21 Dec 2015, at 13:06 PM, Miao Yan

[Qemu-devel] [PATCH v8 34/35] qapi: Change visit_type_FOO() to no longer return partial objects

2015-12-21 Thread Eric Blake
Returning a partial object on error is an invitation for a careless caller to leak memory. As no one outside the testsuite was actually relying on these semantics, it is cleaner to just document and guarantee that ALL pointer-based visit_type_FOO() functions always leave a safe value in *obj durin

[Qemu-devel] [PATCH v8 14/35] qapi: Swap visit_* arguments for consistent 'name' placement

2015-12-21 Thread Eric Blake
JSON uses "name":value, but many of our visitor interfaces were called with visit_type_FOO(v, &value, name, errp). This can be a bit confusing to have to mentally swap the parameter order to match JSON order. It's particularly bad for visit_start_struct(), where the 'name' parameter is smack in t

[Qemu-devel] [PATCH v8 32/35] qapi: Split visit_end_struct() into pieces

2015-12-21 Thread Eric Blake
As mentioned in previous patches, we want to call visit_end_struct() functions unconditionally, so that visitors can release resources tied up since the matching visit_start_struct() without also having to worry about error priority if more than one error occurs. Even though error_propagate() can

[Qemu-devel] [PATCH v8 29/35] qapi: Canonicalize missing object to :empty

2015-12-21 Thread Eric Blake
Now that we elide unnecessary visits of empty types, we can start using the special ':empty' type in more places. By using the empty type as the base class of every explicit struct or union, and as the default data for any command or event, we can simplify later logic in qapi-{visit,commands,event

[Qemu-devel] [PATCH v8 33/35] qapi: Simplify semantics of visit_next_list()

2015-12-21 Thread Eric Blake
We have two uses of list visits in the entire code base: one in spapr_drc (which completely avoids visit_next_list(), feeding in integers from a different source than uint8List), and one in qapi-visit.py (that is, all other list visitors are generated in qapi-visit.c, and share the same paradigm ba

[Qemu-devel] [PATCH v8 31/35] qapi: Rework deallocation of partial struct

2015-12-21 Thread Eric Blake
Commit cee2dedb noticed that if you have a partial flat union (such as if an input parse failed due to a missing discriminator), calling the dealloc visitor could result in trying to dereference the NULL pointer. But the fix it proposed requires the use of a 'data' member in the union, which may or

[Qemu-devel] [PATCH v8 35/35] RFC: qapi: Adjust layout of FooList types

2015-12-21 Thread Eric Blake
By sticking the next pointer first, we don't need a union with 64-bit padding for smaller types. On 32-bit platforms, this can reduce the size of uint8List from 16 bytes (or 12, depending on whether 64-bit ints can tolerate 4-byte alignment) down to 8. It has no effect on 64-bit platforms (where a

[Qemu-devel] [PATCH v8 26/35] qapi: Add type.is_empty() helper

2015-12-21 Thread Eric Blake
And use it in qapi-types and qapi-event. Down the road, we may want to lift our artificial restriction of no variants at the top level of an event, at which point, inlining our check for whether members is empty will no longer be sufficient. More immediately, the new .is_empty() helper will help

  1   2   3   >