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

2018-11-22 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. Reviewed-by: Eric Auger Signed-off-by: Jean-Philippe Brucker ---

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

2018-11-22 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. All

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

2018-11-22 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 correspondi

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

2018-11-22 Thread Jean-Philippe Brucker
Implement the virtio-iommu driver, following specification v0.9 [1]. Since v4 [2] I fixed the issues reported by Eric, and added Reviewed-by from Eric and Rob. Thanks! I changed the specification to fix one inconsistency discussed in v4. That the device fills the probe buffer with zeroes is now a

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

2018-11-22 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 virt

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

2018-11-22 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 v

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

2018-11-22 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 --- drivers/pci/of.

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

2018-11-22 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 prog

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

2018-11-22 Thread Michael S. Tsirkin
On Wed, Nov 21, 2018 at 10:04:53PM +0200, Sameeh Jubran wrote: > On Wed, Nov 21, 2018 at 8:41 PM Michael S. Tsirkin wrote: > > > > Great to see you making progress on this! > > Some comments below: > > > > On Wed, Nov 21, 2018 at 05:39:38PM +0200, Sameeh Jubran wrote: > > > I have created a setup

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

2018-11-22 Thread Sameeh Jubran
On Thu, Nov 22, 2018 at 1:51 AM Samudrala, Sridhar wrote: > > On 11/21/2018 12:04 PM, Sameeh Jubran wrote: > > On Wed, Nov 21, 2018 at 8:41 PM Michael S. Tsirkin wrote: > >> Great to see you making progress on this! > >> Some comments below: > >> > >> On Wed, Nov 21, 2018 at 05:39:38PM +0200, Sam