Re: [PATCH 1/2] dma-mapping: add a dma_ops_bypass flag to struct device

2020-03-22 Thread Alexey Kardashevskiy
On 21/03/2020 01:16, Christoph Hellwig wrote: > Several IOMMU drivers have a bypass mode where they can use a direct > mapping if the devices DMA mask is large enough. Add generic support > to the core dma-mapping code to do that to switch those drivers to > a common solution. > > Signed-off-b

Re: [PATCH v1 4/8] vfio: Check nesting iommu uAPI version

2020-03-22 Thread kbuild test robot
option to specify the base tree in git format-patch, please see https://stackoverflow.com/a/37406982] url: https://github.com/0day-ci/linux/commits/Liu-Yi-L/vfio-expose-virtual-Shared-Virtual-Addressing-to-VMs/20200322-213259 base: https://github.com/awilliam/linux-vfio.git next config: arm64

Re: [PATCH v1 6/8] vfio/type1: Bind guest page tables to host

2020-03-22 Thread kbuild test robot
option to specify the base tree in git format-patch, please see https://stackoverflow.com/a/37406982] url: https://github.com/0day-ci/linux/commits/Liu-Yi-L/vfio-expose-virtual-Shared-Virtual-Addressing-to-VMs/20200322-213259 base: https://github.com/awilliam/linux-vfio.git next config: arm64

Re: [PATCH v1 2/8] vfio/type1: Add vfio_iommu_type1 parameter for quota tuning

2020-03-22 Thread kbuild test robot
option to specify the base tree in git format-patch, please see https://stackoverflow.com/a/37406982] url: https://github.com/0day-ci/linux/commits/Liu-Yi-L/vfio-expose-virtual-Shared-Virtual-Addressing-to-VMs/20200322-213259 base: https://github.com/awilliam/linux-vfio.git next config: arm64

Re: [PATCH v1 5/8] vfio/type1: Report 1st-level/stage-1 format to userspace

2020-03-22 Thread kbuild test robot
option to specify the base tree in git format-patch, please see https://stackoverflow.com/a/37406982] url: https://github.com/0day-ci/linux/commits/Liu-Yi-L/vfio-expose-virtual-Shared-Virtual-Addressing-to-VMs/20200322-213259 base: https://github.com/awilliam/linux-vfio.git next config: arm64

Re: [PATCH v1 1/8] vfio: Add VFIO_IOMMU_PASID_REQUEST(alloc/free)

2020-03-22 Thread kbuild test robot
27; option to specify the base tree in git format-patch, please see https://stackoverflow.com/a/37406982] url: https://github.com/0day-ci/linux/commits/Liu-Yi-L/vfio-expose-virtual-Shared-Virtual-Addressing-to-VMs/20200322-213259 base: https://github.com/awilliam/linux-vfio.git next con

[PATCH v1 1/2] vfio/pci: Expose PCIe PASID capability to guest

2020-03-22 Thread Liu, Yi L
From: Liu Yi L This patch exposes PCIe PASID capability to guest. Existing vfio_pci driver hides it from guest by setting the capability length as 0 in pci_ext_cap_length[]. This capability is required for vSVA enabling on pass-through PCIe devices. Cc: Kevin Tian CC: Jacob Pan Cc: Alex Willi

[PATCH v1 0/2] vfio/pci: expose device's PASID capability to VMs

2020-03-22 Thread Liu, Yi L
From: Liu Yi L Shared Virtual Addressing (SVA), a.k.a, Shared Virtual Memory (SVM) on Intel platforms allows address space sharing between device DMA and applications. SVA can reduce programming complexity and enhance security. To enable SVA, device needs to have PASID capability, which is a key

[PATCH v1 2/2] vfio/pci: Emulate PASID/PRI capability for VFs

2020-03-22 Thread Liu, Yi L
From: Liu Yi L Per PCIe r5.0, sec 9.3.7.14, if a PF implements the PASID Capability, the PF PASID configuration is shared by its VFs. VFs must not implement their own PASID Capability. Per PCIe r5.0, sec 9.3.7.11, VFs must not implement the PRI Capability. If the PF implements PRI, it is shared

[PATCH v1 3/8] vfio/type1: Report PASID alloc/free support to userspace

2020-03-22 Thread Liu, Yi L
From: Liu Yi L This patch reports PASID alloc/free availability to userspace (e.g. QEMU) thus userspace could do a pre-check before utilizing this feature. Cc: Kevin Tian CC: Jacob Pan Cc: Alex Williamson Cc: Eric Auger Cc: Jean-Philippe Brucker Signed-off-by: Liu Yi L --- drivers/vfio/vf

[PATCH v1 5/8] vfio/type1: Report 1st-level/stage-1 format to userspace

2020-03-22 Thread Liu, Yi L
From: Liu Yi L VFIO exposes IOMMU nesting translation (a.k.a dual stage translation) capability to userspace. Thus applications like QEMU could support vIOMMU with hardware's nesting translation capability for pass-through devices. Before setting up nesting translation for pass-through devices, Q

[PATCH v1 0/8] vfio: expose virtual Shared Virtual Addressing to VMs

2020-03-22 Thread Liu, Yi L
From: Liu Yi L Shared Virtual Addressing (SVA), a.k.a, Shared Virtual Memory (SVM) on Intel platforms allows address space sharing between device DMA and applications. SVA can reduce programming complexity and enhance security. This VFIO series is intended to expose SVA usage to VMs. i.e. Sharin

[PATCH v1 2/8] vfio/type1: Add vfio_iommu_type1 parameter for quota tuning

2020-03-22 Thread Liu, Yi L
From: Liu Yi L This patch adds a module option to make the PASID quota tunable by administrator. TODO: needs to think more on how to make the tuning to be per-process. Previous discussions: https://patchwork.kernel.org/patch/11209429/ Cc: Kevin Tian CC: Jacob Pan Cc: Alex Williamson Cc: Er

[PATCH v1 7/8] vfio/type1: Add VFIO_IOMMU_CACHE_INVALIDATE

2020-03-22 Thread Liu, Yi L
From: Liu Yi L For VFIO IOMMUs with the type VFIO_TYPE1_NESTING_IOMMU, guest "owns" the first-level/stage-1 translation structures, the host IOMMU driver has no knowledge of first-level/stage-1 structure cache updates unless the guest invalidation requests are trapped and propagated to the host.

[PATCH v1 4/8] vfio: Check nesting iommu uAPI version

2020-03-22 Thread Liu, Yi L
From: Liu Yi L In Linux Kernel, the IOMMU nesting translation (a.k.a dual stage address translation) capability is abstracted in uapi/iommu.h, in which the uAPIs like bind_gpasid/iommu_cache_invalidate/fault_report/pgreq_resp are defined. VFIO_TYPE1_NESTING_IOMMU stands for the vfio iommu type w

[PATCH v1 8/8] vfio/type1: Add vSVA support for IOMMU-backed mdevs

2020-03-22 Thread Liu, Yi L
From: Liu Yi L Recent years, mediated device pass-through framework (e.g. vfio-mdev) are used to achieve flexible device sharing across domains (e.g. VMs). Also there are hardware assisted mediated pass-through solutions from platform vendors. e.g. Intel VT-d scalable mode which supports Intel Sc

[PATCH v1 1/8] vfio: Add VFIO_IOMMU_PASID_REQUEST(alloc/free)

2020-03-22 Thread Liu, Yi L
From: Liu Yi L For a long time, devices have only one DMA address space from platform IOMMU's point of view. This is true for both bare metal and directed- access in virtualization environment. Reason is the source ID of DMA in PCIe are BDF (bus/dev/fnc ID), which results in only device granulari

[PATCH v1 6/8] vfio/type1: Bind guest page tables to host

2020-03-22 Thread Liu, Yi L
From: Liu Yi L VFIO_TYPE1_NESTING_IOMMU is an IOMMU type which is backed by hardware IOMMUs that have nesting DMA translation (a.k.a dual stage address translation). For such hardware IOMMUs, there are two stages/levels of address translation, and software may let userspace/VM to own the first- l