[PATCH v3 1/3] s390: pci: Exporting access to CLP PCI function and PCI group

2019-05-23 Thread Pierre Morel
PCI code and prefix the two functions with "zdev" to make clear that they can be called knowing only the associated zdevice. Signed-off-by: Pierre Morel Reviewed-by: Sebastian Ott --- arch/s390/include/asm/pci.h | 3 ++ arch/s390/pci/pci_clp.

[PATCH v3 0/3] Retrieving zPCI specific info with VFIO

2019-05-23 Thread Pierre Morel
e replaced with calls to zdev_query_pci_fn() and zdev_query_pci_fngrp() using a zdev pointer as argument. Pierre Morel (3): s390: pci: Exporting access to CLP PCI function and PCI group vfio: zpci: defining the VFIO headers vfio: pci: Using a device region to retrieve zPCI information arch/s3

[PATCH v3 2/3] vfio: zpci: defining the VFIO headers

2019-05-23 Thread Pierre Morel
We define a new device region in vfio.h to be able to get the ZPCI CLP information by reading this region from userland. We create a new file, vfio_zdev.h to define the structure of the new region we defined in vfio.h Signed-off-by: Pierre Morel --- include/uapi/linux/vfio.h | 4

[PATCH v3 3/3] vfio: pci: Using a device region to retrieve zPCI information

2019-05-23 Thread Pierre Morel
-by: Pierre Morel --- drivers/vfio/pci/Kconfig| 7 drivers/vfio/pci/Makefile | 1 + drivers/vfio/pci/vfio_pci.c | 9 drivers/vfio/pci/vfio_pci_private.h | 10 + drivers/vfio/pci/vfio_pci_zdev.c| 83 + 5 files

Re: [PATCH v2 4/4] vfio: vfio_iommu_type1: implement VFIO_IOMMU_INFO_CAPABILITIES

2019-05-21 Thread Pierre Morel
On 21/05/2019 16:59, Alex Williamson wrote: On Tue, 21 May 2019 11:14:38 +0200 Pierre Morel wrote: On 20/05/2019 20:23, Alex Williamson wrote: On Mon, 20 May 2019 18:31:08 +0200 Pierre Morel wrote: On 20/05/2019 16:27, Cornelia Huck wrote: On Mon, 20 May 2019 13:19:23 +0200 Pierre

Re: [PATCH v2 4/4] vfio: vfio_iommu_type1: implement VFIO_IOMMU_INFO_CAPABILITIES

2019-05-21 Thread Pierre Morel
On 21/05/2019 13:11, Cornelia Huck wrote: On Tue, 21 May 2019 11:14:38 +0200 Pierre Morel wrote: 1) A short description, of zPCI functions and groups IN Z, PCI cards, leave behind an adapter between subchannels and PCI. We access PCI cards through 2 ways: - dedicated PCI instructions

Re: [PATCH v2 4/4] vfio: vfio_iommu_type1: implement VFIO_IOMMU_INFO_CAPABILITIES

2019-05-21 Thread Pierre Morel
On 20/05/2019 20:23, Alex Williamson wrote: On Mon, 20 May 2019 18:31:08 +0200 Pierre Morel wrote: On 20/05/2019 16:27, Cornelia Huck wrote: On Mon, 20 May 2019 13:19:23 +0200 Pierre Morel wrote: On 17/05/2019 20:04, Pierre Morel wrote: On 17/05/2019 18:41, Alex Williamson wrote

Re: [PATCH v2 4/4] vfio: vfio_iommu_type1: implement VFIO_IOMMU_INFO_CAPABILITIES

2019-05-20 Thread Pierre Morel
On 20/05/2019 16:27, Cornelia Huck wrote: On Mon, 20 May 2019 13:19:23 +0200 Pierre Morel wrote: On 17/05/2019 20:04, Pierre Morel wrote: On 17/05/2019 18:41, Alex Williamson wrote: On Fri, 17 May 2019 18:16:50 +0200 Pierre Morel wrote: We implement the capability interface

Re: [PATCH v2 4/4] vfio: vfio_iommu_type1: implement VFIO_IOMMU_INFO_CAPABILITIES

2019-05-20 Thread Pierre Morel
On 17/05/2019 20:04, Pierre Morel wrote: On 17/05/2019 18:41, Alex Williamson wrote: On Fri, 17 May 2019 18:16:50 +0200 Pierre Morel wrote: We implement the capability interface for VFIO_IOMMU_GET_INFO. When calling the ioctl, the user must specify VFIO_IOMMU_INFO_CAPABILITIES to retrieve

Re: [PATCH v2 4/4] vfio: vfio_iommu_type1: implement VFIO_IOMMU_INFO_CAPABILITIES

2019-05-17 Thread Pierre Morel
On 17/05/2019 18:41, Alex Williamson wrote: On Fri, 17 May 2019 18:16:50 +0200 Pierre Morel wrote: We implement the capability interface for VFIO_IOMMU_GET_INFO. When calling the ioctl, the user must specify VFIO_IOMMU_INFO_CAPABILITIES to retrieve the capabilities and must check

[PATCH v2 3/4] s390: iommu: Adding get attributes for s390_iommu

2019-05-17 Thread Pierre Morel
attributes DOMAIN_ATTR_ZPCI_GRP_SIZE: the size of the Z-PCI function group attributes DOMAIN_ATTR_ZPCI_FN: the Z-PCI function attributes DOMAIN_ATTR_ZPCI_GRP: the Z-PCI function group attributes Signed-off-by: Pierre Morel --- drivers/iommu/s390-iommu.c | 77 ++ inc

[PATCH v2 0/4] Retrieving zPCI specific info with VFIO

2019-05-17 Thread Pierre Morel
calls to clp_query_pci_fn() and clp_query_pci_fngrp() are replaced with calls to zdev_query_pci_fn() and zdev_query_pci_fngrp() using a zdev pointer as argument. Pierre Morel (4): s390: pci: Exporting access to CLP PCI function and PCI group vfio: vfio_iommu_type1: Define

[PATCH v2 4/4] vfio: vfio_iommu_type1: implement VFIO_IOMMU_INFO_CAPABILITIES

2019-05-17 Thread Pierre Morel
new capabilities in the same way after enhancing the architecture specific IOMMU driver. Signed-off-by: Pierre Morel --- drivers/vfio/vfio_iommu_type1.c | 122 +++- 1 file changed, 121 insertions(+), 1 deletion(-) diff --git a/drivers/vfio/vfio_iommu_type1.c b

[PATCH v2 2/4] vfio: vfio_iommu_type1: Define VFIO_IOMMU_INFO_CAPABILITIES

2019-05-17 Thread Pierre Morel
: to query Z-PCI function information VFIO_IOMMU_INFO_CAP_QGRP: to query for Z-PCI group information and we define the associated information structures. Signed-off-by: Pierre Morel --- include/uapi/linux/vfio.h | 67 +++ 1 file changed, 67 insertions

[PATCH v2 1/4] s390: pci: Exporting access to CLP PCI function and PCI group

2019-05-17 Thread Pierre Morel
PCI code and prefix the two functions with "zdev" to make clear that they can be called knowing only the associated zdevice. Signed-off-by: Pierre Morel Reviewed-by: Sebastian Ott --- arch/s390/include/asm/pci.h | 3 ++ arch/s390/pci/pci_clp.

Re: [PATCH 4/4] vfio: vfio_iommu_type1: implement VFIO_IOMMU_INFO_CAPABILITIES

2019-05-17 Thread Pierre Morel
On 16/05/2019 20:40, Alex Williamson wrote: On Fri, 10 May 2019 10:22:35 +0200 Pierre Morel wrote: We implement a capability intercafe for VFIO_IOMMU_GET_INFO and add the first capability: VFIO_IOMMU_INFO_CAPABILITIES. When calling the ioctl, the user must specify

Re: [PATCH 2/4] vfio: vfio_iommu_type1: Define VFIO_IOMMU_INFO_CAPABILITIES

2019-05-17 Thread Pierre Morel
On 16/05/2019 20:31, Alex Williamson wrote: On Fri, 10 May 2019 10:22:33 +0200 Pierre Morel wrote: To use the VFIO_IOMMU_GET_INFO to retrieve IOMMU specific information, we define a new flag VFIO_IOMMU_INFO_CAPABILITIES in the vfio_iommu_type1_info structure and the associated capability

Re: [PATCH 1/4] s390: pci: Exporting access to CLP PCI function and PCI group

2019-05-10 Thread Pierre Morel
On 10/05/2019 12:21, Robin Murphy wrote: On 10/05/2019 09:22, Pierre Morel wrote: For the generic implementation of VFIO PCI we need to retrieve the hardware configuration for the PCI functions and the PCI function groups. We modify the internal function using CLP Query PCI function and CLP

[PATCH 0/4] Retrieving zPCI specific info with VFIO

2019-05-10 Thread Pierre Morel
() and the previous calls to clp_query_pci_fn() and clp_query_pci_fngrp() are replaced with calls to zdev_query_pci_fn() and zdev_query_pci_fngrp() using a zdev pointer as argument. These two functions are exported to be used from out of the s390_iommu code. Pierre Morel (4): s390: pci: Exporting access to CLP

[PATCH 1/4] s390: pci: Exporting access to CLP PCI function and PCI group

2019-05-10 Thread Pierre Morel
PCI code and prefix the two functions with "zdev" to make clear that they can be called knowing only the associated zdevice. Signed-off-by: Pierre Morel Reviewed-by: Sebastian Ott --- arch/s390/include/asm/pci.h | 3 ++ arch/s390/pci/pci_clp.

[PATCH 3/4] s390: iommu: Adding get attributes for s390_iommu

2019-05-10 Thread Pierre Morel
We add "get attributes" to the S390 iommu operations to retrieve the S390 specific attributes through the call of zPCI dedicated CLP functions. Signed-off-by: Pierre Morel --- drivers/iommu/s390-iommu.c | 77 ++ include/linux/iommu.h |

[PATCH 2/4] vfio: vfio_iommu_type1: Define VFIO_IOMMU_INFO_CAPABILITIES

2019-05-10 Thread Pierre Morel
To use the VFIO_IOMMU_GET_INFO to retrieve IOMMU specific information, we define a new flag VFIO_IOMMU_INFO_CAPABILITIES in the vfio_iommu_type1_info structure and the associated capability information block. Signed-off-by: Pierre Morel --- include/uapi/linux/vfio.h | 10 ++ 1 file

Re: [PATCH v1] iommu/s390: Declare s390 iommu reserved regions

2019-01-21 Thread Pierre Morel
On 18/01/2019 14:51, Jean-Philippe Brucker wrote: Hi Pierre, On 18/01/2019 13:29, Pierre Morel wrote: On 17/01/2019 14:02, Robin Murphy wrote: On 15/01/2019 17:37, Pierre Morel wrote: The s390 iommu can only allow DMA transactions between the zPCI device entries start_dma and end_dma

Re: [PATCH v1] iommu/s390: Declare s390 iommu reserved regions

2019-01-18 Thread Pierre Morel
On 17/01/2019 14:02, Robin Murphy wrote: On 15/01/2019 17:37, Pierre Morel wrote: The s390 iommu can only allow DMA transactions between the zPCI device entries start_dma and end_dma. Let's declare the regions before start_dma and after end_dma as reserved regions using the appropriate

Re: [PATCH v1] iommu/s390: Declare s390 iommu reserved regions

2019-01-17 Thread Pierre Morel
On 17/01/2019 10:23, Shameerali Kolothum Thodi wrote: Hi Pierre, -Original Message- From: Pierre Morel [mailto:pmo...@linux.ibm.com] Sent: 15 January 2019 17:37 To: gerald.schae...@de.ibm.com Cc: j...@8bytes.org; linux-s...@vger.kernel.org; iommu@lists.linux-foundation.org; linux-ker

[PATCH v1] iommu/s390: Declare s390 iommu reserved regions

2019-01-15 Thread Pierre Morel
The s390 iommu can only allow DMA transactions between the zPCI device entries start_dma and end_dma. Let's declare the regions before start_dma and after end_dma as reserved regions using the appropriate callback in iommu_ops. Signed-off-by: Pierre Morel --- drivers/iommu/s390-iommu.c | 29

[PATCH v1] iommu/s390: Declare s390 iommu reserved regions

2019-01-15 Thread Pierre Morel
the vfio iommu internal interface. This seems to me related with the work Shameer has started on vfio_iommu_type1 so I add Alex and Shameer to the CC list. Pierre Morel (1): iommu/s390: Declare s390 iommu reserved regions drivers/iommu/s390-iommu.c | 29 + 1 file changed