Emulate the Adapter Interrupt Suppression in the KVM FLIC interface when
the kernel does not support AIS.
When the kernel KVM does not support AIS, we can not support VFIO PCI
devices but we still can support emulated devices if we emulate AIS
inside QEMU.
Let's emulate AIS, allowing to use emulated PCI devices without KVM AIS
support.
Signed-off-by: Pierre Morel <address@hidden>
---
hw/intc/s390_flic.c | 3 +-
hw/intc/s390_flic_kvm.c | 76 ++++++++++++++++++++++++++++++++++++++++---------
2 files changed, 64 insertions(+), 15 deletions(-)
diff --git a/hw/intc/s390_flic.c b/hw/intc/s390_flic.c
index 6eaf178..33a7cde 100644
--- a/hw/intc/s390_flic.c
+++ b/hw/intc/s390_flic.c
@@ -185,8 +185,7 @@ static void s390_flic_common_realize(DeviceState *dev,
Error **errp)
" (%d > %d)", max_batch, ADAPTER_ROUTES_MAX_GSI);
return;
}
-
- fs->ais_supported = s390_has_feat(S390_FEAT_ADAPTER_INT_SUPPRESSION);
+ fs->ais_supported = false;
}
static void s390_flic_class_init(ObjectClass *oc, void *data)
diff --git a/hw/intc/s390_flic_kvm.c b/hw/intc/s390_flic_kvm.c
index 7ead17a..fd1aa22 100644
--- a/hw/intc/s390_flic_kvm.c
+++ b/hw/intc/s390_flic_kvm.c
@@ -33,6 +33,8 @@ typedef struct KVMS390FLICState {
uint32_t fd;
bool clear_io_supported;
+ uint8_t simm;
+ uint8_t nimm;
} KVMS390FLICState;