On 09/10/2017 11:08, Cornelia Huck wrote:
On Mon, 9 Oct 2017 10:42:44 +0200
Cornelia Huck <coh...@redhat.com> wrote:

On Wed,  4 Oct 2017 15:49:37 +0200
Pierre Morel <pmo...@linux.vnet.ibm.com> wrote:

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 <pmo...@linux.vnet.ibm.com>
---
  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;

Instead of duplicating this, move simm/nimm into the common flic state?

Also, simm/nimm need to be reset (done for the qemu flic, but not for
the kvm flic). Doing that in common flic code would take care of that
as well.


right.
Thanks,

Pierre


--
Pierre Morel
Linux/KVM/QEMU in Böblingen - Germany


Reply via email to