[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v1 3/5] s390x/intc: Emulate Adapter Interrupt Su
From: |
Cornelia Huck |
Subject: |
Re: [Qemu-devel] [PATCH v1 3/5] s390x/intc: Emulate Adapter Interrupt Suppression |
Date: |
Mon, 9 Oct 2017 11:08:52 +0200 |
On Mon, 9 Oct 2017 10:42:44 +0200
Cornelia Huck <address@hidden> wrote:
> On Wed, 4 Oct 2017 15:49:37 +0200
> Pierre Morel <address@hidden> 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 <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;
>
> 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.