From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:54068) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SwC3G-0006Nl-9X for qemu-devel@nongnu.org; Tue, 31 Jul 2012 08:59:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SwC38-00036F-Oc for qemu-devel@nongnu.org; Tue, 31 Jul 2012 08:59:54 -0400 Received: from cantor2.suse.de ([195.135.220.15]:52220 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SwC38-000364-EA for qemu-devel@nongnu.org; Tue, 31 Jul 2012 08:59:46 -0400 Message-ID: <5017D6BF.3010106@suse.de> Date: Tue, 31 Jul 2012 14:59:43 +0200 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1343115430-34285-1-git-send-email-borntraeger@de.ibm.com> <1343115430-34285-5-git-send-email-borntraeger@de.ibm.com> In-Reply-To: <1343115430-34285-5-git-send-email-borntraeger@de.ibm.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 4/7] s390: sclp event support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Christian Borntraeger Cc: blauwirbel@gmail.com, Heinz Graalfs , Alexander Graf , Jens Freimann , qemu-devel Am 24.07.2012 09:37, schrieb Christian Borntraeger: > From: Heinz Graalfs >=20 > Several SCLP features are considered to be events. Those events don't > provide SCLP commands on their own, instead they are all based on > Read Event Data, Write Event Data, Write Event Mask and the service > interrupt. Follow-on patches will provide SCLP's Signal Quiesce (via > system_powerdown) and the ASCII console. > Further down the road the sclp line mode console and configuration > change events (e.g. cpu hotplug) can be implemented. >=20 > Signed-off-by: Heinz Graalfs > Signed-off-by: Christian Borntraeger > --- > hw/s390x/Makefile.objs | 1 + > hw/s390x/event-facility.c | 390 +++++++++++++++++++++++++++++++++++++= ++++++++ > hw/s390x/event-facility.h | 107 ++++++++++++ > hw/s390x/sclp.c | 48 +++++- > hw/s390x/sclp.h | 44 +++++ > 5 files changed, 587 insertions(+), 3 deletions(-) > create mode 100644 hw/s390x/event-facility.c > create mode 100644 hw/s390x/event-facility.h >=20 > diff --git a/hw/s390x/Makefile.objs b/hw/s390x/Makefile.objs > index 1c14b96..b32fc52 100644 > --- a/hw/s390x/Makefile.objs > +++ b/hw/s390x/Makefile.objs > @@ -2,3 +2,4 @@ obj-y =3D s390-virtio-bus.o s390-virtio.o > =20 > obj-y :=3D $(addprefix ../,$(obj-y)) > obj-y +=3D sclp.o > +obj-y +=3D event-facility.o > diff --git a/hw/s390x/event-facility.c b/hw/s390x/event-facility.c > new file mode 100644 > index 0000000..74a3514 > --- /dev/null > +++ b/hw/s390x/event-facility.c > @@ -0,0 +1,390 @@ > +/* > + * SCLP > + * Event Facility > + * handles SCLP event types > + * - Signal Quiesce - system power down > + * - ASCII Console Data - VT220 read and write > + * > + * Copyright IBM, Corp. 2012 > + * > + * Authors: > + * Heinz Graalfs > + * > + * This work is licensed under the terms of the GNU GPL, version 2 or = (at your > + * option) any later version. See the COPYING file in the top-level d= irectory. > + * > + */ > + > +#include "monitor.h" > +#include "sysemu.h" > + > +#include "sclp.h" > +#include "event-facility.h" > + > +typedef struct EventTypes { > + BusState qbus; > + SCLPEventFacility *event_facility; > +} EventTypes; > + > +struct SCLPEventFacility { > + EventTypes sbus; > + DeviceState *qdev; > + /* guest' receive mask */ > + unsigned int receive_mask; > +}; The naming here strikes me as particularly odd... IIUC this Event Facility is a device sitting on the SCLP bus. But why does it expose a bus named "EventTypes"? Busses are usually named ...Bus (PCIBus, IDEBus, etc.). So is this actually a bus? If not, and if all you need is an SCLP-specific list API, maybe compare the sPAPR hypercall registration API. 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