From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58561) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WiOoO-0007FX-Ca for qemu-devel@nongnu.org; Thu, 08 May 2014 09:56:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WiOoG-00054H-FV for qemu-devel@nongnu.org; Thu, 08 May 2014 09:56:36 -0400 Received: from e06smtp13.uk.ibm.com ([195.75.94.109]:55635) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WiOoG-00053u-6K for qemu-devel@nongnu.org; Thu, 08 May 2014 09:56:28 -0400 Received: from /spool/local by e06smtp13.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 8 May 2014 14:56:26 +0100 Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id 59C09219004D for ; Thu, 8 May 2014 14:56:16 +0100 (BST) Received: from d06av11.portsmouth.uk.ibm.com (d06av11.portsmouth.uk.ibm.com [9.149.37.252]) by b06cxnps4076.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s48DuOE764618606 for ; Thu, 8 May 2014 13:56:24 GMT Received: from d06av11.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av11.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s48DuOBV030717 for ; Thu, 8 May 2014 07:56:24 -0600 Date: Thu, 8 May 2014 15:56:22 +0200 From: Cornelia Huck Message-ID: <20140508155622.02c1dd5f.cornelia.huck@de.ibm.com> In-Reply-To: <536B89E9.7050800@suse.de> References: <1399554218-8262-1-git-send-email-cornelia.huck@de.ibm.com> <1399554218-8262-2-git-send-email-cornelia.huck@de.ibm.com> <536B89E9.7050800@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v5 1/4] s390x: split flic into kvm and non-kvm parts List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: borntraeger@de.ibm.com, qemu-devel@nongnu.org On Thu, 08 May 2014 15:43:05 +0200 Alexander Graf 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 > > Signed-off-by: Cornelia Huck > > --- > > 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.