mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
s390x/pci: enable adapter event notification for interpreted devices
Use the associated kvm ioctl operation to enable adapter event notification and forwarding for devices when requested. This feature will be set up with or without firmware assist based upon the 'forwarding_assist' setting. Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com> Message-Id: <20220902172737.170349-6-mjrosato@linux.ibm.com> [thuth: Rename "forwarding_assist" property to "forwarding-assist"] Signed-off-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
parent
15d0e7942d
commit
d0bc7091c2
5 changed files with 100 additions and 5 deletions
|
@ -351,6 +351,7 @@ struct S390PCIBusDevice {
|
|||
bool pci_unplug_request_processed;
|
||||
bool unplug_requested;
|
||||
bool interp;
|
||||
bool forwarding_assist;
|
||||
QTAILQ_ENTRY(S390PCIBusDevice) link;
|
||||
};
|
||||
|
||||
|
|
|
@ -12,13 +12,27 @@
|
|||
#ifndef HW_S390_PCI_KVM_H
|
||||
#define HW_S390_PCI_KVM_H
|
||||
|
||||
#include "hw/s390x/s390-pci-bus.h"
|
||||
#include "hw/s390x/s390-pci-inst.h"
|
||||
|
||||
#ifdef CONFIG_KVM
|
||||
bool s390_pci_kvm_interp_allowed(void);
|
||||
int s390_pci_kvm_aif_enable(S390PCIBusDevice *pbdev, ZpciFib *fib, bool assist);
|
||||
int s390_pci_kvm_aif_disable(S390PCIBusDevice *pbdev);
|
||||
#else
|
||||
static inline bool s390_pci_kvm_interp_allowed(void)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
static inline int s390_pci_kvm_aif_enable(S390PCIBusDevice *pbdev, ZpciFib *fib,
|
||||
bool assist)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
static inline int s390_pci_kvm_aif_disable(S390PCIBusDevice *pbdev)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue