From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41624) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W5ISQ-0000Vi-BD for qemu-devel@nongnu.org; Mon, 20 Jan 2014 12:16:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W5ISI-0004LE-PP for qemu-devel@nongnu.org; Mon, 20 Jan 2014 12:16:18 -0500 Received: from cantor2.suse.de ([195.135.220.15]:41842 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W5ISI-0004Kz-EX for qemu-devel@nongnu.org; Mon, 20 Jan 2014 12:16:10 -0500 Message-ID: <52DD59D6.7010006@suse.de> Date: Mon, 20 Jan 2014 18:16:06 +0100 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1390236993-21783-1-git-send-email-jjherne@us.ibm.com> <1390236993-21783-4-git-send-email-jjherne@us.ibm.com> In-Reply-To: <1390236993-21783-4-git-send-email-jjherne@us.ibm.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 3/3] s390-sclp: SCLP Event integration List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Jason J. Herne" , qemu-devel@nongnu.org Cc: borntraeger@de.ibm.com, agraf@suse.de Hi, Thanks for splitting these off. Am 20.01.2014 17:56, schrieb Jason J. Herne: > From: "Jason J. Herne" >=20 > Add an sclp event for "cpu was hot plugged". This allows Qemu to deliv= er an > SCLP interrupt to the guest stating that the requested cpu hotplug was > completed. >=20 > Signed-off-by: Jason J. Herne > --- > hw/s390x/Makefile.objs | 1 + > hw/s390x/event-facility.c | 6 ++ > hw/s390x/sclpcpu.c | 113 ++++++++++++++++++++++++++++++= ++++++++ > include/hw/s390x/event-facility.h | 3 + > include/hw/s390x/sclp.h | 1 + > 5 files changed, 124 insertions(+) > create mode 100644 hw/s390x/sclpcpu.c [...] > diff --git a/hw/s390x/event-facility.c b/hw/s390x/event-facility.c > index 25951a0..575d407 100644 > --- a/hw/s390x/event-facility.c > +++ b/hw/s390x/event-facility.c > @@ -32,6 +32,8 @@ struct SCLPEventFacility { > unsigned int receive_mask; > }; > =20 > +SCLPEvent cpu_hotplug; > + > /* return true if any child has event pending set */ > static bool event_pending(SCLPEventFacility *ef) > { > @@ -335,6 +337,10 @@ static int init_event_facility(S390SCLPDevice *sde= v) > } > qdev_init_nofail(quiesce); > =20 > + object_initialize(&cpu_hotplug, sizeof(cpu_hotplug), "sclp-cpu-hot= plug"); Any chance we can use a TYPE_* define in event-facility.h? > + qdev_set_parent_bus(DEVICE(&cpu_hotplug), BUS(&event_facility->sbu= s)); > + object_property_set_bool(OBJECT(&cpu_hotplug), true, "realized", N= ULL); Otherwise looks okay to me, except for two minor nits below. > + > return 0; > } > =20 > diff --git a/hw/s390x/sclpcpu.c b/hw/s390x/sclpcpu.c > new file mode 100644 > index 0000000..7fd1f9e > --- /dev/null > +++ b/hw/s390x/sclpcpu.c [...] > +static void cpu_class_init(ObjectClass *klass, void *data) Please use oc to avoid the deliberately misspelled klass. > +{ > + SCLPEventClass *k =3D SCLP_EVENT_CLASS(klass); > + > + k->init =3D irq_cpu_hotplug_init; > + k->get_send_mask =3D send_mask; > + k->get_receive_mask =3D receive_mask; > + k->read_event_data =3D read_event_data; > + k->write_event_data =3D NULL; > +} > + > +static const TypeInfo sclp_cpu_info =3D { > + .name =3D "sclp-cpu-hotplug", > + .parent =3D TYPE_SCLP_EVENT, > + .instance_size =3D sizeof(SCLPEvent), > + .class_init =3D cpu_class_init, > + .class_size =3D sizeof(SCLPEventClass), > +}; > + > +static void register_types(void) Please use your unique prefix: sclp_cpu_register_types > +{ > + type_register_static(&sclp_cpu_info); > +} > + > +type_init(register_types) > + Trailing white line. > diff --git a/include/hw/s390x/event-facility.h b/include/hw/s390x/event= -facility.h > index 7ce7079..4347f06 100644 > --- a/include/hw/s390x/event-facility.h > +++ b/include/hw/s390x/event-facility.h > @@ -17,10 +17,12 @@ > =20 > #include > #include "qemu/thread.h" > +#include "hw/s390x/sclp.h" > =20 > /* SCLP event types */ > #define SCLP_EVENT_OPRTNS_COMMAND 0x01 > #define SCLP_EVENT_MESSAGE 0x02 > +#define SCLP_EVENT_CONFIG_MGT_DATA 0x04 > #define SCLP_EVENT_PMSGCMD 0x09 > #define SCLP_EVENT_ASCII_CONSOLE_DATA 0x1a > #define SCLP_EVENT_SIGNAL_QUIESCE 0x1d > @@ -28,6 +30,7 @@ > /* SCLP event masks */ > #define SCLP_EVENT_MASK_SIGNAL_QUIESCE 0x00000008 > #define SCLP_EVENT_MASK_MSG_ASCII 0x00000040 > +#define SCLP_EVENT_MASK_CONFIG_MGT_DATA 0x10000000 > #define SCLP_EVENT_MASK_OP_CMD 0x80000000 > #define SCLP_EVENT_MASK_MSG 0x40000000 > #define SCLP_EVENT_MASK_PMSGCMD 0x00800000 [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