Re: [Qemu-devel] [Qemu-trivial] [PATCH v2] qapi-schema: clarify 'colo' state for MigrationStatus

2016-11-16 Thread Laurent Vivier
Le 17/11/2016 à 08:08, Hailiang Zhang a écrit : > Hi Laurent, > > On 2016/11/15 16:44, Laurent Vivier wrote: >> Le 14/11/2016 à 14:54, Stefan Hajnoczi a écrit : >>> On Mon, Nov 14, 2016 at 10:36:45AM +0800, Hailiang Zhang wrote: ping ? Anyone pick this up? >>> >>> The original

Re: [Qemu-devel] [PATCH 1/4] arm: Uniquely name imx25 I2C buses.

2016-11-16 Thread Cédric Le Goater
Hello, On 11/17/2016 05:36 AM, Alastair D'Silva wrote: > From: Alastair D'Silva > > The imx25 chip provides 3 i2c buses, but they have all been named > "i2c", which makes it difficult to predict which bus a device will > be connected to when specified on the command line.

Re: [Qemu-devel] [Qemu-ppc] [PATCH] tests/postcopy: Use KVM on ppc64 only if it is KVM-HV

2016-11-16 Thread Laurent Vivier
On 17/11/2016 04:18, David Gibson wrote: > On Wed, Nov 16, 2016 at 09:39:31AM +0100, Thomas Huth wrote: >> The ppc64 postcopy test does not work with KVM-PR, and it is also >> causing annoying warning messages when run on a x86 host. So let's >> use KVM here only if we know that we're running

Re: [Qemu-devel] [Qemu-trivial] [PATCH v2] qapi-schema: clarify 'colo' state for MigrationStatus

2016-11-16 Thread Hailiang Zhang
Hi Laurent, On 2016/11/15 16:44, Laurent Vivier wrote: Le 14/11/2016 à 14:54, Stefan Hajnoczi a écrit : On Mon, Nov 14, 2016 at 10:36:45AM +0800, Hailiang Zhang wrote: ping ? Anyone pick this up? The original patch that added these lines went through Amit Shah and David Gilbert. I have

Re: [Qemu-devel] [PATCH v14 09/22] vfio iommu type1: Add task structure to vfio_dma

2016-11-16 Thread Alexey Kardashevskiy
On 17/11/16 17:12, Alex Williamson wrote: > On Thu, 17 Nov 2016 16:41:14 +1100 > Alexey Kardashevskiy wrote: > >> On 17/11/16 07:46, Kirti Wankhede wrote: >>> Add task structure to vfio_dma structure. Task structure is used for: >>> - During DMA_UNMAP, same task who mapped it or

Re: [Qemu-devel] [PATCH RFC 0/2] numa: allocate CPUs masks dynamically

2016-11-16 Thread Alexey Kardashevskiy
On 17/11/16 03:02, Igor Mammedov wrote: > This series removes global MAX_CPUMASK_BITS constant > so that it won't inderectly influence maximum CPUs count > supported by different targets. > > It replaces statically allocated bitmasks with dynamically > allocated ones using '-smp maxcpus' value

Re: [Qemu-devel] [PATCH v14 09/22] vfio iommu type1: Add task structure to vfio_dma

2016-11-16 Thread Kirti Wankhede
On 11/17/2016 11:11 AM, Alexey Kardashevskiy wrote: > On 17/11/16 07:46, Kirti Wankhede wrote: >> Add task structure to vfio_dma structure. Task structure is used for: >> - During DMA_UNMAP, same task who mapped it or other task who shares same >> address space is allowed to unmap, otherwise

Re: [Qemu-devel] [PATCH v2 1/4] aio: add AioPollFn and io_poll() interface

2016-11-16 Thread Fam Zheng
On Wed, 11/16 17:46, Stefan Hajnoczi wrote: > The new AioPollFn io_poll() argument to aio_set_fd_handler() and > aio_set_event_handler() is used in the next patch. > > Keep this code change separate due to the number of files it touches. > > Signed-off-by: Stefan Hajnoczi >

Re: [Qemu-devel] [PATCH v14 09/22] vfio iommu type1: Add task structure to vfio_dma

2016-11-16 Thread Alex Williamson
On Thu, 17 Nov 2016 16:41:14 +1100 Alexey Kardashevskiy wrote: > On 17/11/16 07:46, Kirti Wankhede wrote: > > Add task structure to vfio_dma structure. Task structure is used for: > > - During DMA_UNMAP, same task who mapped it or other task who shares same > > address space is

Re: [Qemu-devel] [PATCH v14 09/22] vfio iommu type1: Add task structure to vfio_dma

2016-11-16 Thread Alexey Kardashevskiy
On 17/11/16 07:46, Kirti Wankhede wrote: > Add task structure to vfio_dma structure. Task structure is used for: > - During DMA_UNMAP, same task who mapped it or other task who shares same > address space is allowed to unmap, otherwise unmap fails. > QEMU maps few iova ranges initially, then fork

Re: [Qemu-devel] [PATCH 1/3] virtio: introduce grab/release_ioeventfd to fix vhost

2016-11-16 Thread Alexey Kardashevskiy
On 17/11/16 05:05, Paolo Bonzini wrote: > Following the recent refactoring of virtio notifiers [1], more specifically > the patch ed08a2a0b ("virtio: use virtio_bus_set_host_notifier to > start/stop ioeventfd") that uses virtio_bus_set_host_notifier [2] > by default, core virtio code requires

Re: [Qemu-devel] [PATCH v2] vhost: Update 'ioeventfd_started' with host notifiers

2016-11-16 Thread Alexey Kardashevskiy
On 16/11/16 19:38, Felipe Franciosi wrote: > >> On 16 Nov 2016, at 04:05, Alexey Kardashevskiy wrote: >> >> On 11/11/16 01:45, Christian Borntraeger wrote: >>> On 11/09/2016 01:44 PM, Felipe Franciosi wrote: Following the recent refactor of virtio notfiers [1], more

Re: [Qemu-devel] [PATCH v14 12/22] vfio: Add notifier callback to parent's ops structure of mdev

2016-11-16 Thread Kirti Wankhede
On 11/17/2016 7:45 AM, Dong Jia Shi wrote: > * Kirti Wankhede [2016-11-17 02:16:24 +0530]: > > Hi Kirti, > >> diff --git a/drivers/vfio/mdev/vfio_mdev.c b/drivers/vfio/mdev/vfio_mdev.c > [...] > >> @@ -51,6 +78,11 @@ static void vfio_mdev_release(void *device_data) >>

Re: [Qemu-devel] [PATCH v14 12/22] vfio: Add notifier callback to parent's ops structure of mdev

2016-11-16 Thread Kirti Wankhede
Add a notifier calback to parent's ops structure of mdev device so that per device notifer for vfio module is registered through vfio_mdev module. Signed-off-by: Kirti Wankhede Signed-off-by: Neo Jia Change-Id: Iafa6f1721aecdd6e50eb93b153b5621e6d29b637 ---

Re: [Qemu-devel] [PATCH v14 11/22] vfio iommu: Add blocking notifier to notify DMA_UNMAP

2016-11-16 Thread Kirti Wankhede
Added blocking notifier to IOMMU TYPE1 driver to notify vendor drivers about DMA_UNMAP. Exported two APIs vfio_register_notifier() and vfio_unregister_notifier(). Notifier should be registered, if external user wants to use vfio_pin_pages()/vfio_unpin_pages() APIs to pin/unpin pages. Vendor driver

Re: [Qemu-devel] [PATCH v14 10/22] vfio iommu type1: Add support for mediated devices

2016-11-16 Thread Kirti Wankhede
VFIO IOMMU drivers are designed for the devices which are IOMMU capable. Mediated device only uses IOMMU APIs, the underlying hardware can be managed by an IOMMU domain. Aim of this change is: - To use most of the code of TYPE1 IOMMU driver for mediated devices - To support direct assigned device

Re: [Qemu-devel] [PATCH v14 10/22] vfio iommu type1: Add support for mediated devices

2016-11-16 Thread Kirti Wankhede
On 11/17/2016 5:27 AM, Alex Williamson wrote: > On Thu, 17 Nov 2016 02:16:22 +0530 > Kirti Wankhede wrote: >> @@ -931,6 +1344,24 @@ static void vfio_iommu_type1_detach_group(void >> *iommu_data, >> >> mutex_lock(>lock); >> >> +if (iommu->external_domain) { >>

[Qemu-devel] [PATCH 1/1] hw/net/spapr_llan: 6 byte mac address device tree entry

2016-11-16 Thread Sam Bobroff
The spapr-vlan device in QEMU has always presented it's MAC address in the device tree as an 8 byte value, even though PAPR requires it to be 6 bytes. This is because, at the time, AIX required the value to be 8 bytes. However, modern versions of AIX only support the (correct) 6 byte value so

Re: [Qemu-devel] [PATCH 2/4] target-ppc: Implement bcdctsq. instruction

2016-11-16 Thread David Gibson
On Wed, Nov 16, 2016 at 06:07:28PM -0200, Jose Ricardo Ziviani wrote: > bcdctsq.: Decimal convert to signed quadword. It is possible to > convert packed decimal values to signed quadwords. > > Signed-off-by: Jose Ricardo Ziviani > --- > target-ppc/helper.h

Re: [Qemu-devel] [PATCH 4/4] target-ppc: Implement bcdsetsgn. instruction

2016-11-16 Thread David Gibson
On Wed, Nov 16, 2016 at 06:07:30PM -0200, Jose Ricardo Ziviani wrote: > bcdsetsgn.: Decimal set sign. This instruction copies the register > value to the result register but adjust the signal according to > the preferred sign value. > > Signed-off-by: Jose Ricardo Ziviani

Re: [Qemu-devel] [Qemu-ppc] [PATCH] tests/postcopy: Use KVM on ppc64 only if it is KVM-HV

2016-11-16 Thread David Gibson
On Wed, Nov 16, 2016 at 09:39:31AM +0100, Thomas Huth wrote: > The ppc64 postcopy test does not work with KVM-PR, and it is also > causing annoying warning messages when run on a x86 host. So let's > use KVM here only if we know that we're running with KVM-HV (which > automatically also means that

Re: [Qemu-devel] [PATCH 3/4] target-ppc: Implement bcdcpsgn. instruction

2016-11-16 Thread David Gibson
On Wed, Nov 16, 2016 at 06:07:29PM -0200, Jose Ricardo Ziviani wrote: > bcdcpsgn.: Decimal copy sign. Given two registers vra and vrb, it > copies the vra value with vrb sign to the result register vrt. > > Signed-off-by: Jose Ricardo Ziviani > --- >

Re: [Qemu-devel] [PATCH for-2.8] migration: Fix return code of ram_save_iterate()

2016-11-16 Thread David Gibson
On Mon, Nov 14, 2016 at 07:34:59PM +0100, Juan Quintela wrote: > Thomas Huth wrote: > > qemu_savevm_state_iterate() expects the iterators to return 1 > > when they are done, and 0 if there is still something left to do. > > However, ram_save_iterate() does not obey this rule and

Re: [Qemu-devel] [PATCH] tests/postcopy: Use KVM on ppc64 only if it is KVM-HV

2016-11-16 Thread David Gibson
On Wed, Nov 16, 2016 at 02:17:47PM +0100, Thomas Huth wrote: > On 16.11.2016 13:37, Greg Kurz wrote: > > On Wed, 16 Nov 2016 12:24:50 + > > "Dr. David Alan Gilbert" wrote: > > > >> * Greg Kurz (gr...@kaod.org) wrote: > >>> On Wed, 16 Nov 2016 09:39:31 +0100 > >>> Thomas

Re: [Qemu-devel] [PATCH] vfio: avoid adding same iommu mr for notify

2016-11-16 Thread David Gibson
On Mon, Nov 14, 2016 at 07:59:28PM -0500, Peter Xu wrote: > When one IOMMU memory region is splitted into multiple memory sections, > vfio will register multiple same notifiers to a vIOMMU for the same > region. That's not sensible. What we need is to register one IOMMU > notifier for each IOMMU

Re: [Qemu-devel] [PATCH 1/4] target-ppc: Implement bcdcfsq. instruction

2016-11-16 Thread David Gibson
On Wed, Nov 16, 2016 at 06:07:27PM -0200, Jose Ricardo Ziviani wrote: > bcdcfsq.: Decimal convert from signed quadword. It is possible to I think there should be a "not" in there. > convert values less than 10^31-1 or greater than -10^31-1 to be > represented in packed decimal format. > >

Re: [Qemu-devel] [PATCH 07/25] target-ppc: Use clz and ctz opcodes

2016-11-16 Thread David Gibson
On Wed, Nov 16, 2016 at 08:25:17PM +0100, Richard Henderson wrote: > Cc: qemu-...@nongnu.org > Cc: David Gibson > Signed-off-by: Richard Henderson Reviewed-by: David Gibson > --- > target-ppc/helper.h | 4 >

[Qemu-devel] [PATCH v3 3/4] 9pfs: add cleanup operation for handle backend driver

2016-11-16 Thread Li Qiang
In the init operation of handle backend dirver, it allocates a handle_data struct and opens a mount file. We should free these resources when the 9pfs device is unrealized. This is what this patch does. Signed-off-by: Li Qiang --- hw/9pfs/9p-handle.c | 9 + 1 file

[Qemu-devel] [PATCH v3 2/4] 9pfs: add cleanup operation in FileOperations

2016-11-16 Thread Li Qiang
Currently, the backend of VirtFS doesn't have a cleanup function. This will lead resource leak issues if the backed driver allocates resources. This patch addresses this issue. Signed-off-by: Li Qiang --- Changes since the v1: -move the cleanup stuff above calls to g_free -add

[Qemu-devel] [PATCH v3 1/4] 9pfs: adjust the order of resource cleanup in device unrealize

2016-11-16 Thread Li Qiang
Unrealize should undo things that were set during realize in reverse order. So should do in the error path in realize. Signed-off-by: Li Qiang --- Changes since the v2: -adjust the order in the error path in realize hw/9pfs/9p.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[Qemu-devel] [PATCH v3 4/4] 9pfs: add cleanup operation for proxy backend driver

2016-11-16 Thread Li Qiang
In the init operation of proxy backend dirver, it allocates a V9fsProxy struct and some other resources. We should free these resources when the 9pfs device is unrealized. This is what this patch does. Signed-off-by: Li Qiang --- Changes since the v2: -only close proxy->sockfd

[Qemu-devel] [PATCH v3 0/4] 9pfs: add cleanup operation in handle/proxy backend

2016-11-16 Thread Li Qiang
Currently, the backend of VirtFS doesn't have a cleanup function. This will leak some resources in handle and proxy backend driver. This patchset addresses this issue. Li Qiang (4): 9pfs: adjust the order of resource cleanup in device unrealize 9pfs: add cleanup operation in FileOperations

Re: [Qemu-devel] [PATCH v14 11/22] vfio iommu: Add blocking notifier to notify DMA_UNMAP

2016-11-16 Thread Jike Song
On 11/17/2016 04:46 AM, Kirti Wankhede wrote: > Added blocking notifier to IOMMU TYPE1 driver to notify vendor drivers > about DMA_UNMAP. > Exported two APIs vfio_register_notifier() and vfio_unregister_notifier(). > Notifier should be registered, if external user wants to use >

[Qemu-devel] Problem with QEMU PPC test image

2016-11-16 Thread Programmingkid
When I run this test disk image: http://wiki.qemu.org/download/ppc-virtexml507-linux-2_6_34.tgz I see these error messages: /selftest.sh: line 6: /usr/bin/sha1test: not found /selftest.sh: line 7: /usr/bin/hmactest: not found Maybe /usr/bin/sha1sum is what the first test should be. I don't see

Re: [Qemu-devel] [PATCH v14 12/22] vfio: Add notifier callback to parent's ops structure of mdev

2016-11-16 Thread Dong Jia Shi
* Kirti Wankhede [2016-11-17 02:16:24 +0530]: Hi Kirti, > diff --git a/drivers/vfio/mdev/vfio_mdev.c b/drivers/vfio/mdev/vfio_mdev.c [...] > @@ -51,6 +78,11 @@ static void vfio_mdev_release(void *device_data) > if (likely(parent->ops->release)) >

Re: [Qemu-devel] [Qemu-ppc] [RFC PATCH qemu] spapr_pci: Create PCI-express root bus by default

2016-11-16 Thread Alexey Kardashevskiy
On 16/11/16 01:02, Andrea Bolognani wrote: > On Tue, 2016-11-01 at 13:46 +1100, David Gibson wrote: >> On Mon, Oct 31, 2016 at 03:10:23PM +1100, Alexey Kardashevskiy wrote: >>> >>> On 31/10/16 13:53, David Gibson wrote: On Fri, Oct 28, 2016 at 12:07:12PM +0200, Greg Kurz wrote: >

Re: [Qemu-devel] [PATCH] virtio-crypto: fix virtio_queue_set_notification() race

2016-11-16 Thread Gonglei (Arei)
> -Original Message- > From: Stefan Hajnoczi [mailto:stefa...@redhat.com] > Sent: Thursday, November 17, 2016 4:18 AM > To: qemu-devel@nongnu.org > Cc: Gonglei (Arei); Michael S. Tsirkin; Stefan Hajnoczi > Subject: [PATCH] virtio-crypto: fix virtio_queue_set_notification() race > >

Re: [Qemu-devel] [PATCH v13 12/22] vfio: Add notifier callback to parent's ops structure of mdev

2016-11-16 Thread Dong Jia Shi
* Kirti Wankhede [2016-11-16 20:47:18 +0530]: > > > On 11/16/2016 12:07 PM, Dong Jia Shi wrote: > > * Kirti Wankhede [2016-11-15 20:59:55 +0530]: > > > > Hi Kirti, > > > > [...] > > > >> diff --git a/drivers/vfio/mdev/vfio_mdev.c

[Qemu-devel] [PATCH] arm: Create /chosen and /memory devicetree nodes if necessary

2016-11-16 Thread Guenter Roeck
(next-20161116), where many of the /chosen and /memory nodes in arm devicetree files have been removed. This results in a kernel hang (sabrelite) or qemu abort (imx25-pdk). hw/arm/boot.c | 17 + 1 file changed, 17 insertions(+) diff --git a/hw/arm/boot.c b/hw/arm/boot.c index 9

[Qemu-devel] [QEMU PATCH v13 4/4] migration: add error_report

2016-11-16 Thread Jianjun Duan
Added error_report where version_ids do not match in vmstate_load_state. Signed-off-by: Jianjun Duan --- migration/vmstate.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/migration/vmstate.c b/migration/vmstate.c index 2f9d4ba..0e6fce4 100644 ---

[Qemu-devel] [QEMU PATCH v13 3/4] tests/migration: Add test for QTAILQ migration

2016-11-16 Thread Jianjun Duan
Add a test for QTAILQ migration to tests/test-vmstate.c. Signed-off-by: Jianjun Duan --- tests/test-vmstate.c | 160 +++ 1 file changed, 160 insertions(+) diff --git a/tests/test-vmstate.c b/tests/test-vmstate.c index

[Qemu-devel] [QEMU PATCH v13 2/4] migration: migrate QTAILQ

2016-11-16 Thread Jianjun Duan
Currently we cannot directly transfer a QTAILQ instance because of the limitation in the migration code. Here we introduce an approach to transfer such structures. We created VMStateInfo vmstate_info_qtailq for QTAILQ. Similar VMStateInfo can be created for other data structures such as list.

[Qemu-devel] [QEMU PATCH v13 1/4] migration: extend VMStateInfo

2016-11-16 Thread Jianjun Duan
Current migration code cannot handle some data structures such as QTAILQ in qemu/queue.h. Here we extend the signatures of put/get in VMStateInfo so that customized handling is supported. put now will return int type. Signed-off-by: Jianjun Duan ---

[Qemu-devel] [QEMU PATCH v13 0/4] migration: migrate QTAILQ

2016-11-16 Thread Jianjun Duan
Hi all, I addressed some review comments. Comments are welcome. v13: - Changed some QTAILQ related macro names to match existing ones. Previous versions are: v12: - Fixed type for put_qtailq which caused build break. (link:

Re: [Qemu-devel] [PATCH v14 11/22] vfio iommu: Add blocking notifier to notify DMA_UNMAP

2016-11-16 Thread Alex Williamson
On Thu, 17 Nov 2016 02:16:23 +0530 Kirti Wankhede wrote: > @@ -1321,12 +1350,11 @@ static void vfio_iommu_unmap_unpin_reaccount(struct > vfio_iommu *iommu) > > static void vfio_sanity_check_pfn_list(struct vfio_iommu *iommu) > { > - struct rb_node *n, *p; > +

Re: [Qemu-devel] [PATCH v14 10/22] vfio iommu type1: Add support for mediated devices

2016-11-16 Thread Alex Williamson
On Thu, 17 Nov 2016 02:16:22 +0530 Kirti Wankhede wrote: > @@ -931,6 +1344,24 @@ static void vfio_iommu_type1_detach_group(void > *iommu_data, > > mutex_lock(>lock); > > + if (iommu->external_domain) { > + group =

Re: [Qemu-devel] [PATCH 0/3] virtio: disable notifications in blk and scsi

2016-11-16 Thread Michael S. Tsirkin
On Wed, Nov 16, 2016 at 09:53:06PM +, Stefan Hajnoczi wrote: > Disabling notifications during virtqueue processing reduces the number of > exits. The virtio-net device already uses virtio_queue_set_notifications() > but > virtio-blk and virtio-scsi do not. > > The following benchmark shows

Re: [Qemu-devel] [PATCH v2 1/1] cadence_uart: Check baud rate generator and divider values on migration

2016-11-16 Thread Alistair Francis
On Mon, Nov 7, 2016 at 4:34 PM, Alistair Francis wrote: > The Cadence UART device emulator calculates speed by dividing the > baud rate by a 'baud rate generator' & 'baud rate divider' value. > The device specification defines these register values to be > non-zero

Re: [Qemu-devel] [PATCH v1 1/1] generic-loader: file: Only set a PC if a CPU is specified

2016-11-16 Thread Alistair Francis
On Fri, Nov 11, 2016 at 8:06 PM, Edgar E. Iglesias wrote: > On Fri, Nov 11, 2016 at 06:51:20PM -0800, Alistair Francis wrote: >> This patch fixes the generic-loader file loading to only set the program >> counter if a CPU is specified. This follows what is written in the

[Qemu-devel] [PATCH 3/3] virtio-scsi: suppress virtqueue kick during processing

2016-11-16 Thread Stefan Hajnoczi
The guest does not need to kick the virtqueue while we are processing it. This reduces the number of vmexits during periods of heavy I/O. Signed-off-by: Stefan Hajnoczi --- hw/scsi/virtio-scsi.c | 36 +--- 1 file changed, 21 insertions(+),

[Qemu-devel] [PATCH 1/3] virtio: add missing vdev->broken check

2016-11-16 Thread Stefan Hajnoczi
virtio_queue_notify_vq() checks vdev->broken before invoking the handler, virtio_queue_notify_aio_vq() should too. Signed-off-by: Stefan Hajnoczi --- hw/virtio/virtio.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index

[Qemu-devel] [PATCH 0/3] virtio: disable notifications in blk and scsi

2016-11-16 Thread Stefan Hajnoczi
Disabling notifications during virtqueue processing reduces the number of exits. The virtio-net device already uses virtio_queue_set_notifications() but virtio-blk and virtio-scsi do not. The following benchmark shows a 15% reduction in virtio-blk-pci MMIO exits: (host)$ qemu-system-x86_64 \

[Qemu-devel] [PATCH 2/3] virtio-blk: suppress virtqueue kick during processing

2016-11-16 Thread Stefan Hajnoczi
The guest does not need to kick the virtqueue while we are processing it. This reduces the number of vmexits during periods of heavy I/O. Signed-off-by: Stefan Hajnoczi --- hw/block/virtio-blk.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-)

Re: [Qemu-devel] [PATCH for-2.8 0/3] virtio fixes

2016-11-16 Thread Farhan Ali
On 11/16/2016 03:32 PM, Farhan Ali wrote: On 11/16/2016 03:16 PM, Michael S. Tsirkin wrote: On Wed, Nov 16, 2016 at 03:03:13PM -0500, Farhan Ali wrote: Hi Paolo, I was able to test your patches in our s390 environment. I don't see the qemu crashes anymore which I noticed before.

Re: [Qemu-devel] [PATCH 3/3] virtio: set ISR on dataplane notifications

2016-11-16 Thread Michael S. Tsirkin
On Wed, Nov 16, 2016 at 04:05:31PM -0500, Paolo Bonzini wrote: > > > - Original Message - > > From: "Michael S. Tsirkin" > > To: "Paolo Bonzini" > > Cc: qemu-devel@nongnu.org, "alex williamson" , > >

Re: [Qemu-devel] [patch v3 00/18] tcg field extract primitives

2016-11-16 Thread no-reply
Hi, Your series seems to have some coding style problems. See output below for more information: Type: series Subject: [Qemu-devel] [patch v3 00/18] tcg field extract primitives Message-id: 1479326625-10682-1-git-send-email-...@twiddle.net === TEST SCRIPT BEGIN === #!/bin/bash BASE=base n=1

Re: [Qemu-devel] [PATCH for-2.8 0/3] virtio fixes

2016-11-16 Thread Farhan Ali
On 11/16/2016 03:16 PM, Michael S. Tsirkin wrote: On Wed, Nov 16, 2016 at 03:03:13PM -0500, Farhan Ali wrote: Hi Paolo, I was able to test your patches in our s390 environment. I don't see the qemu crashes anymore which I noticed before. Testing a guest running high stress I/O workload,

[Qemu-devel] Once again with feeling: work-around for slow SEEK_HOLE on Linux tmpfs.

2016-11-16 Thread Christopher Oliver
-- Christopher Oliver qemu-patch Description: Binary data

[Qemu-devel] [PATCH v14 22/22] MAINTAINERS: Add entry VFIO based Mediated device drivers

2016-11-16 Thread Kirti Wankhede
Adding myself as a maintainer of mediated device framework, a sub module of VFIO. Signed-off-by: Kirti Wankhede Signed-off-by: Neo Jia Change-Id: I58f6717783e0d4008ca31f4a5c4494696bae8571 --- MAINTAINERS | 9 + 1 file changed, 9 insertions(+)

[Qemu-devel] [PATCH v14 19/22] docs: Add Documentation for Mediated devices

2016-11-16 Thread Kirti Wankhede
Add file Documentation/vfio-mediated-device.txt that include details of mediated device framework. Signed-off-by: Kirti Wankhede Signed-off-by: Neo Jia Change-Id: I137dd646442936090d92008b115908b7b2c7bc5d --- Documentation/vfio-mediated-device.txt | 298

Re: [Qemu-devel] [Qemu-block] Once again with feeling: work-around for slow SEEK_HOLE on Linux tmpfs.

2016-11-16 Thread Eric Blake
On 11/16/2016 01:48 PM, Christopher Oliver wrote: > > Attaching the patch (rather than including it inline) requires reviewers to save the attachment off to a file in order to even see what you wrote. To save others some time, I'm pasting the text and replying inline: > The following patch is

[Qemu-devel] [PATCH v14 15/22] vfio: Introduce vfio_set_irqs_validate_and_prepare()

2016-11-16 Thread Kirti Wankhede
Vendor driver using mediated device framework would use same mechnism to validate and prepare IRQs. Introducing this function to reduce code replication in multiple drivers. Signed-off-by: Kirti Wankhede Signed-off-by: Neo Jia Change-Id:

[Qemu-devel] [PATCH v14 12/22] vfio: Add notifier callback to parent's ops structure of mdev

2016-11-16 Thread Kirti Wankhede
Add a notifier calback to parent's ops structure of mdev device so that per device notifer for vfio module is registered through vfio_mdev module. Signed-off-by: Kirti Wankhede Signed-off-by: Neo Jia Change-Id: Iafa6f1721aecdd6e50eb93b153b5621e6d29b637 ---

[Qemu-devel] [PATCH v14 04/22] vfio: Common function to increment container_users

2016-11-16 Thread Kirti Wankhede
This change rearrange functions to have common function to increment container_users Signed-off-by: Kirti Wankhede Signed-off-by: Neo Jia Reviewed-by: Jike Song Change-Id: I8bdeb352bc8439b107ffd519480fd4dc238677f2 ---

Re: [Qemu-devel] [PATCH for-2.8 0/3] virtio fixes

2016-11-16 Thread Farhan Ali
Hi Paolo, I was able to test your patches in our s390 environment. I don't see the qemu crashes anymore which I noticed before. Testing a guest running high stress I/O workload, without iothreads does show a delay in guest response time. But running the same test with iothreads seems to

[Qemu-devel] [PATCH v14 08/22] vfio iommu type1: Add find_iommu_group() function

2016-11-16 Thread Kirti Wankhede
Add find_iommu_group() Signed-off-by: Kirti Wankhede Signed-off-by: Neo Jia Reviewed-by: Jike Song Reviewed-by: Dong Jia Shi Change-Id: I9d372f1ebe9eb01a5a21374b8a2b03f7df73601f ---

[Qemu-devel] (no subject)

2016-11-16 Thread Christopher Oliver
This patch (hack?) works around the slowness in SEEK_HOLE for large dense files on Linux tmpfs. It may improve life elsewhere as well, and the penalty of the checks should be vanishingly small where it is not needed. If I'm subtly (or not so subtly) wrong, please fire back. Sincerely, --

[Qemu-devel] [PATCH v14 18/22] vfio: Define device_api strings

2016-11-16 Thread Kirti Wankhede
Defined device API strings. Vendor driver using mediated device framework should use corresponding string for device_api attribute. Signed-off-by: Kirti Wankhede Signed-off-by: Neo Jia Change-Id: I42d29f475f02a7132ce13297fbf2b48f1da10995 ---

[Qemu-devel] [PATCH v14 05/22] vfio iommu: Added pin and unpin callback functions to vfio_iommu_driver_ops

2016-11-16 Thread Kirti Wankhede
Added APIs for pining and unpining set of pages. These call back into backend iommu module to actually pin and unpin pages. Added two new callback functions to struct vfio_iommu_driver_ops. Backend IOMMU module that supports pining and unpinning pages for mdev devices should provide these

[Qemu-devel] [PATCH v14 21/22] docs: Sample driver to demonstrate how to use Mediated device framework.

2016-11-16 Thread Kirti Wankhede
The Sample driver creates mdev device that simulates serial port over PCI card. Signed-off-by: Kirti Wankhede Signed-off-by: Neo Jia Change-Id: I857f8f12f8b275f2498dfe8c628a5cdc7193b1b2 --- Documentation/vfio-mediated-device.txt | 103 ++-

Re: [Qemu-devel] [PATCH] translate-all: Enable locking debug in a debug build

2016-11-16 Thread Pranith Kumar
On Wed, Nov 16, 2016 at 10:57 AM, Alex Bennée wrote: > > Pranith Kumar writes: > >> Unconditionally enable locking checks in debug builds so that we get >> wider testing. Using tcg_debug_assert() allows us to remove >> DEBUG_LOCKING define. > >

Re: [Qemu-devel] [PATCH 3/3] virtio: set ISR on dataplane notifications

2016-11-16 Thread Paolo Bonzini
- Original Message - > From: "Michael S. Tsirkin" > To: "Paolo Bonzini" > Cc: qemu-devel@nongnu.org, "alex williamson" , > borntrae...@de.ibm.com, fel...@nutanix.com > Sent: Wednesday, November 16, 2016 9:39:24 PM >

[Qemu-devel] [PATCH v14 03/22] vfio: Rearrange functions to get vfio_group from dev

2016-11-16 Thread Kirti Wankhede
This patch rearranges functions to get vfio_group from device Signed-off-by: Kirti Wankhede Signed-off-by: Neo Jia Reviewed-by: Jike Song Change-Id: I1f93262bdbab75094bc24b087b29da35ba70c4c6 --- drivers/vfio/vfio.c | 23

[Qemu-devel] [PATCH v14 20/22] docs: Sysfs ABI for mediated device framework

2016-11-16 Thread Kirti Wankhede
Added details of sysfs ABI for mediated device framework Signed-off-by: Kirti Wankhede Signed-off-by: Neo Jia Change-Id: Icb0fd4ed58a2fa793fbcb1c3d5009a4403c1f3ac --- Documentation/ABI/testing/sysfs-bus-vfio-mdev | 111 ++ 1 file

[Qemu-devel] [PATCH v14 11/22] vfio iommu: Add blocking notifier to notify DMA_UNMAP

2016-11-16 Thread Kirti Wankhede
Added blocking notifier to IOMMU TYPE1 driver to notify vendor drivers about DMA_UNMAP. Exported two APIs vfio_register_notifier() and vfio_unregister_notifier(). Notifier should be registered, if external user wants to use vfio_pin_pages()/vfio_unpin_pages() APIs to pin/unpin pages. Vendor driver

[Qemu-devel] [PATCH v14 13/22] vfio: Introduce common function to add capabilities

2016-11-16 Thread Kirti Wankhede
Vendor driver using mediated device framework should use vfio_info_add_capability() to add capabilities. Introduced this function to reduce code duplication in vendor drivers. vfio_info_cap_shift() manipulated a data buffer to add an offset to each element in a chain. This data buffer is

[Qemu-devel] [PATCH v14 02/22] vfio: VFIO based driver for Mediated devices

2016-11-16 Thread Kirti Wankhede
vfio_mdev driver registers with mdev core driver. mdev core driver creates mediated device and calls probe routine of vfio_mdev driver for each device. Probe routine of vfio_mdev driver adds mediated device to VFIO core module This driver forms a shim layer that pass through VFIO devices

[Qemu-devel] [PATCH v14 07/22] vfio iommu type1: Update argument of vaddr_get_pfn()

2016-11-16 Thread Kirti Wankhede
Update arguments of vaddr_get_pfn() to take struct mm_struct *mm as input argument. Signed-off-by: Kirti Wankhede Signed-off-by: Neo Jia Change-Id: I885fd4cd4a9f66f4ee2c1caf58267464ec239f52 --- drivers/vfio/vfio_iommu_type1.c | 32

[Qemu-devel] [PATCH v14 17/22] vfio_platform: Updated to use vfio_set_irqs_validate_and_prepare()

2016-11-16 Thread Kirti Wankhede
Updated vfio_platform_common.c file to use vfio_set_irqs_validate_and_prepare() Signed-off-by: Kirti Wankhede Signed-off-by: Neo Jia Change-Id: Id87cd6b78ae901610b39bf957974baa6f40cd7b0 --- drivers/vfio/platform/vfio_platform_common.c | 31

[Qemu-devel] [PATCH v14 06/22] vfio iommu type1: Update arguments of vfio_lock_acct

2016-11-16 Thread Kirti Wankhede
Added task structure as input argument to vfio_lock_acct() function. Signed-off-by: Kirti Wankhede Signed-off-by: Neo Jia Change-Id: I5d3673cc9d3786bb436b395d5f74537f1a36da80 --- drivers/vfio/vfio_iommu_type1.c | 30 -- 1 file

[Qemu-devel] [PATCH v14 00/22] Add Mediated device support

2016-11-16 Thread Kirti Wankhede
This series adds Mediated device support to Linux host kernel. Purpose of this series is to provide a common interface for mediated device management that can be used by different devices. This series introduces Mdev core module that creates and manages mediated devices, VFIO based driver for

[Qemu-devel] [PATCH v14 10/22] vfio iommu type1: Add support for mediated devices

2016-11-16 Thread Kirti Wankhede
VFIO IOMMU drivers are designed for the devices which are IOMMU capable. Mediated device only uses IOMMU APIs, the underlying hardware can be managed by an IOMMU domain. Aim of this change is: - To use most of the code of TYPE1 IOMMU driver for mediated devices - To support direct assigned device

[Qemu-devel] [PATCH v14 16/22] vfio_pci: Updated to use vfio_set_irqs_validate_and_prepare()

2016-11-16 Thread Kirti Wankhede
Updated vfio_pci.c file to use vfio_set_irqs_validate_and_prepare() Signed-off-by: Kirti Wankhede Signed-off-by: Neo Jia Change-Id: I9f3daba89d8dba5cb5b01a8cff420412f30686c7 --- drivers/vfio/pci/vfio_pci.c | 34 +++--- 1 file

[Qemu-devel] [PATCH v14 01/22] vfio: Mediated device Core driver

2016-11-16 Thread Kirti Wankhede
Design for Mediated Device Driver: Main purpose of this driver is to provide a common interface for mediated device management that can be used by different drivers of different devices. This module provides a generic interface to create the device, add it to mediated bus, add device to IOMMU

Re: [Qemu-devel] [PATCH 3/3] virtio: set ISR on dataplane notifications

2016-11-16 Thread Paolo Bonzini
> > +void virtio_notify_irqfd(VirtIODevice *vdev, VirtQueue *vq) > > +{ > > +if (!virtio_should_notify(vdev, vq)) { > > +return; > > +} > > + > > +trace_virtio_notify_irqfd(vdev, vq); > > +virtio_set_isr(vq->vdev, 0x1); > > So here, I think we need a comment with parts of

[Qemu-devel] [PATCH v14 09/22] vfio iommu type1: Add task structure to vfio_dma

2016-11-16 Thread Kirti Wankhede
Add task structure to vfio_dma structure. Task structure is used for: - During DMA_UNMAP, same task who mapped it or other task who shares same address space is allowed to unmap, otherwise unmap fails. QEMU maps few iova ranges initially, then fork threads and from the child thread calls DMA_UNMAP

[Qemu-devel] [PATCH v14 14/22] vfio_pci: Update vfio_pci to use vfio_info_add_capability()

2016-11-16 Thread Kirti Wankhede
Update msix_sparse_mmap_cap() to use vfio_info_add_capability() Update region type capability to use vfio_info_add_capability() Signed-off-by: Kirti Wankhede Signed-off-by: Neo Jia Change-Id: I52bb28c7875a6da5a79ddad1843e6088aff58a45 ---

Re: [Qemu-devel] [PATCH v2] hw/isa/lpc_ich9: inject SMI on all VCPUs if APM_STS == 'Q'

2016-11-16 Thread Michael S. Tsirkin
On Wed, Nov 16, 2016 at 07:03:27PM +0100, Laszlo Ersek wrote: > On 11/16/16 15:05, Paolo Bonzini wrote: > > > > > > On 16/11/2016 14:18, Michael S. Tsirkin wrote: > >>> - we could have another magic 0xB2 value, which is implemented directly > >>> in QEMU and sets 0xB3 to a magic value. Then

Re: [Qemu-devel] dpdk/vpp and cross-version migration for vhost

2016-11-16 Thread Maxime Coquelin
Hi Michael, On 10/13/2016 07:50 PM, Michael S. Tsirkin wrote: Hi! So it looks like we face a problem with cross-version migration when using vhost. It's not new but became more acute with the advent of vhost user. For users to be able to migrate between different versions of the hypervisor the

Re: [Qemu-devel] [PATCH v6 0/3] IOMMU: intel_iommu support map and unmap notifications

2016-11-16 Thread Michael S. Tsirkin
On Wed, Nov 16, 2016 at 01:03:14PM -0700, Alex Williamson wrote: > On Wed, 16 Nov 2016 21:50:46 +0200 > "Aviv B.D." wrote: > > > On Wed, Nov 16, 2016 at 5:34 PM, Alex Williamson > > wrote: > > > > > On Wed, 16 Nov 2016 15:54:56 +0200 > > >

Re: [Qemu-devel] [PATCH for-2.8 0/3] virtio fixes

2016-11-16 Thread Michael S. Tsirkin
On Wed, Nov 16, 2016 at 03:03:13PM -0500, Farhan Ali wrote: > Hi Paolo, > > I was able to test your patches in our s390 environment. I don't see the > qemu crashes anymore which I noticed before. > > Testing a guest running high stress I/O workload, without iothreads does > show a delay in guest

Re: [Qemu-devel] [PATCH v2] hw/isa/lpc_ich9: inject SMI on all VCPUs if APM_STS == 'Q'

2016-11-16 Thread Michael S. Tsirkin
On Wed, Nov 16, 2016 at 06:37:30PM +0100, Laszlo Ersek wrote: > On 11/16/16 13:47, Paolo Bonzini wrote: > > > >> If the consensus is that the patch is a QEMU bugfix (as opposed to a > >> feature) and that it is eligible for the currently supported upstream > >> stable branches, that's the best,

Re: [Qemu-devel] [PATCH 3/3] virtio: set ISR on dataplane notifications

2016-11-16 Thread Michael S. Tsirkin
On Wed, Nov 16, 2016 at 07:05:51PM +0100, Paolo Bonzini wrote: > Dataplane has been omitting forever the step of setting ISR when > an interrupt is raised. This caused little breakage, because the > specification actually says that ISR may not be updated in MSI mode. > > Some versions of the

[Qemu-devel] [PATCH 4/4] target-ppc: Implement bcdsetsgn. instruction

2016-11-16 Thread Jose Ricardo Ziviani
bcdsetsgn.: Decimal set sign. This instruction copies the register value to the result register but adjust the signal according to the preferred sign value. Signed-off-by: Jose Ricardo Ziviani --- target-ppc/helper.h | 1 + target-ppc/int_helper.c

[Qemu-devel] [PATCH] virtio-crypto: fix virtio_queue_set_notification() race

2016-11-16 Thread Stefan Hajnoczi
We must check for new virtqueue buffers after re-enabling notifications. This prevents the race condition where the guest added buffers just after we stopped popping the virtqueue but before we re-enabled notifications. I think the virtio-crypto code was based on virtio-net but this crucial

Re: [Qemu-devel] [PATCH 3/3] virtio: set ISR on dataplane notifications

2016-11-16 Thread Michael S. Tsirkin
On Wed, Nov 16, 2016 at 03:38:11PM -0500, Paolo Bonzini wrote: > > > +void virtio_notify_irqfd(VirtIODevice *vdev, VirtQueue *vq) > > > +{ > > > +if (!virtio_should_notify(vdev, vq)) { > > > +return; > > > +} > > > + > > > +trace_virtio_notify_irqfd(vdev, vq); > > > +

[Qemu-devel] [patch v3 09/18] tcg/ppc: Implement field extraction opcodes

2016-11-16 Thread Richard Henderson
Reviewed-by: David Gibson Signed-off-by: Richard Henderson --- tcg/ppc/tcg-target.h | 4 ++-- tcg/ppc/tcg-target.inc.c | 10 ++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/tcg/ppc/tcg-target.h b/tcg/ppc/tcg-target.h

[Qemu-devel] [PATCH 2/4] target-ppc: Implement bcdctsq. instruction

2016-11-16 Thread Jose Ricardo Ziviani
bcdctsq.: Decimal convert to signed quadword. It is possible to convert packed decimal values to signed quadwords. Signed-off-by: Jose Ricardo Ziviani --- target-ppc/helper.h | 1 + target-ppc/int_helper.c | 39

Re: [Qemu-devel] [PATCH v2] hw/isa/lpc_ich9: inject SMI on all VCPUs if APM_STS == 'Q'

2016-11-16 Thread Michael S. Tsirkin
On Wed, Nov 16, 2016 at 01:04:00PM -0500, Paolo Bonzini wrote: > > I guess that's what the next paragraph is about: > > > > > - we could have another magic 0xB2 value, which is implemented directly > > > in QEMU and sets 0xB3 to a magic value. Then OVMF can invoke it > > > after SMBASE

Re: [Qemu-devel] [PATCH] target-m68k: free TCG variables that are not

2016-11-16 Thread Richard Henderson
On 11/15/2016 11:16 PM, Laurent Vivier wrote: This is a cleanup patch. It adds call to tcg_temp_free() when it is missing. Signed-off-by: Laurent Vivier --- target-m68k/translate.c | 41 - 1 file changed, 32 insertions(+), 9

  1   2   3   >