diff options
author | Matthew Rosato <mjrosato@linux.ibm.com> | 2022-06-06 16:33:17 -0400 |
---|---|---|
committer | Christian Borntraeger <borntraeger@linux.ibm.com> | 2022-07-11 09:54:29 +0200 |
commit | 73f91b004321f2510fa79e66035dbbf1870fcf56 (patch) | |
tree | 58792a03de492f7160967303e99ff76956fa0fd0 /arch/s390/kvm/pci.h | |
parent | KVM: s390: pci: do initial setup for AEN interpretation (diff) | |
download | linux-dev-73f91b004321f2510fa79e66035dbbf1870fcf56.tar.xz linux-dev-73f91b004321f2510fa79e66035dbbf1870fcf56.zip |
KVM: s390: pci: enable host forwarding of Adapter Event Notifications
In cases where interrupts are not forwarded to the guest via firmware,
KVM is responsible for ensuring delivery. When an interrupt presents
with the forwarding bit, we must process the forwarding tables until
all interrupts are delivered.
Reviewed-by: Christian Borntraeger <borntraeger@linux.ibm.com>
Reviewed-by: Pierre Morel <pmorel@linux.ibm.com>
Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
Link: https://lore.kernel.org/r/20220606203325.110625-14-mjrosato@linux.ibm.com
Signed-off-by: Christian Borntraeger <borntraeger@linux.ibm.com>
Diffstat (limited to 'arch/s390/kvm/pci.h')
-rw-r--r-- | arch/s390/kvm/pci.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/s390/kvm/pci.h b/arch/s390/kvm/pci.h index c357d900f8b0..9f7828d97605 100644 --- a/arch/s390/kvm/pci.h +++ b/arch/s390/kvm/pci.h @@ -13,6 +13,7 @@ #include <linux/kvm_host.h> #include <linux/pci.h> #include <linux/mutex.h> +#include <linux/kvm_host.h> #include <asm/airq.h> #include <asm/cpu.h> @@ -40,6 +41,15 @@ struct zpci_aift { extern struct zpci_aift *aift; +static inline struct kvm *kvm_s390_pci_si_to_kvm(struct zpci_aift *aift, + unsigned long si) +{ + if (!IS_ENABLED(CONFIG_VFIO_PCI_ZDEV_KVM) || aift->kzdev == 0 || + aift->kzdev[si] == 0) + return 0; + return aift->kzdev[si]->kvm; +}; + int kvm_s390_pci_aen_init(u8 nisc); void kvm_s390_pci_aen_exit(void); |