From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55009) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UlGGV-0000yd-Qo for qemu-devel@nongnu.org; Sat, 08 Jun 2013 06:20:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UlGGU-0002D4-K6 for qemu-devel@nongnu.org; Sat, 08 Jun 2013 06:20:55 -0400 Message-ID: <51B30580.70906@suse.de> Date: Sat, 08 Jun 2013 12:20:48 +0200 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1370417998-7061-1-git-send-email-aik@ozlabs.ru> In-Reply-To: <1370417998-7061-1-git-send-email-aik@ozlabs.ru> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] pseries: Support for in-kernel XICS interrupt controller List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexey Kardashevskiy Cc: Mike Qiu , David Gibson , qemu-ppc@nongnu.org, qemu-devel@nongnu.org, Alexander Graf Am 05.06.2013 09:39, schrieb Alexey Kardashevskiy: > From: David Gibson >=20 > Recent (host) kernels support emulating the PAPR defined "XICS" interru= pt > controller system within KVM. This patch allows qemu to initialize and > configure the in-kernel XICS, and keep its state in sync with qemu's XI= CS > state as necessary. >=20 > This should give considerable performance improvements. e.g. on a simp= le > IPI ping-pong test between hardware threads, using qemu XICS gives us > around 5,000 irqs/second, whereas the in-kernel XICS gives us around > 70,000 irqs/s on the same hardware configuration. >=20 > [Mike Qiu : fixed mistype which caused ics_= set_kvm_state() to fail] > Signed-off-by: David Gibson > Signed-off-by: Alexey Kardashevskiy If a Mike Qiu changed this patch, don't we require his Signed-off-by? CPUState usage looks fine, can't judge the kernel interface, two nitpicks below. [...] > diff --git a/hw/ppc/xics.c b/hw/ppc/xics.c > index 02e44a0..b83f19f 100644 > --- a/hw/ppc/xics.c > +++ b/hw/ppc/xics.c > @@ -29,12 +29,19 @@ > #include "trace.h" > #include "hw/ppc/spapr.h" > #include "hw/ppc/xics.h" > +#include "kvm_ppc.h" > +#include "sysemu/kvm.h" > +#include "config.h" > +#include "qemu/config-file.h" > + > +#include > =20 > /* > * ICP: Presentation layer > */ > =20 > struct icp_server_state { > + CPUState *cs; > uint32_t xirr; > uint8_t pending_priority; > uint8_t mfrr; > @@ -53,6 +60,9 @@ struct icp_state { > uint32_t nr_servers; > struct icp_server_state *ss; > struct ics_state *ics; > + uint32_t set_xive_token, get_xive_token, > + int_off_token, int_on_token; FWIW normally we place struct fields below each other... > + int kernel_xics_fd; > }; > =20 > static void ics_reject(struct ics_state *ics, int nr); [...] > @@ -535,11 +734,14 @@ static int ics_post_load(void *opaque, int versio= n_id) > return 0; > } > =20 > + Intentional white space change? > static const VMStateDescription vmstate_icp_server =3D { > .name =3D "icp/server", > .version_id =3D 1, > .minimum_version_id =3D 1, > .minimum_version_id_old =3D 1, > + .pre_save =3D icp_pre_save, > + .post_load =3D icp_post_load, > .fields =3D (VMStateField []) { > /* Sanity check */ > VMSTATE_UINT32(xirr, struct icp_server_state), [snip] Regards, Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg