KVM: s390: pci: Hook to access KVM lowlevel from VFIO
authorPierre Morel <pmorel@linux.ibm.com>
Fri, 19 Aug 2022 12:29:45 +0000 (14:29 +0200)
committerJanosch Frank <frankja@linux.ibm.com>
Mon, 29 Aug 2022 11:29:28 +0000 (13:29 +0200)
commitca922fecda6caa5162409406dc3b663062d75089
treecc9d7611856a91bfa5465f22061dd36faee3d638
parentb90cb1053190353cc30f0fef0ef1f378ccc063c5
KVM: s390: pci: Hook to access KVM lowlevel from VFIO

We have a cross dependency between KVM and VFIO when using
s390 vfio_pci_zdev extensions for PCI passthrough
To be able to keep both subsystem modular we add a registering
hook inside the S390 core code.

This fixes a build problem when VFIO is built-in and KVM is built
as a module.

Reported-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: kernel test robot <lkp@intel.com>
Reviewed-by: Matthew Rosato <mjrosato@linux.ibm.com>
Reviewed-by: Niklas Schnelle <schnelle@linux.ibm.com>
Signed-off-by: Pierre Morel <pmorel@linux.ibm.com>
Fixes: 09340b2fca007 ("KVM: s390: pci: add routines to start/stop interpretive execution")
Cc: <stable@vger.kernel.org>
Acked-by: Janosch Frank <frankja@linux.ibm.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
Link: https://lore.kernel.org/r/20220819122945.9309-1-pmorel@linux.ibm.com
Message-Id: <20220819122945.9309-1-pmorel@linux.ibm.com>
Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
arch/s390/include/asm/kvm_host.h
arch/s390/kvm/pci.c
arch/s390/pci/Makefile
arch/s390/pci/pci_kvm_hook.c [new file with mode: 0644]
drivers/vfio/pci/vfio_pci_zdev.c