mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
s390x/pci: Add routine to get the vfio dma available count
Create new files for separating out vfio-specific work for s390 pci. Add the first such routine, which issues VFIO_IOMMU_GET_INFO ioctl to collect the current dma available count. Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com> Reviewed-by: Cornelia Huck <cohuck@redhat.com> [aw: Fix non-Linux build with CONFIG_LINUX] Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
This commit is contained in:
parent
7486a62845
commit
cd7498d07f
3 changed files with 79 additions and 0 deletions
24
include/hw/s390x/s390-pci-vfio.h
Normal file
24
include/hw/s390x/s390-pci-vfio.h
Normal file
|
@ -0,0 +1,24 @@
|
|||
/*
|
||||
* s390 vfio-pci interfaces
|
||||
*
|
||||
* Copyright 2020 IBM Corp.
|
||||
* Author(s): Matthew Rosato <mjrosato@linux.ibm.com>
|
||||
*
|
||||
* This work is licensed under the terms of the GNU GPL, version 2 or (at
|
||||
* your option) any later version. See the COPYING file in the top-level
|
||||
* directory.
|
||||
*/
|
||||
|
||||
#ifndef HW_S390_PCI_VFIO_H
|
||||
#define HW_S390_PCI_VFIO_H
|
||||
|
||||
#ifdef CONFIG_LINUX
|
||||
bool s390_pci_update_dma_avail(int fd, unsigned int *avail);
|
||||
#else
|
||||
static inline bool s390_pci_update_dma_avail(int fd, unsigned int *avail)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue