Re: [PATCH V2] mm: Introduce GFP_PGTABLE

2019-01-15 Thread Christophe Leroy
Le 16/01/2019 à 07:21, Anshuman Khandual a écrit : All architectures have been defining their own PGALLOC_GFP as (GFP_KERNEL | __GFP_ZERO) and using it for allocating page table pages. This causes some code duplication which can be easily avoided. GFP_KERNEL allocated and cleared out pages

Re: [PATCH V2] mm: Introduce GFP_PGTABLE

2019-01-15 Thread Michal Hocko
On Wed 16-01-19 11:51:32, Anshuman Khandual wrote: > All architectures have been defining their own PGALLOC_GFP as (GFP_KERNEL | > __GFP_ZERO) and using it for allocating page table pages. This causes some > code duplication which can be easily avoided. GFP_KERNEL allocated and > cleared out pages

[PATCH V2] mm: Introduce GFP_PGTABLE

2019-01-15 Thread Anshuman Khandual
All architectures have been defining their own PGALLOC_GFP as (GFP_KERNEL | __GFP_ZERO) and using it for allocating page table pages. This causes some code duplication which can be easily avoided. GFP_KERNEL allocated and cleared out pages (__GFP_ZERO) are required for page tables on any given

Re: [RFC v3 18/21] vfio-pci: Add a new VFIO_REGION_TYPE_NESTED region type

2019-01-15 Thread Auger Eric
Hi Alex, On 1/15/19 12:04 AM, Alex Williamson wrote: > On Mon, 14 Jan 2019 21:48:06 +0100 > Auger Eric wrote: > >> Hi Alex, >> >> On 1/12/19 12:58 AM, Alex Williamson wrote: >>> On Tue, 8 Jan 2019 11:26:30 +0100 >>> Eric Auger wrote: >>> This patch adds a new 64kB region aiming to

Re: [RFC v3 04/21] vfio: VFIO_IOMMU_SET_PASID_TABLE

2019-01-15 Thread Auger Eric
Hi Alex, On 1/11/19 11:50 PM, Alex Williamson wrote: > On Tue, 8 Jan 2019 11:26:16 +0100 > Eric Auger wrote: > >> From: "Liu, Yi L" >> >> This patch adds VFIO_IOMMU_SET_PASID_TABLE ioctl which aims at >> passing the virtual iommu guest configuration to the VFIO driver >> downto to the iommu

Re: [RFC v3 14/21] iommu: introduce device fault data

2019-01-15 Thread Auger Eric
Hi Jean, On 1/11/19 12:06 PM, Jean-Philippe Brucker wrote: > On 10/01/2019 18:45, Jacob Pan wrote: >> On Tue, 8 Jan 2019 11:26:26 +0100 >> Eric Auger wrote: >> >>> From: Jacob Pan >>> >>> Device faults detected by IOMMU can be reported outside IOMMU >>> subsystem for further processing. This

Re: [RFC v3 17/21] iommu/smmuv3: Report non recoverable faults

2019-01-15 Thread Auger Eric
Hi Jean, On 1/11/19 6:46 PM, Jean-Philippe Brucker wrote: > On 08/01/2019 10:26, Eric Auger wrote: >> When a stage 1 related fault event is read from the event queue, >> let's propagate it to potential external fault listeners, ie. users >> who registered a fault handler. >> >> Signed-off-by:

Re: [PATCH] mm: Introduce GFP_PGTABLE

2019-01-15 Thread Anshuman Khandual
On 01/14/2019 12:31 PM, Michal Hocko wrote: > On Mon 14-01-19 09:30:55, Anshuman Khandual wrote: >> >> >> On 01/13/2019 11:05 PM, Michal Hocko wrote: >>> On Sat 12-01-19 15:56:38, Anshuman Khandual wrote: All architectures have been defining their own PGALLOC_GFP as (GFP_KERNEL |

[PATCH v7 7/7] iommu/virtio: Add event queue

2019-01-15 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

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

2019-01-15 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

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

2019-01-15 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

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

2019-01-15 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 ---

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

2019-01-15 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

[PATCH v7 6/7] iommu/virtio: Add probe request

2019-01-15 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

[PATCH v7 0/7] Add virtio-iommu driver

2019-01-15 Thread Jean-Philippe Brucker
Implement the virtio-iommu driver, following specification v0.9 [1]. This is a simple rebase onto Linux v5.0-rc2. We now use the dev_iommu_fwspec_get() helper introduced in v5.0 instead of accessing dev->iommu_fwspec, but there aren't any functional change from v6 [2]. Our current goal for