From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:37431) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvSIx-0003He-KX for qemu-devel@nongnu.org; Wed, 16 Jan 2013 07:41:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TvSIs-0005TL-H9 for qemu-devel@nongnu.org; Wed, 16 Jan 2013 07:41:19 -0500 Received: from cantor2.suse.de ([195.135.220.15]:49190 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvSIs-0005TA-AZ for qemu-devel@nongnu.org; Wed, 16 Jan 2013 07:41:14 -0500 Message-ID: <50F69FE6.9030908@suse.de> Date: Wed, 16 Jan 2013 13:41:10 +0100 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1358337445-53555-1-git-send-email-cornelia.huck@de.ibm.com> <1358337445-53555-3-git-send-email-cornelia.huck@de.ibm.com> In-Reply-To: <1358337445-53555-3-git-send-email-cornelia.huck@de.ibm.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 2/2] s390-virtio: Factor out some initialization code. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cornelia Huck Cc: Christian Borntraeger , Jens Freimann , Alexander Graf , qemu-devel Am 16.01.2013 12:57, schrieb Cornelia Huck: > diff --git a/hw/s390-virtio.h b/hw/s390-virtio.h > index cd88179..acd4846 100644 > --- a/hw/s390-virtio.h > +++ b/hw/s390-virtio.h > @@ -20,4 +20,10 @@ typedef int (*s390_virtio_fn)(uint64_t reg2, uint64_= t reg3, uint64_t reg4, > uint64_t reg5, uint64_t reg6, uint64_t r= eg7); > void s390_register_virtio_hypercall(uint64_t code, s390_virtio_fn fn); > =20 > +CPUS390XState *s390_init_cpus(const char *cpu_model, uint8_t *storage_= keys); > +void s390_set_up_kernel(CPUS390XState *env, > + const char *kernel_filename, > + const char *kernel_cmdline, > + const char *initrd_filename); I don't like this interface: It reads "cpus" but appears to return a single CPUS390XState. Can't you at least use S390CPU* instead? Alternatively it would be possible (although at some point to be changed) to use global first_cpu and to iterate over the CPUs rather than returning one from one function to the other. However since the only usage I spot in the patch without looking up the file myself is s390_add_running_cpu(), can the call be moved out of the kernel setup function to avoid this dependency? Andreas > +void s390_create_virtio_net(BusState *bus, const char *name); > #endif --=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