[virtio-dev] Re: [PATCH v6 0/7] Add virtio-iommu driver

2018-12-11 Thread Jean-Philippe Brucker
On 11/12/2018 18:31, Christoph Hellwig wrote: > On Tue, Dec 11, 2018 at 06:20:57PM +, Jean-Philippe Brucker wrote: >> Implement the virtio-iommu driver, following specification v0.9 [1]. >> >> Only minor changes since v5 [2]. I fixed issues reported by Michael and >> added tags from Eric and

[virtio-dev] [PATCH v6 5/7] iommu: Add virtio-iommu driver

2018-12-11 Thread Jean-Philippe Brucker
The virtio IOMMU is a para-virtualized device, allowing to send IOMMU requests such as map/unmap over virtio transport without emulating page tables. This implementation handles ATTACH, DETACH, MAP and UNMAP requests. The bulk of the code transforms calls coming from the IOMMU API into

[virtio-dev] [PATCH v6 7/7] iommu/virtio: Add event queue

2018-12-11 Thread Jean-Philippe Brucker
The event queue offers a way for the device to report access faults from endpoints. It is implemented on virtqueue #1. Whenever the host needs to signal a fault, it fills one of the buffers offered by the guest and interrupts it. Tested-by: Bharat Bhushan Tested-by: Eric Auger Reviewed-by: Eric

[virtio-dev] [PATCH v6 6/7] iommu/virtio: Add probe request

2018-12-11 Thread Jean-Philippe Brucker
When the device offers the probe feature, send a probe request for each device managed by the IOMMU. Extract RESV_MEM information. When we encounter a MSI doorbell region, set it up as a IOMMU_RESV_MSI region. This will tell other subsystems that there is no need to map the MSI doorbell in the

[virtio-dev] [PATCH v6 3/7] of: Allow the iommu-map property to omit untranslated devices

2018-12-11 Thread Jean-Philippe Brucker
In PCI root complex nodes, the iommu-map property describes the IOMMU that translates each endpoint. On some platforms, the IOMMU itself is presented as a PCI endpoint (e.g. AMD IOMMU and virtio-iommu). This isn't supported by the current OF driver, which expects all endpoints to have an IOMMU.

[virtio-dev] [PATCH v6 4/7] PCI: OF: Initialize dev->fwnode appropriately

2018-12-11 Thread Jean-Philippe Brucker
For PCI devices that have an OF node, set the fwnode as well. This way drivers that rely on fwnode don't need the special case described by commit f94277af03ea ("of/platform: Initialise dev->fwnode appropriately"). Acked-by: Bjorn Helgaas Signed-off-by: Jean-Philippe Brucker ---

[virtio-dev] [PATCH v6 2/7] dt-bindings: virtio: Add virtio-pci-iommu node

2018-12-11 Thread Jean-Philippe Brucker
Some systems implement virtio-iommu as a PCI endpoint. The operating system needs to discover the relationship between IOMMU and masters long before the PCI endpoint gets probed. Add a PCI child node to describe the virtio-iommu device. The virtio-pci-iommu is conceptually split between a PCI

[virtio-dev] [PATCH v6 1/7] dt-bindings: virtio-mmio: Add IOMMU description

2018-12-11 Thread Jean-Philippe Brucker
The nature of a virtio-mmio node is discovered by the virtio driver at probe time. However the DMA relation between devices must be described statically. When a virtio-mmio node is a virtio-iommu device, it needs an "#iommu-cells" property as specified by bindings/iommu/iommu.txt. Otherwise, the

[virtio-dev] [PATCH v6 0/7] Add virtio-iommu driver

2018-12-11 Thread Jean-Philippe Brucker
Implement the virtio-iommu driver, following specification v0.9 [1]. Only minor changes since v5 [2]. I fixed issues reported by Michael and added tags from Eric and Bharat. Thanks! You can find Linux driver and kvmtool device on v0.9 branches [3], module and x86 support on virtio-iommu/devel.

[virtio-dev] Re: [PATCH v5 5/7] iommu: Add virtio-iommu driver

2018-12-11 Thread Jean-Philippe Brucker
On 10/12/2018 22:53, Michael S. Tsirkin wrote: > On Mon, Dec 10, 2018 at 03:06:47PM +, Jean-Philippe Brucker wrote: >> On 27/11/2018 18:53, Michael S. Tsirkin wrote: >>> On Tue, Nov 27, 2018 at 06:10:46PM +, Jean-Philippe Brucker wrote: On 27/11/2018 18:04, Michael S. Tsirkin wrote:

Re: [virtio-dev] [PATCH v4] content: Introduce VIRTIO_NET_F_STANDBY feature

2018-12-11 Thread Sameeh Jubran
On Mon, Dec 10, 2018 at 7:46 PM Michael S. Tsirkin wrote: > > On Mon, Dec 10, 2018 at 05:34:53PM +0200, Sameeh Jubran wrote: > > On Mon, Dec 10, 2018 at 5:13 PM Sameeh Jubran wrote: > > > > > > On Sat, Dec 8, 2018 at 3:54 AM si-wei liu wrote: > > > > > > > > > > > > > > > > On 12/05/2018 08:18

[virtio-dev] [VIRTIO RFC] content: add virtio file system device

2018-12-11 Thread Stefan Hajnoczi
The work-in-progress virtio file system device transports Linux FUSE requests between a FUSE daemon running on the host and the FUSE driver inside the guest. This is an early version of the spec that maps FUSE requests to virtqueues. No changes are needed to the FUSE request format. Multiqueue

[virtio-dev] [PATCH v11 4/7] migration: API to clear bits of guest free pages from the dirty bitmap

2018-12-11 Thread Wei Wang
This patch adds an API to clear bits corresponding to guest free pages from the dirty bitmap. Spilt the free page block if it crosses the QEMU RAMBlock boundary. Signed-off-by: Wei Wang CC: Dr. David Alan Gilbert CC: Juan Quintela CC: Michael S. Tsirkin CC: Peter Xu Reviewed-by: Peter Xu

[virtio-dev] [PATCH v11 7/7] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT

2018-12-11 Thread Wei Wang
The new feature enables the virtio-balloon device to receive hints of guest free pages from the free page vq. A notifier is registered to the migration precopy notifier chain. The notifier calls free_page_start after the migration thread syncs the dirty bitmap, so that the free page optimization

[virtio-dev] [PATCH v11 5/7] migration/ram.c: add a notifier chain for precopy

2018-12-11 Thread Wei Wang
This patch adds a notifier chain for the memory precopy. This enables various precopy optimizations to be invoked at specific places. Signed-off-by: Wei Wang CC: Dr. David Alan Gilbert CC: Juan Quintela CC: Michael S. Tsirkin CC: Peter Xu Reviewed-by: Peter Xu --- include/migration/misc.h

[virtio-dev] [PATCH v11 2/7] bitmap: bitmap_count_one_with_offset

2018-12-11 Thread Wei Wang
Count the number of 1s in a bitmap starting from an offset. Signed-off-by: Wei Wang CC: Dr. David Alan Gilbert CC: Juan Quintela CC: Michael S. Tsirkin Reviewed-by: Dr. David Alan Gilbert --- include/qemu/bitmap.h | 13 + 1 file changed, 13 insertions(+) diff --git

[virtio-dev] [PATCH v11 1/7] bitmap: fix bitmap_count_one

2018-12-11 Thread Wei Wang
BITMAP_LAST_WORD_MASK(nbits) returns 0x when "nbits=0", which makes bitmap_count_one fail to handle the "nbits=0" case. It appears to be preferred to remain BITMAP_LAST_WORD_MASK identical to the kernel implementation that it is ported from. So this patch fixes bitmap_count_one to handle

[virtio-dev] [PATCH v11 0/7] virtio-balloon: free page hint support

2018-12-11 Thread Wei Wang
This is the deivce part implementation to add a new feature, VIRTIO_BALLOON_F_FREE_PAGE_HINT to the virtio-balloon device. The device receives the guest free page hints from the driver and clears the corresponding bits in the dirty bitmap, so that those free pages are not sent by the migration