Re: [Qemu-devel] [PATCH v4 1/3] qmp: fix object-add assert() without props

2016-10-09 Thread Xiao Long Jiang
On 2016/9/29 下午11:23, Markus Armbruster wrote: Xiao Long Jiang writes: Hi, I have tested this patch on arch s390 system. It works fine. :-) May I credit your help by adding Tested-by: Xiao Long Jiang to the commit message? Just back from holiday. It would be great if you add that

Re: [Qemu-devel] [PATCH] colo-compare: fix find_and_check_chardev()

2016-10-09 Thread Hailiang Zhang
On 2016/10/10 11:49, Zhang Chen wrote: On 10/10/2016 11:13 AM, Hailiang Zhang wrote: Hi, On 2016/10/10 10:52, Zhang Chen wrote: On 09/30/2016 12:06 PM, zhanghailiang wrote: find_and_check_chardev() uses 'opts' member of CharDriverState to check if the chardev is 'socket' chardev or not, w

Re: [Qemu-devel] [Qemu-ppc] [QEMU PATCH v5 3/6] migration: extend VMStateInfo

2016-10-09 Thread David Gibson
On Fri, Oct 07, 2016 at 07:42:12PM +0100, Dr. David Alan Gilbert wrote: > * Jianjun Duan (du...@linux.vnet.ibm.com) wrote: > > > > > > On 10/07/2016 05:08 AM, Dr. David Alan Gilbert wrote: > > > * Jianjun Duan (du...@linux.vnet.ibm.com) wrote: > > >> Current migration code cannot handle some data

Re: [Qemu-devel] [PATCH v5 08/17] vfio: Pass an Error object to vfio_connect_container

2016-10-09 Thread David Gibson
On Fri, Oct 07, 2016 at 09:36:09AM +0200, Auger Eric wrote: > Hi, > > On 07/10/2016 09:01, Markus Armbruster wrote: > > Eric Auger writes: > > > >> The error is currently simply reported in vfio_get_group. Don't > >> bother too much with the prefix which will be handled at upper level, > >> late

Re: [Qemu-devel] [QEMU PATCH v5 2/6] migration: spapr_drc: defined VMStateDescription struct

2016-10-09 Thread David Gibson
On Fri, Oct 07, 2016 at 10:17:45AM -0700, Jianjun Duan wrote: > > > On 10/06/2016 08:12 PM, David Gibson wrote: > > On Mon, Oct 03, 2016 at 11:24:53AM -0700, Jianjun Duan wrote: > >> To manage hotplug/unplug of dynamic resources such as PCI cards, > >> memory, and CPU on sPAPR guests, a firmware

Re: [Qemu-devel] [QEMU PATCH v5 5/6] migration: spapr: migrate ccs_list in spapr state

2016-10-09 Thread David Gibson
On Fri, Oct 07, 2016 at 09:52:51AM -0500, Michael Roth wrote: > Quoting David Gibson (2016-10-06 22:36:07) > > On Mon, Oct 03, 2016 at 11:24:56AM -0700, Jianjun Duan wrote: > > > ccs_list in spapr state maintains the device tree related > > > information on the rtas side for hotplugged devices. In

Re: [Qemu-devel] [PATCH v2] qtest: ask endianness of the target in qtest_init()

2016-10-09 Thread David Gibson
On Fri, Oct 07, 2016 at 12:48:49PM +0200, Greg Kurz wrote: > On Fri, 7 Oct 2016 12:14:27 +0200 > Laurent Vivier wrote: > > > The target endianness is not deduced anymore from > > the architecture name but asked directly to the guest, > > using a new qtest command: "endianness". As it can't > > c

Re: [Qemu-devel] [QEMU PATCH v5 1/6] migration: alternative way to set instance_id in SaveStateEntry

2016-10-09 Thread David Gibson
On Fri, Oct 07, 2016 at 09:07:49AM +0100, Dr. David Alan Gilbert wrote: > * David Gibson (da...@gibson.dropbear.id.au) wrote: > > On Wed, Oct 05, 2016 at 09:44:57AM -0700, Jianjun Duan wrote: > > > Please see comments below: > > > > > > On 10/05/2016 03:12 AM, Dr. David Alan Gilbert wrote: > > > >

Re: [Qemu-devel] [PATCH v2] qtest: ask endianness of the target in qtest_init()

2016-10-09 Thread David Gibson
On Fri, Oct 07, 2016 at 12:14:27PM +0200, Laurent Vivier wrote: > The target endianness is not deduced anymore from > the architecture name but asked directly to the guest, > using a new qtest command: "endianness". As it can't > change (this is the value of TARGET_WORDS_BIGENDIAN), > we store it t

Re: [Qemu-devel] [PATCH 2/4] target-ppc: implement vnegw/d instructions

2016-10-09 Thread Nikunj A Dadhania
Richard Henderson writes: > On 10/07/2016 01:57 PM, Nikunj A Dadhania wrote: >> +r->element[i] = (~(b->element[i]) + 1) & mask; \ > > Any reason you're not writing this as a proper negate? No particular reason, I was just trying to mimic the pseudo code in the ISA. r->eleme

[Qemu-devel] block/nfs: Fine grained runtime options in nfs

2016-10-09 Thread Ashijeet Acharya
Hi all, I was working on trying to add blockdev-add compatibility for the nfs block driver but before that runtime options need to be separated into various options rather than just a simple "filename" option. I have added the following until now: a) host b) port (not sure about this one, do we j

Re: [Qemu-devel] [PATCH 1/4] target-ppc: implement vexts[bh]2w and vexts[bhw]2d

2016-10-09 Thread Nikunj A Dadhania
Richard Henderson writes: > On 10/07/2016 01:57 PM, Nikunj A Dadhania wrote: >> +VEXT_SIGNED(vextsb2w, s32, UINT8_MAX, char, int32_t) >> +VEXT_SIGNED(vextsb2d, s64, UINT8_MAX, char, int64_t) > > char has target-dependent sign. Use int8_t. Sure. will change. Regards Nikunj

Re: [Qemu-devel] [RFC 1/4] spapr_pci: Delegate placement of PCI host bridges to machine type

2016-10-09 Thread David Gibson
On Mon, Oct 10, 2016 at 12:04:29PM +1100, Alexey Kardashevskiy wrote: > On 07/10/16 20:17, David Gibson wrote: > > On Fri, Oct 07, 2016 at 04:34:59PM +1100, Alexey Kardashevskiy wrote: > >> On 07/10/16 16:10, David Gibson wrote: > >>> On Fri, Oct 07, 2016 at 02:57:43PM +1100, Alexey Kardashevskiy w

Re: [Qemu-devel] [PATCH 1/2] vhost: enable any layout feature

2016-10-09 Thread Michael S. Tsirkin
On Mon, Oct 10, 2016 at 04:16:19AM +, Wang, Zhihong wrote: > > > > -Original Message- > > From: Yuanhan Liu [mailto:yuanhan@linux.intel.com] > > Sent: Monday, October 10, 2016 11:59 AM > > To: Michael S. Tsirkin > > Cc: Maxime Coquelin ; Stephen Hemminger > > ; d...@dpdk.org; qem

Re: [Qemu-devel] [PATCH 1/2] vhost: enable any layout feature

2016-10-09 Thread Michael S. Tsirkin
On Mon, Oct 10, 2016 at 12:22:09PM +0800, Yuanhan Liu wrote: > On Mon, Oct 10, 2016 at 07:17:06AM +0300, Michael S. Tsirkin wrote: > > On Mon, Oct 10, 2016 at 12:05:31PM +0800, Yuanhan Liu wrote: > > > On Fri, Sep 30, 2016 at 10:16:43PM +0300, Michael S. Tsirkin wrote: > > > > > > And the same is d

Re: [Qemu-devel] [PATCH 1/2] vhost: enable any layout feature

2016-10-09 Thread Michael S. Tsirkin
On Mon, Oct 10, 2016 at 04:16:19AM +, Wang, Zhihong wrote: > > > > -Original Message- > > From: Yuanhan Liu [mailto:yuanhan@linux.intel.com] > > Sent: Monday, October 10, 2016 11:59 AM > > To: Michael S. Tsirkin > > Cc: Maxime Coquelin ; Stephen Hemminger > > ; d...@dpdk.org; qem

Re: [Qemu-devel] [PATCH 1/2] vhost: enable any layout feature

2016-10-09 Thread Yuanhan Liu
On Mon, Oct 10, 2016 at 07:17:06AM +0300, Michael S. Tsirkin wrote: > On Mon, Oct 10, 2016 at 12:05:31PM +0800, Yuanhan Liu wrote: > > On Fri, Sep 30, 2016 at 10:16:43PM +0300, Michael S. Tsirkin wrote: > > > > > And the same is done is done in DPDK: > > > > > > > > > > static inline int __attribu

Re: [Qemu-devel] [PATCH 1/2] vhost: enable any layout feature

2016-10-09 Thread Michael S. Tsirkin
On Mon, Oct 10, 2016 at 12:05:31PM +0800, Yuanhan Liu wrote: > On Fri, Sep 30, 2016 at 10:16:43PM +0300, Michael S. Tsirkin wrote: > > > > And the same is done is done in DPDK: > > > > > > > > static inline int __attribute__((always_inline)) > > > > copy_desc_to_mbuf(struct virtio_net *dev, struct

[Qemu-devel] [PATCH v12 0/2] virtio-crypto: virtio crypto device specification

2016-10-09 Thread Gonglei
This is the specification about a new virtio crypto device. You can get the source code from the below website: [PATCH v3 00/10] virtio-crypto: introduce framework and device emulation https://lists.gnu.org/archive/html/qemu-devel/2016-09/msg04132.html [PATCH v4 00/13] virtio-crypto: introduce

Re: [Qemu-devel] [PATCH 1/2] vhost: enable any layout feature

2016-10-09 Thread Yuanhan Liu
On Fri, Sep 30, 2016 at 10:16:43PM +0300, Michael S. Tsirkin wrote: > > > And the same is done is done in DPDK: > > > > > > static inline int __attribute__((always_inline)) > > > copy_desc_to_mbuf(struct virtio_net *dev, struct vring_desc *descs, > > > uint16_t max_desc, struct rte_mbuf

Re: [Qemu-devel] [PATCH 1/2] vhost: enable any layout feature

2016-10-09 Thread Yuanhan Liu
On Thu, Sep 29, 2016 at 10:05:22PM +0200, Maxime Coquelin wrote: > >so doing this unconditionally would be a spec violation, but if you see > >value in this, we can add a feature bit. > Right it would be a spec violation, so it should be done conditionally. > If a feature bit is to be added, what a

Re: [Qemu-devel] [PATCH 1/2] vhost: enable any layout feature

2016-10-09 Thread Michael S. Tsirkin
On Mon, Oct 10, 2016 at 11:37:44AM +0800, Yuanhan Liu wrote: > On Thu, Sep 29, 2016 at 11:21:48PM +0300, Michael S. Tsirkin wrote: > > On Thu, Sep 29, 2016 at 10:05:22PM +0200, Maxime Coquelin wrote: > > > > > > > > > On 09/29/2016 07:57 PM, Michael S. Tsirkin wrote: > > Yes but two points. > >

Re: [Qemu-devel] [PATCH] colo-compare: fix find_and_check_chardev()

2016-10-09 Thread Hailiang Zhang
Hi, On 2016/10/10 10:52, Zhang Chen wrote: On 09/30/2016 12:06 PM, zhanghailiang wrote: find_and_check_chardev() uses 'opts' member of CharDriverState to check if the chardev is 'socket' chardev or not, which the opts will be NULL if We add the chardev by qmp 'chardev-add' command. All the r

Re: [Qemu-devel] [PATCH 1/2] vhost: enable any layout feature

2016-10-09 Thread Yuanhan Liu
On Mon, Oct 10, 2016 at 06:46:44AM +0300, Michael S. Tsirkin wrote: > On Mon, Oct 10, 2016 at 11:37:44AM +0800, Yuanhan Liu wrote: > > On Thu, Sep 29, 2016 at 11:21:48PM +0300, Michael S. Tsirkin wrote: > > > On Thu, Sep 29, 2016 at 10:05:22PM +0200, Maxime Coquelin wrote: > > > > > > > > > > > >

[Qemu-devel] [PATCH v12 1/2] virtio-crypto: Add virtio crypto device specification

2016-10-09 Thread Gonglei
The virtio crypto device is a virtual crypto device (ie. hardware crypto accelerator card). Currently, the virtio crypto device provides the following crypto services: CIPHER, MAC, HASH, and AEAD. In this patch, CIPHER, MAC, HASH, AEAD services are introduced. VIRTIO-153 Signed-off-by: Gonglei

Re: [Qemu-devel] [PATCH 1/2] vhost: enable any layout feature

2016-10-09 Thread Yuanhan Liu
On Mon, Oct 10, 2016 at 06:04:32AM +0300, Michael S. Tsirkin wrote: > > > So I guess at this point, we can teach vhost-user in qemu > > > that version 1 implies any_layout but only for machine types > > > qemu 2.8 and up. It sets a bad precedent but oh well. > > > > It should work. > > > > --

[Qemu-devel] [Qemu-block][PATCH] qemu-img: fix failed qemu-img command return zero exit code defeat

2016-10-09 Thread Xu Tian
If backing file can not open when do image rebase, flag 'ret' not assign a non-zero value, then qemu-img process exit with code zero. Assign value '-1' to flag 'ret' after report error message to fix this defeat. BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1383012 Signed-off-by: Xu Tian ---

[Qemu-devel] [PULL 12/33] virtio-blk: make some functions static

2016-10-09 Thread Michael S. Tsirkin
From: Greg Kurz Some functions that were called from the dataplane code are now only used locally: virtio_blk_init_request() virtio_blk_handle_request() virtio_blk_submit_multireq() since commit "03de2f527499 virtio-blk: do not use vring in dataplane", and virtio_blk_free_request() since comm

Re: [Qemu-devel] [PATCH 1/2] vhost: enable any layout feature

2016-10-09 Thread Michael S. Tsirkin
On Mon, Oct 10, 2016 at 11:03:33AM +0800, Yuanhan Liu wrote: > On Mon, Oct 10, 2016 at 02:20:22AM +0300, Michael S. Tsirkin wrote: > > On Wed, Sep 28, 2016 at 10:28:48AM +0800, Yuanhan Liu wrote: > > > On Tue, Sep 27, 2016 at 10:56:40PM +0300, Michael S. Tsirkin wrote: > > > > On Tue, Sep 27, 2016

Re: [Qemu-devel] [PATCH] colo-compare: fix find_and_check_chardev()

2016-10-09 Thread Zhang Chen
On 10/10/2016 11:13 AM, Hailiang Zhang wrote: Hi, On 2016/10/10 10:52, Zhang Chen wrote: On 09/30/2016 12:06 PM, zhanghailiang wrote: find_and_check_chardev() uses 'opts' member of CharDriverState to check if the chardev is 'socket' chardev or not, which the opts will be NULL if We add the

[Qemu-devel] [PATCH v12 2/2] virtio-crypto: Add conformance clauses

2016-10-09 Thread Gonglei
Add the conformance targets and clauses for virtio-crypto device. Signed-off-by: Gonglei --- conformance.tex | 30 ++ 1 file changed, 30 insertions(+) diff --git a/conformance.tex b/conformance.tex index f59e360..3bde4b6 100644 --- a/conformance.tex +++ b/conformance

[Qemu-devel] [PULL 21/33] virtio: prepare change VMSTATE_VIRTIO_DEVICE macro

2016-10-09 Thread Michael S. Tsirkin
From: Halil Pasic In most cases the functions passed to VMSTATE_VIRTIO_DEVICE only call the virtio_load and virtio_save wrappers. Some include some pre- and post- massaging too. The massaging is better expressed as such in the VMStateDescription. Let us prepare for changing the semantic of the V

Re: [Qemu-devel] [PATCH 1/2] vhost: enable any layout feature

2016-10-09 Thread Yuanhan Liu
On Mon, Oct 10, 2016 at 02:20:22AM +0300, Michael S. Tsirkin wrote: > On Wed, Sep 28, 2016 at 10:28:48AM +0800, Yuanhan Liu wrote: > > On Tue, Sep 27, 2016 at 10:56:40PM +0300, Michael S. Tsirkin wrote: > > > On Tue, Sep 27, 2016 at 11:11:58AM +0800, Yuanhan Liu wrote: > > > > On Mon, Sep 26, 2016

[Qemu-devel] [PULL 29/33] virtio-balloon: convert VMSTATE_VIRTIO_DEVICE

2016-10-09 Thread Michael S. Tsirkin
From: Halil Pasic Use the new VMSTATE_VIRTIO_DEVICE macro. Signed-off-by: Halil Pasic Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/virtio/virtio-balloon.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/hw/virtio/virtio-ballo

Re: [Qemu-devel] [PATCH 1/2] vhost: enable any layout feature

2016-10-09 Thread Yuanhan Liu
On Thu, Sep 29, 2016 at 11:21:48PM +0300, Michael S. Tsirkin wrote: > On Thu, Sep 29, 2016 at 10:05:22PM +0200, Maxime Coquelin wrote: > > > > > > On 09/29/2016 07:57 PM, Michael S. Tsirkin wrote: > Yes but two points. > > 1. why is this memset expensive? I don't have the exact answer, but just

[Qemu-devel] [PULL 32/33] virtio: cleanup VMSTATE_VIRTIO_DEVICE

2016-10-09 Thread Michael S. Tsirkin
From: Halil Pasic Now all the usages of the old version of VMSTATE_VIRTIO_DEVICE are gone, so we can get rid of the conditionals, and the old macro. Signed-off-by: Halil Pasic Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/virtio/virtio.h | 27 -

[Qemu-devel] [PULL 24/33] virtio-9p: convert VMSTATE_VIRTIO_DEVICE

2016-10-09 Thread Michael S. Tsirkin
From: Halil Pasic Use the new VMSTATE_VIRTIO_DEVICE macro. Signed-off-by: Halil Pasic Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/9pfs/virtio-9p-device.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/hw/9pfs/virtio-9p-devi

[Qemu-devel] [PULL 33/33] intel-iommu: Check IOAPIC's Trigger Mode against the one in IRTE

2016-10-09 Thread Michael S. Tsirkin
From: Feng Wu The Trigger Mode field of IOAPIC must match the Trigger Mode in the IRTE according to VT-d Spec 5.1.5.1. Signed-off-by: Feng Wu Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Peter Xu --- hw/i386/intel_iommu.c | 12 1 file changed,

[Qemu-devel] [PULL 14/33] virtio-blk: handle virtio_blk_handle_request() errors

2016-10-09 Thread Michael S. Tsirkin
From: Greg Kurz All these errors are caused by a buggy guest: QEMU should not exit. With this patch, if virtio_blk_handle_request() detects a buggy request, it marks the device as broken and returns an error to the caller so it takes appropriate action. In the case of virtio_blk_handle_vq(), we

[Qemu-devel] [PULL 15/33] virtio-net: handle virtio_net_handle_ctrl() error

2016-10-09 Thread Michael S. Tsirkin
From: Greg Kurz This error is caused by a buggy guest: let's switch the device to the broken state instead of terminating QEMU. Also we detach the element from the virtqueue and free it. Signed-off-by: Greg Kurz Reviewed-by: Stefan Hajnoczi Reviewed-by: Michael S. Tsirkin Signed-off-by: Micha

[Qemu-devel] [PULL 22/33] virtio-blk: convert VMSTATE_VIRTIO_DEVICE

2016-10-09 Thread Michael S. Tsirkin
From: Halil Pasic Use the new VMSTATE_VIRTIO_DEVICE macro. Signed-off-by: Halil Pasic Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/block/virtio-blk.c | 27 +++ 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/hw/block/virtio-

[Qemu-devel] [PULL 20/33] net: don't poke at chardev internal QemuOpts

2016-10-09 Thread Michael S. Tsirkin
From: "Daniel P. Berrange" The vhost-user & colo code is poking at the QemuOpts instance in the CharDriverState struct, not realizing that it is valid for this to be NULL. e.g. the following crash shows a codepath where it will be NULL: Program terminated with signal SIGSEGV, Segmentation fault

[Qemu-devel] [PULL 31/33] vhost-vsock: convert VMSTATE_VIRTIO_DEVICE

2016-10-09 Thread Michael S. Tsirkin
From: Halil Pasic Use the new VMSTATE_VIRTIO_DEVICE macro. Signed-off-by: Halil Pasic Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/virtio/vhost-vsock.c | 44 +++- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git

[Qemu-devel] [PULL 17/33] virtio-net: handle virtio_net_flush_tx() errors

2016-10-09 Thread Michael S. Tsirkin
From: Greg Kurz All these errors are caused by a buggy guest: let's switch the device to the broken state instead of terminating QEMU. Also we detach the element from the virtqueue and free it. If this happens, virtio_net_flush_tx() also returns -EINVAL, so that all callers can stop processing t

[Qemu-devel] [PULL 26/33] virtio-gpu: convert VMSTATE_VIRTIO_DEVICE

2016-10-09 Thread Michael S. Tsirkin
From: Halil Pasic Use the new VMSTATE_VIRTIO_DEVICE macro. The device virtio-gpu is special because it actually does not adhere to the virtio migration schema, because device state is last. Signed-off-by: Halil Pasic Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/di

[Qemu-devel] [PULL 30/33] virtio-rng: convert VMSTATE_VIRTIO_DEVICE

2016-10-09 Thread Michael S. Tsirkin
From: Halil Pasic Use the new VMSTATE_VIRTIO_DEVICE macro. Signed-off-by: Halil Pasic Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/virtio/virtio-rng.c | 21 + 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/hw/virtio/virtio-rng.c

[Qemu-devel] [PULL 25/33] virtio-serial: convert VMSTATE_VIRTIO_DEVICE

2016-10-09 Thread Michael S. Tsirkin
From: Halil Pasic Use the new VMSTATE_VIRTIO_DEVICE macro. Signed-off-by: Halil Pasic Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/char/virtio-serial-bus.c | 18 +++--- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/hw/char/virtio-seria

[Qemu-devel] [PULL 07/33] tests: acpi tables expected blobs update

2016-10-09 Thread Michael S. Tsirkin
From: Igor Mammedov Signed-off-by: Igor Mammedov Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/acpi-test-data/pc/DSDT.cphp | Bin 6435 -> 6471 bytes tests/acpi-test-data/pc/SRAT.cphp | Bin 0 -> 304 bytes tests/acpi-test-data/q35/DSDT.cphp | Bin 9197 -> 9233 by

[Qemu-devel] [PULL 27/33] virtio-input: convert VMSTATE_VIRTIO_DEVICE

2016-10-09 Thread Michael S. Tsirkin
From: Halil Pasic Use the new VMSTATE_VIRTIO_DEVICE macro. Signed-off-by: Halil Pasic Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/input/virtio-input.c | 23 +-- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/hw/input/virtio-in

[Qemu-devel] [PULL 10/33] virtio-serial: add missing virtio_detach_element() call

2016-10-09 Thread Michael S. Tsirkin
From: Stefan Hajnoczi Ports enter a "throttled" state when writing to the chardev would block. The current output VirtQueueElement is kept around until the chardev becomes writable again. There are several places in the virtio-serial lifecycle where the VirtQueueElement should be thrown away. F

[Qemu-devel] [PULL 28/33] virtio-scsi: convert VMSTATE_VIRTIO_DEVICE

2016-10-09 Thread Michael S. Tsirkin
From: Halil Pasic Use the new VMSTATE_VIRTIO_DEVICE macro. Signed-off-by: Halil Pasic Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/scsi/virtio-scsi.c | 28 +++- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/hw/scsi/virtio-

[Qemu-devel] [PULL 13/33] virtio-9p: handle handle_9p_output() error

2016-10-09 Thread Michael S. Tsirkin
From: Greg Kurz A broken guest may send a request without providing buffers for the reply or for the request itself, and virtqueue_pop() will return an element with either in_num == 0 or out_num == 0. All 9P requests are expected to start with the following 7-byte header: uint32_t s

[Qemu-devel] [PULL 18/33] virtio-scsi: convert virtio_scsi_bad_req() to use virtio_error()

2016-10-09 Thread Michael S. Tsirkin
From: Greg Kurz The virtio_scsi_bad_req() function is called when a guest sends a request with missing or ill-sized headers. This generally happens when the virtio_scsi_parse_req() function returns an error. With this patch, virtio_scsi_bad_req() will mark the device as broken, detach the reques

[Qemu-devel] [PULL 04/33] numa: reduce code duplication by adding helper numa_get_node_for_cpu()

2016-10-09 Thread Michael S. Tsirkin
From: Igor Mammedov Replace repeated pattern for (i = 0; i < nb_numa_nodes; i++) { if (test_bit(idx, numa_info[i].node_cpu)) { ... break; with a helper function to lookup numa node index for cpu. Suggested-by: Michael S. Tsirkin Signed-off-by: Igor Mammedov

[Qemu-devel] [PULL 01/33] virtio-balloon: Remove needless precompiled directive

2016-10-09 Thread Michael S. Tsirkin
From: Liang Li Since there in wrapper around madvise(), the virtio-balloon code is able to work without the precompiled directive, the directive can be removed. Signed-off-by: Liang Li Suggested-by: Thomas Huth Reviewd-by: Dr. David Alan Gilbert Reviewed-by: Michael S. Tsirkin Signed-off-by:

[Qemu-devel] [PULL 19/33] virtio-scsi: handle virtio_scsi_set_config() error

2016-10-09 Thread Michael S. Tsirkin
From: Greg Kurz This error is caused by a buggy guest: let's switch the device to the broken state instead of terminating QEMU. Signed-off-by: Greg Kurz Reviewed-by: Stefan Hajnoczi Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/scsi/virtio-scsi.c | 5 +++-- 1 file

[Qemu-devel] [PULL 11/33] virtio-9p: add parentheses to sizeof operator

2016-10-09 Thread Michael S. Tsirkin
From: Greg Kurz Signed-off-by: Greg Kurz Reviewed-by: Cornelia Huck Reviewed-by: Stefan Hajnoczi Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/9pfs/virtio-9p-device.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/9pfs/virtio-9p-devic

[Qemu-devel] [PULL 08/33] virtio: add virtio_detach_element()

2016-10-09 Thread Michael S. Tsirkin
From: Stefan Hajnoczi During device reset or similar situations a VirtQueueElement needs to be freed without pushing it onto the used ring or rewinding the virtqueue. Extract a new function to do this. Later patches add virtio_detach_element() calls to existing device so that scatter-gather list

[Qemu-devel] [PULL 00/33] virtio, pc: fixes and features

2016-10-09 Thread Michael S. Tsirkin
The following changes since commit 48f592118ab42f83a1a7561c4bfd2b72a100f241: bsd-user: fix FreeBSD build after d148d90e (2016-10-07 15:17:53 +0100) are available in the git repository at: git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags/for_upstream for you to fetch changes up to dea

[Qemu-devel] [PULL 05/33] acpi: provide _PXM method for CPU devices if QEMU is started numa enabled

2016-10-09 Thread Michael S. Tsirkin
From: Igor Mammedov Workaround for long standing issue where Linux kernel assigns hotplugged CPU to 1st numa node as it discards proximity for possible CPUs from SRAT after it's parsed. _PXM method allows linux query proximity directly from hotplugged CPU object, which allows Linux to assing CPU

[Qemu-devel] [PULL 23/33] virtio-net: convert VMSTATE_VIRTIO_DEVICE

2016-10-09 Thread Michael S. Tsirkin
From: Halil Pasic Use the new VMSTATE_VIRTIO_DEVICE macro. Signed-off-by: Halil Pasic Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/net/virtio-net.c | 42 +- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/hw/

[Qemu-devel] [PULL 16/33] virtio-net: handle virtio_net_receive() errors

2016-10-09 Thread Michael S. Tsirkin
From: Greg Kurz All these errors are caused by a buggy guest: let's switch the device to the broken state instead of terminating QEMU. Also we detach the element from the virtqueue and free it. Signed-off-by: Greg Kurz Reviewed-by: Cornelia Huck Reviewed-by: Stefan Hajnoczi Reviewed-by: Micha

[Qemu-devel] [PULL 03/33] virtio-serial: enable virtio console emergency write feature

2016-10-09 Thread Michael S. Tsirkin
From: Sascha Silbe Add support for enabling the virtio 1.0 "emergency write" (VIRTIO_CONSOLE_F_EMERG_WRITE) feature. The previous patch introduced the plumbing required for this; now we expose the virtio feature to the guest. The feature is disabled for compatibility machines to avoid exposing a

[Qemu-devel] [PULL for-2.0 1/3] Detect pthread_setname_np at configure time

2016-10-09 Thread Michael S. Tsirkin
From: "Dr. David Alan Gilbert" Warn if no way of setting thread name is available. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- configure| 28 util/qemu-thread-posix.c | 21 +++

[Qemu-devel] [PULL 09/33] virtio-blk: add missing virtio_detach_element() call

2016-10-09 Thread Michael S. Tsirkin
From: Stefan Hajnoczi Make sure to unmap the scatter-gather list and decrement vq->inuse before freeing requests in virtio_blk_reset(). Signed-off-by: Stefan Hajnoczi Reviewed-by: Ladi Prosek Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/block/virtio-blk.c | 1 +

[Qemu-devel] [PULL v3 07/14] Add 'debug-threads' suboption to --name

2016-10-09 Thread Michael S. Tsirkin
From: "Dr. David Alan Gilbert" Add flag storage to qemu-thread-* to store the namethreads flag Signed-off-by: Dr. David Alan Gilbert Acked-by: Michael S. Tsirkin Reviewed-by: Laszlo Ersek --- include/qemu/thread.h| 1 + util/qemu-thread-posix.c | 7 +++ util/qemu-thread-win32.c | 8 +

[Qemu-devel] [PULL 08/14] Add a 'name' parameter to qemu_thread_create

2016-10-09 Thread Michael S. Tsirkin
From: "Dr. David Alan Gilbert" If enabled, set the thread name at creation (on GNU systems with pthread_set_np) Fix up all the callers with a thread name Signed-off-by: Dr. David Alan Gilbert Acked-by: Michael S. Tsirkin Reviewed-by: Laszlo Ersek --- include/qemu/thread.h | 2 +-

[Qemu-devel] [PULL 06/33] tests: acpi: extend cphp testcase with numa check

2016-10-09 Thread Michael S. Tsirkin
From: Igor Mammedov so it would be possible to verify _PXM generation in DSDT and SRAT tables. Signed-off-by: Igor Mammedov Reviewed-by: Marcel Apfelbaum Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/bios-tables-test.c | 6 -- 1 file changed, 4 insertions(+

[Qemu-devel] [PATCH for-2.5] iotests: drop thread spun work-around

2016-10-09 Thread Michael S. Tsirkin
We've disabled the warning, there should be no need for test to work around it. Signed-off-by: Michael S. Tsirkin --- This is on top of main-loop: suppress warnings under qtest I just tested this by running make check. Is this enough? tests/qemu-iotests/common.filter | 1 - 1 file changed

[Qemu-devel] [PULL 07/14] Add 'debug-threads' suboption to --name

2016-10-09 Thread Michael S. Tsirkin
From: "Dr. David Alan Gilbert" Add flag storage to qemu-thread-* to store the namethreads flag Signed-off-by: Dr. David Alan Gilbert Acked-by: Michael S. Tsirkin Reviewed-by: Laszlo Ersek --- include/qemu/thread.h| 1 + util/qemu-thread-posix.c | 7 +++ util/qemu-thread-win32.c | 8 +

[Qemu-devel] [PULL 02/33] virtio-serial: add plumbing for virtio console emergency write support

2016-10-09 Thread Michael S. Tsirkin
From: Sascha Silbe Add the infrastructure required for the virtio 1.0 "emergency write" (VIRTIO_CONSOLE_F_EMERG_WRITE) feature. Because we don't touch the size of the configuration area, guests will not be able to actually make use of this without further patches. Reviewed-by: Cornelia Huck Sig

[Qemu-devel] [PULL v3 08/14] Add a 'name' parameter to qemu_thread_create

2016-10-09 Thread Michael S. Tsirkin
From: "Dr. David Alan Gilbert" If enabled, set the thread name at creation (on GNU systems with pthread_set_np) Fix up all the callers with a thread name Signed-off-by: Dr. David Alan Gilbert Acked-by: Michael S. Tsirkin Reviewed-by: Laszlo Ersek --- include/qemu/thread.h | 2 +-

[Qemu-devel] [PULL 08/16] Add 'debug-threads' suboption to --name

2016-10-09 Thread Michael S. Tsirkin
From: "Dr. David Alan Gilbert" Add flag storage to qemu-thread-* to store the namethreads flag Signed-off-by: Dr. David Alan Gilbert Acked-by: Michael S. Tsirkin Reviewed-by: Laszlo Ersek --- include/qemu/thread.h| 1 + util/qemu-thread-posix.c | 7 +++ util/qemu-thread-win32.c | 8 +

[Qemu-devel] [PULL 08/12] Add a 'name' parameter to qemu_thread_create

2016-10-09 Thread Michael S. Tsirkin
From: "Dr. David Alan Gilbert" If enabled, set the thread name at creation (on GNU systems with pthread_set_np) Fix up all the callers with a thread name Signed-off-by: Dr. David Alan Gilbert Acked-by: Michael S. Tsirkin Reviewed-by: Laszlo Ersek --- include/qemu/thread.h | 2 +-

[Qemu-devel] [PULL 09/16] Add a 'name' parameter to qemu_thread_create

2016-10-09 Thread Michael S. Tsirkin
From: "Dr. David Alan Gilbert" If enabled, set the thread name at creation (on GNU systems with pthread_set_np) Fix up all the callers with a thread name Signed-off-by: Dr. David Alan Gilbert Acked-by: Michael S. Tsirkin Reviewed-by: Laszlo Ersek --- include/qemu/thread.h | 2 +-

[Qemu-devel] [PULL 07/12] Add 'debug-threads' suboption to --name

2016-10-09 Thread Michael S. Tsirkin
From: "Dr. David Alan Gilbert" Add flag storage to qemu-thread-* to store the namethreads flag Signed-off-by: Dr. David Alan Gilbert Acked-by: Michael S. Tsirkin Reviewed-by: Laszlo Ersek --- include/qemu/thread.h| 1 + util/qemu-thread-posix.c | 7 +++ util/qemu-thread-win32.c | 8 +

[Qemu-devel] [PULL 8/8] Add a 'name' parameter to qemu_thread_create

2016-10-09 Thread Michael S. Tsirkin
From: "Dr. David Alan Gilbert" If enabled, set the thread name at creation (on GNU systems with pthread_set_np) Fix up all the callers with a thread name Signed-off-by: Dr. David Alan Gilbert Acked-by: Michael S. Tsirkin Reviewed-by: Laszlo Ersek --- include/qemu/thread.h | 2 +-

[Qemu-devel] [PULL 7/8] Add 'debug-threads' suboption to --name

2016-10-09 Thread Michael S. Tsirkin
From: "Dr. David Alan Gilbert" Add flag storage to qemu-thread-* to store the namethreads flag Signed-off-by: Dr. David Alan Gilbert Acked-by: Michael S. Tsirkin Reviewed-by: Laszlo Ersek --- include/qemu/thread.h| 1 + util/qemu-thread-posix.c | 7 +++ util/qemu-thread-win32.c | 8 +

Re: [Qemu-devel] [PATCH] colo-compare: fix find_and_check_chardev()

2016-10-09 Thread Zhang Chen
On 09/30/2016 12:06 PM, zhanghailiang wrote: find_and_check_chardev() uses 'opts' member of CharDriverState to check if the chardev is 'socket' chardev or not, which the opts will be NULL if We add the chardev by qmp 'chardev-add' command. All the related info can be found in 'filename' member

Re: [Qemu-devel] [PATCH v5 08/17] vfio: Pass an Error object to vfio_connect_container

2016-10-09 Thread Alexey Kardashevskiy
On 07/10/16 18:36, Auger Eric wrote: > Hi, > > On 07/10/2016 09:01, Markus Armbruster wrote: >> Eric Auger writes: >> >>> The error is currently simply reported in vfio_get_group. Don't >>> bother too much with the prefix which will be handled at upper level, >>> later on. >>> >>> Also return an

Re: [Qemu-devel] [PATCH] qtest: ask endianness of the target in qtest_init()

2016-10-09 Thread David Gibson
On Fri, Oct 07, 2016 at 10:39:09AM +0100, Peter Maydell wrote: > On 7 October 2016 at 00:55, David Gibson wrote: > > It is an improvement. But I still think if we're relying on the > > ill-defined "target endianness" we're already doing something wrong. > > Target endianness is not ill-defined.

Re: [Qemu-devel] [PATCH] qtest: ask endianness of the target in qtest_init()

2016-10-09 Thread David Gibson
On Fri, Oct 07, 2016 at 12:10:07PM +0200, Greg Kurz wrote: > On Fri, 7 Oct 2016 10:39:09 +0100 > Peter Maydell wrote: > > > On 7 October 2016 at 00:55, David Gibson > > wrote: > > > It is an improvement. But I still think if we're relying on the > > > ill-defined "target endianness" we're alre

Re: [Qemu-devel] [RFC 1/4] spapr_pci: Delegate placement of PCI host bridges to machine type

2016-10-09 Thread Alexey Kardashevskiy
On 07/10/16 20:17, David Gibson wrote: > On Fri, Oct 07, 2016 at 04:34:59PM +1100, Alexey Kardashevskiy wrote: >> On 07/10/16 16:10, David Gibson wrote: >>> On Fri, Oct 07, 2016 at 02:57:43PM +1100, Alexey Kardashevskiy wrote: On 06/10/16 14:03, David Gibson wrote: > The 'spapr-pci-host-br

[Qemu-devel] [RFC QEMU PATCH 7/8] xen-hvm: create hotplug memory region for HVM guest

2016-10-09 Thread Haozhong Zhang
Reserve the address space after guest physical memory for the hotplug memory region which is used by the existing implementation to place NVDIMM devices. Signed-off-by: Haozhong Zhang --- Cc: "Michael S. Tsirkin" Cc: Igor Mammedov Cc: Stefano Stabellini Cc: Anthony Perard Cc: xen-de...@lists.

[Qemu-devel] [RFC QEMU PATCH 6/8] hostmem: add a host memory backend for Xen

2016-10-09 Thread Haozhong Zhang
Some virtual devices (e.g. NVDIMM) use the host memory backend to map its backend resources to the guest. When those devices are used on Xen, the mapping has to be managed out of QEMU. In order to reuse other parts of the implementation of those devices, we introduce a host memory backend for Xen (

[Qemu-devel] [RFC QEMU PATCH 5/8] nvdimm acpi: build and copy NVDIMM namespace devices to guest on Xen

2016-10-09 Thread Haozhong Zhang
Build and copy NVDIMM namespace devices to guest when QEMU is used as the device model of Xen. Only the body of each AML device is built and copied, Xen hvmloader will build the complete namespace devices from them and put in SSDT tables. Signed-off-by: Haozhong Zhang --- Cc: "Michael S. Tsirkin"

[Qemu-devel] [RFC QEMU PATCH 8/8] qmp: add a qmp command 'query-nvdimms' to get plugged NVDIMM devices

2016-10-09 Thread Haozhong Zhang
Xen uses this command to get the backend resource, guest SPA and size of NVDIMM devices so as to map them to guest. Signed-off-by: Haozhong Zhang --- Cc: Markus Armbruster Cc: Xiao Guangrong Cc: "Michael S. Tsirkin" Cc: Igor Mammedov Cc: Eric Blake --- docs/qmp-commands.txt | 36 +

[Qemu-devel] [RFC QEMU PATCH 4/8] nvdimm acpi: build and copy NFIT to guest on Xen

2016-10-09 Thread Haozhong Zhang
Build and copy NFIT to guest when QEMU is used as the device model of Xen. The checksum of NFIT is left blank and will be filled by Xen hvmloader. Signed-off-by: Haozhong Zhang --- Cc: "Michael S. Tsirkin" Cc: Igor Mammedov Cc: Xiao Guangrong Cc: Paolo Bonzini Cc: Richard Henderson Cc: Eduar

[Qemu-devel] [RFC QEMU PATCH 3/8] nvdimm acpi: do not use fw_cfg on Xen

2016-10-09 Thread Haozhong Zhang
No fw_cfg is created when QEMU is used as the device model of Xen. Signed-off-by: Haozhong Zhang --- Cc: Xiao Guangrong Cc: "Michael S. Tsirkin" Cc: Igor Mammedov --- hw/acpi/nvdimm.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvdimm.

[Qemu-devel] [RFC QEMU PATCH 2/8] xen-hvm: add a function to copy ACPI to guest

2016-10-09 Thread Haozhong Zhang
xen_acpi_copy_to_guest() will be used later to copy NVDIMM ACPI to guest. Signed-off-by: Haozhong Zhang --- Cc: Stefano Stabellini Cc: Anthony Perard Cc: xen-de...@lists.xensource.com --- include/hw/xen/xen.h | 6 ++ xen-hvm.c| 180

[Qemu-devel] [RFC QEMU PATCH 0/8] Implement vNVDIMM for Xen HVM guest

2016-10-09 Thread Haozhong Zhang
Overview This RFC QEMU patch series along with corresponding patch series of Xen, Linux kernel and ndctl implements vNVDIMM for Xen HVM guests. DSM (and hence labels) and hotplug are not supported by this patch series and will be implemented later. Design and Implementation ==

[Qemu-devel] [RFC QEMU PATCH 1/8] nvdimm: do not initialize label_data if label_size is zero

2016-10-09 Thread Haozhong Zhang
When memory-backend-xen is used, the label_data pointer can not be got via memory_region_get_ram_ptr(). We will use other functions to get label_data once we introduce NVDIMM label support to Xen. Signed-off-by: Haozhong Zhang --- Cc: Xiao Guangrong Cc: "Michael S. Tsirkin" Cc: Igor Mammedov -

Re: [Qemu-devel] [PATCH v5 11/14] virtio-crypto: emulate virtio crypto as a legacy device by default

2016-10-09 Thread Gonglei (Arei)
Hi Michael, Happy to listen to your voice :) > -Original Message- > From: Michael S. Tsirkin [mailto:m...@redhat.com] > Sent: Monday, October 10, 2016 7:48 AM > Subject: Re: [PATCH v5 11/14] virtio-crypto: emulate virtio crypto as a legacy > device by default > > On Thu, Oct 06, 2016 at

Re: [Qemu-devel] [PATCH v5 11/14] virtio-crypto: emulate virtio crypto as a legacy device by default

2016-10-09 Thread Michael S. Tsirkin
On Thu, Oct 06, 2016 at 07:36:44PM +0800, Gonglei wrote: > the scenario of virtio crypto device is mostly NFV, which require > the existing Guest can't need to do any changes to support virtio > crypto, so that they can easily migrate the existing network units > to VM. That's also a basic requirem

[Qemu-devel] [PATCH v5 33/35] target-arm: remove EXCP_STREX + cpu_exclusive_{test, info}

2016-10-09 Thread Richard Henderson
From: "Emilio G. Cota" The exception is not emitted anymore; remove it and the associated TCG variables. Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota Signed-off-by: Richard Henderson Message-Id: <1467054136-10430-31-git-send-email-c...@braap.org> --- target-arm/cpu.h | 17 +++

[Qemu-devel] [PATCH v5 29/35] target-arm: emulate SWP with atomic_xchg helper

2016-10-09 Thread Richard Henderson
From: "Emilio G. Cota" Signed-off-by: Emilio G. Cota Message-Id: <1467054136-10430-25-git-send-email-c...@braap.org> Signed-off-by: Richard Henderson --- target-arm/translate.c | 26 ++ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/target-arm/translate

[Qemu-devel] [PATCH v5 30/35] target-arm: emulate aarch64's LL/SC using cmpxchg helpers

2016-10-09 Thread Richard Henderson
From: "Emilio G. Cota" Emulating LL/SC with cmpxchg is not correct, since it can suffer from the ABA problem. Portable parallel code, however, is written assuming only cmpxchg--and not LL/SC--is available. This means that in practice emulating LL/SC with cmpxchg is a viable alternative. The appe

[Qemu-devel] [PATCH v5 28/35] target-arm: emulate LL/SC using cmpxchg helpers

2016-10-09 Thread Richard Henderson
From: "Emilio G. Cota" Emulating LL/SC with cmpxchg is not correct, since it can suffer from the ABA problem. Portable parallel code, however, is written assuming only cmpxchg--and not LL/SC--is available. This means that in practice emulating LL/SC with cmpxchg is a viable alternative. The appe

[Qemu-devel] [PATCH v5 26/35] tests: add atomic_add-bench

2016-10-09 Thread Richard Henderson
From: "Emilio G. Cota" With this microbenchmark we can measure the overhead of emulating atomic instructions with a configurable degree of contention. The benchmark spawns $n threads, each performing $o atomic ops (additions) in a loop. Each atomic operation is performed on a different cache lin

[Qemu-devel] [PATCH v5 27/35] target-arm: Rearrange aa32 load and store functions

2016-10-09 Thread Richard Henderson
Stop specializing on TARGET_LONG_BITS == 32; unconditionally allocate a temp and expand with tcg_gen_extu_i32_tl. Split out gen_aa32_addr, gen_aa32_frob64, gen_aa32_ld_i32 and gen_aa32_st_i32 as separate interfaces. Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- target-arm/trans

  1   2   >