linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] Retrieving zPCI specific info with VFIO
@ 2019-05-10  8:22 Pierre Morel
  2019-05-10  8:22 ` [PATCH 1/4] s390: pci: Exporting access to CLP PCI function and PCI group Pierre Morel
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Pierre Morel @ 2019-05-10  8:22 UTC (permalink / raw)
  To: sebott
  Cc: gerald.schaefer, pasic, borntraeger, walling, linux-s390, iommu,
	joro, linux-kernel, alex.williamson, kvm, schwidefsky,
	heiko.carstens

Using the PCI VFIO interface allows userland, a.k.a. QEMU, to retrieve
ZPCI specific information without knowing Z specific identifiers
like the function ID or the function handle of the zPCI function
hidden behind the PCI interface. 
  
By using the VFIO_IOMMU_GET_INFO ioctl we enter the vfio_iommu_type1
ioctl callback and can insert there the treatment for a new Z specific
capability.
  
Once in vfio_iommu_type1 we can retrieve the real iommu device,
s390_iommu and call the get_attr iommu operation's callback
in which we can retrieve the zdev device and start clp operations
to retrieve Z specific values the guest driver is concerned with.
 
To share the code with arch/s390/pci/pci_clp.c the original functions
in pci_clp.c to query PCI functions and PCI functions group are
modified so that they can be exported.

A new function clp_query_pci() replaces clp_query_pci_fn() 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 PCI function and PCI group
  vfio: vfio_iommu_type1: Define VFIO_IOMMU_INFO_CAPABILITIES
  s390: iommu: Adding get attributes for s390_iommu
  vfio: vfio_iommu_type1: implement VFIO_IOMMU_INFO_CAPABILITIES

 arch/s390/include/asm/pci.h     |  3 ++
 arch/s390/pci/pci_clp.c         | 72 ++++++++++++++++---------------
 drivers/iommu/s390-iommu.c      | 77 +++++++++++++++++++++++++++++++++
 drivers/vfio/vfio_iommu_type1.c | 95 ++++++++++++++++++++++++++++++++++++++++-
 include/linux/iommu.h           |  4 ++
 include/uapi/linux/vfio.h       | 10 +++++
 6 files changed, 226 insertions(+), 35 deletions(-)

-- 
2.7.4


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2019-05-17  8:18 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-10  8:22 [PATCH 0/4] Retrieving zPCI specific info with VFIO Pierre Morel
2019-05-10  8:22 ` [PATCH 1/4] s390: pci: Exporting access to CLP PCI function and PCI group Pierre Morel
2019-05-10 10:21   ` Robin Murphy
2019-05-10 14:45     ` Pierre Morel
2019-05-10  8:22 ` [PATCH 2/4] vfio: vfio_iommu_type1: Define VFIO_IOMMU_INFO_CAPABILITIES Pierre Morel
2019-05-16 14:57   ` Christian Borntraeger
2019-05-16 18:54     ` Alex Williamson
2019-05-16 18:31   ` Alex Williamson
2019-05-17  8:18     ` Pierre Morel
2019-05-10  8:22 ` [PATCH 3/4] s390: iommu: Adding get attributes for s390_iommu Pierre Morel
2019-05-10  8:22 ` [PATCH 4/4] vfio: vfio_iommu_type1: implement VFIO_IOMMU_INFO_CAPABILITIES Pierre Morel
2019-05-16 18:40   ` Alex Williamson
2019-05-17  8:17     ` Pierre Morel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).