mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
s390x/pci: add routine to get host function handle from CLP info
In order to interface with the underlying host zPCI device, we need to know its function handle. Add a routine to grab this from the vfio CLP capabilities chain. Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com> Reviewed-by: Pierre Morel <pmorel@linux.ibm.com> Message-Id: <20220902172737.170349-3-mjrosato@linux.ibm.com> [thuth: Replace free(info) with g_free(info)] Signed-off-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
parent
d525f73f91
commit
21fa15298d
2 changed files with 72 additions and 16 deletions
|
@ -20,6 +20,7 @@ bool s390_pci_update_dma_avail(int fd, unsigned int *avail);
|
|||
S390PCIDMACount *s390_pci_start_dma_count(S390pciState *s,
|
||||
S390PCIBusDevice *pbdev);
|
||||
void s390_pci_end_dma_count(S390pciState *s, S390PCIDMACount *cnt);
|
||||
bool s390_pci_get_host_fh(S390PCIBusDevice *pbdev, uint32_t *fh);
|
||||
void s390_pci_get_clp_info(S390PCIBusDevice *pbdev);
|
||||
#else
|
||||
static inline bool s390_pci_update_dma_avail(int fd, unsigned int *avail)
|
||||
|
@ -33,6 +34,10 @@ static inline S390PCIDMACount *s390_pci_start_dma_count(S390pciState *s,
|
|||
}
|
||||
static inline void s390_pci_end_dma_count(S390pciState *s,
|
||||
S390PCIDMACount *cnt) { }
|
||||
static inline bool s390_pci_get_host_fh(S390PCIBusDevice *pbdev, uint32_t *fh)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
static inline void s390_pci_get_clp_info(S390PCIBusDevice *pbdev) { }
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue