From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38018) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1buYMz-000549-SD for qemu-devel@nongnu.org; Thu, 13 Oct 2016 01:15:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1buYMx-00086a-52 for qemu-devel@nongnu.org; Thu, 13 Oct 2016 01:15:53 -0400 Date: Thu, 13 Oct 2016 11:24:07 +1100 From: David Gibson Message-ID: <20161013002407.GG18039@umbus.fritz.box> References: <1475479496-16158-1-git-send-email-clg@kaod.org> <1475479496-16158-4-git-send-email-clg@kaod.org> <20161007043221.GS18490@umbus.fritz.box> <45ecd367-07ce-e143-cf53-e7332cc94ac2@kaod.org> <20161011102452.GH8952@umbus.fritz.box> <28a5eb21-bea5-09f9-6f90-9770812700e1@kaod.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="j2AXaZ4YhVcLc+PQ" Content-Disposition: inline In-Reply-To: <28a5eb21-bea5-09f9-6f90-9770812700e1@kaod.org> Subject: Re: [Qemu-devel] [PATCH v4 03/20] ppc/pnv: add a core mask to PnvChip List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?iso-8859-1?Q?C=E9dric?= Le Goater Cc: qemu-ppc@nongnu.org, Benjamin Herrenschmidt , qemu-devel@nongnu.org --j2AXaZ4YhVcLc+PQ Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Oct 12, 2016 at 10:53:12AM +0200, C=E9dric Le Goater wrote: > On 10/11/2016 12:24 PM, David Gibson wrote: > > On Mon, Oct 10, 2016 at 02:56:25PM +0200, C=E9dric Le Goater wrote: > >> > >>>> @@ -227,11 +227,44 @@ static void ppc_powernv_init(MachineState *mac= hine) > >>>> snprintf(chip_name, sizeof(chip_name), "chip[%d]", CHIP_HWI= D(i)); > >>>> object_property_add_child(OBJECT(pnv), chip_name, chip, &er= ror_fatal); > >>>> object_property_set_int(chip, CHIP_HWID(i), "chip-id", &err= or_fatal); > >>>> + object_property_set_int(chip, smp_cores, "nr-cores", &error= _fatal); > >>>> + /* > >>>> + * We could customize cores_mask for the chip here. May be > >>>> + * using a powernv machine property, like 'num-chips'. Let = the > >>>> + * chip choose the default for now. > >>> > >>> I don't think you need any special mechanism for this. If you just > >>> remove this explicit assignment the chip default will apply, but the > >>> user can alter it using -global. > >> > >> Using a command line with : > >> > >> -global powernv-chip-POWER8.cores-mask=3D0x7070 > >> > >> would work for one chip but not for more. Let's start with that, I wil= l=20 > >> remove the comment for now. multiple chip is for later. > >=20 > > Well, it works for more than one chip if you want the same mask for > > each of them. If you want different masks, I think you can still do > > it with -set, but working out the right arguments can be a PITA. >=20 > That would be the best solution but I did not find a way to address one > chip object to do a "qom set". Yeah, that's what I mean working out the arguments can be tricky. >=20 > (qemu) info qom-tree=20 > /machine (powernv-machine) > /unattached (container) > /system[0] (qemu:memory-region) > /sysbus (System) > /ppc_powernv.ram[0] (qemu:memory-region) > /io[0] (qemu:memory-region) > /peripheral-anon (container) > /peripheral (container) > /chip[1] (powernv-chip-POWER8) > ... > /chip[0] (powernv-chip-POWER8) > ... > =20 > We will have a similar need with the ram to spread the contents on > the chips.=20 Sure. Let's cross these bridges when we come to them. --=20 David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson --j2AXaZ4YhVcLc+PQ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJX/tQnAAoJEGw4ysog2bOSWCEQAIm0pSC/HiWIJEFLHNzmB6VX oLoloOhvfMgMvP4Fnvfa5UVqvwdpzKQG4++/DDpFn68rnG7gqYPn+YkZBAZqZocF A/WcPiKnkzjIGy4GyCaMAioO6V7PkLpRI6vgSjeIFcJVPTAFvKMzxrtznpkgXK9j 9gpi48LbexwJv/jrVspB7tEpg+L+NrsiHY9Cu85d+OECOdCKaL+JOq6acMEYs0pa l1or77/OPquhs0KRYOy2ZHFjlk/2wMefR/GMLDZqDU8IvuGGZUwO0oNKVRCqjcIw w/IVaZ1dEL2+BIUB7yju6P39/y4xCrvsZs+Mvmy592AVo+vSZvv+49BsCB7lgqcU VR036HuBGyRLmIbsugZwruRYuS4mEqpKxt2YbU9bXOnVHhzHAjq5INLxQGZzX7s/ 6WEI+xA9HrnjXjmrtmRl9LgTsww0M8sNVWSQXGGQefTBU7k0d4bq3IJCt/VxWnPa JqQPBY+GR9P6X/4I/kd9DEjQeu096b7h4bKhfSRvTVQPx/zPRyi3QWYLFDPaVUni IdcQETrB/CDa6jUxEWxONWL0txX7wXf3uogRweYmFsfU9pBk5frfgw9Mfwhgc+ro S1yJGumMP9y3wp/IcpsOZUz2JeTUKIesMVR6w8OKyujTpv6edJkGUVvBTLMnyHp1 xXdjf4ePtvScEnyVsFkr =Z5V1 -----END PGP SIGNATURE----- --j2AXaZ4YhVcLc+PQ--