On Thu, 08 May 2014 15:43:05 +0200
Alexander Graf <[email protected]> wrote:

> On 05/08/2014 03:03 PM, Cornelia Huck wrote:
> > Introduce a common parent class for both cases, where kvm and non-kvm
> > can hook up callbacks. This will be used by follow-on patches for
> > adapter registration and mapping.
> >
> > We now always have a flic, regardless of whether we use kvm; the
> > non-kvm implementation just doesn't do anything.
> >
> > Reviewed-by: Jens Freimann <[email protected]>
> > Signed-off-by: Cornelia Huck <[email protected]>
> > ---
> >   default-configs/s390x-softmmu.mak |    3 +-
> >   hw/intc/Makefile.objs             |    1 +
> >   hw/intc/s390_flic.c               |  318 
> > ++++--------------------------------
> >   hw/intc/s390_flic_kvm.c           |  325 
> > +++++++++++++++++++++++++++++++++++++
> >   include/hw/s390x/s390_flic.h      |   51 ++++--
> >   5 files changed, 399 insertions(+), 299 deletions(-)
> >   create mode 100644 hw/intc/s390_flic_kvm.c
> >

> > diff --git a/hw/intc/s390_flic.c b/hw/intc/s390_flic.c
> > index b2ef3e3..7dc8c7d 100644
> > --- a/hw/intc/s390_flic.c
> > +++ b/hw/intc/s390_flic.c

> > +void s390_flic_init(void)
> >   {
> > +    DeviceState *dev;
> >       int r;

> > +    dev = s390_flic_kvm_create();
> 
> Why have this helper? Can't that logic live in the board file?

It could; but I think it is cleaner to contain this in the flic than to
have kvm-switches there.


Reply via email to