forked from torvalds/linux
Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
KVM: s390: pci: do initial setup for AEN interpretation
Initial setup for Adapter Event Notification Interpretation for zPCI passthrough devices. Specifically, allocate a structure for forwarding of adapter events and pass the address of this structure to firmware. Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
- Loading branch information
1 parent
b80bced
commit a4580b9cbc02e756b893862d072f264af6f8d30d
Showing
5 changed files
with
187 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| /* SPDX-License-Identifier: GPL-2.0 */ | ||
| /* | ||
| * s390 kvm PCI passthrough support | ||
| * | ||
| * Copyright IBM Corp. 2021 | ||
| * | ||
| * Author(s): Matthew Rosato <mjrosato@linux.ibm.com> | ||
| */ | ||
|
|
||
| #ifndef __KVM_S390_PCI_H | ||
| #define __KVM_S390_PCI_H | ||
|
|
||
| #include <linux/pci.h> | ||
| #include <linux/mutex.h> | ||
| #include <asm/airq.h> | ||
| #include <asm/kvm_pci.h> | ||
|
|
||
| struct zpci_gaite { | ||
| unsigned int gisa; | ||
| u8 gisc; | ||
| u8 count; | ||
| u8 reserved; | ||
| u8 aisbo; | ||
| unsigned long aisb; | ||
| }; | ||
|
|
||
| struct zpci_aift { | ||
| struct zpci_gaite *gait; | ||
| struct airq_iv *sbv; | ||
| struct kvm_zdev **kzdev; | ||
| spinlock_t gait_lock; /* Protects the gait, used during AEN forward */ | ||
| struct mutex lock; /* Protects the other structures in aift */ | ||
| }; | ||
|
|
||
| struct zpci_aift *kvm_s390_pci_get_aift(void); | ||
|
|
||
| int kvm_s390_pci_aen_init(u8 nisc); | ||
| void kvm_s390_pci_aen_exit(void); | ||
|
|
||
| void kvm_s390_pci_init(void); | ||
|
|
||
| #endif /* __KVM_S390_PCI_H */ |