From: "Cédric Le Goater" <clg@kaod.org>
To: qemu-ppc@nongnu.org
Cc: David Gibson <david@gibson.dropbear.id.au>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
qemu-devel@nongnu.org, Alexander Graf <agraf@suse.de>
Subject: Re: [Qemu-devel] [PATCH v2 4/7] ppc/pnv: add a core mask to PnvChip
Date: Fri, 2 Sep 2016 10:03:39 +0200 [thread overview]
Message-ID: <2c2e5bc0-6be5-4e7c-81fb-a8e50d50e7fa@kaod.org> (raw)
In-Reply-To: <1472661255-20160-5-git-send-email-clg@kaod.org>
On 08/31/2016 06:34 PM, Cédric Le Goater wrote:
> This will be used to build real HW ids for the cores and enforce some
> limits on the available cores per chip.
>
> Signed-off-by: Cédric Le Goater <clg@kaod.org>
> ---
> hw/ppc/pnv.c | 27 +++++++++++++++++++++++++++
> include/hw/ppc/pnv.h | 2 ++
> 2 files changed, 29 insertions(+)
>
> diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c
> index a6e7f66b2c0a..b6efb5e3ef07 100644
> --- a/hw/ppc/pnv.c
> +++ b/hw/ppc/pnv.c
> @@ -236,6 +236,27 @@ static void ppc_powernv_init(MachineState *machine)
> g_free(chip_typename);
> }
>
> +/* Allowed core identifiers on a POWER8 Processor Chip :
> + *
> + * <EX0 reserved>
> + * EX1 - Venice only
> + * EX2 - Venice only
> + * EX3 - Venice only
> + * EX4
> + * EX5
> + * EX6
> + * <EX7,8 reserved> <reserved>
> + * EX9 - Venice only
> + * EX10 - Venice only
> + * EX11 - Venice only
> + * EX12
> + * EX13
> + * EX14
> + * <EX15 reserved>
> + */
> +#define POWER8E_CORE_MASK (~0xffff8f8f)
> +#define POWER8_CORE_MASK (~0xffff8181)
> +
> static void pnv_chip_power8nvl_realize(PnvChip *chip, Error **errp)
> {
> ;
> @@ -250,6 +271,8 @@ static void pnv_chip_power8nvl_class_init(ObjectClass *klass, void *data)
> k->cpu_model = "POWER8NVL";
> k->chip_type = PNV_CHIP_P8NVL;
> k->chip_f000f = 0x120d304980000000ull;
> + k->cores_max = 12;
> + k->cores_mask = POWER8_CORE_MASK;
> dc->desc = "PowerNV Chip POWER8NVL";
> }
>
> @@ -274,6 +297,8 @@ static void pnv_chip_power8_class_init(ObjectClass *klass, void *data)
> k->cpu_model = "POWER8";
> k->chip_type = PNV_CHIP_P8;
> k->chip_f000f = 0x220ea04980000000ull;
> + k->cores_max = 12;
> + k->cores_mask = POWER8_CORE_MASK;
> dc->desc = "PowerNV Chip POWER8";
> }
>
> @@ -298,6 +323,8 @@ static void pnv_chip_power8e_class_init(ObjectClass *klass, void *data)
> k->cpu_model = "POWER8E";
> k->chip_type = PNV_CHIP_P8E;
> k->chip_f000f = 0x221ef04980000000ull;
> + k->cores_max = 6;
> + k->cores_mask = POWER8E_CORE_MASK;
> dc->desc = "PowerNV Chip POWER8E";
> }
>
> diff --git a/include/hw/ppc/pnv.h b/include/hw/ppc/pnv.h
> index bc6e1f80096b..987bc70245a7 100644
> --- a/include/hw/ppc/pnv.h
> +++ b/include/hw/ppc/pnv.h
> @@ -49,6 +49,8 @@ typedef struct PnvChipClass {
> /*< private >*/
> SysBusDeviceClass parent_class;
> /*< public >*/
> + uint32_t cores_max;
> + uint32_t cores_mask;
This 'cores_mask' attribute needs to be a uint64_t for POWER9. The
core chiplet ids are in the range : [ 0x20 - 0x37 ]
I will change that in the next version and include a PnvChipPower9
class as the cpu_model was merged in David's branch.
Cheers,
C.
next prev parent reply other threads:[~2016-09-02 8:03 UTC|newest]
Thread overview: 62+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-31 16:34 [Qemu-devel] [PATCH v2 0/7] ppc/pnv: add a minimal platform Cédric Le Goater
2016-08-31 16:34 ` [Qemu-devel] [PATCH v2 1/7] ppc/pnv: add skeleton PowerNV platform Cédric Le Goater
2016-09-01 16:31 ` [Qemu-devel] [Qemu-ppc] " Greg Kurz
2016-09-02 6:32 ` Cédric Le Goater
2016-09-02 6:39 ` Benjamin Herrenschmidt
2016-09-05 2:48 ` [Qemu-devel] " David Gibson
2016-09-05 6:06 ` Cédric Le Goater
2016-08-31 16:34 ` [Qemu-devel] [PATCH v2 2/7] ppc/pnv: add a PnvChip object Cédric Le Goater
2016-09-01 17:21 ` [Qemu-devel] [Qemu-ppc] " Greg Kurz
2016-09-02 6:34 ` Cédric Le Goater
2016-09-05 2:58 ` [Qemu-devel] " David Gibson
2016-09-05 6:59 ` Benjamin Herrenschmidt
2016-09-05 7:41 ` Cédric Le Goater
2016-09-05 8:28 ` Benjamin Herrenschmidt
2016-09-06 0:49 ` David Gibson
2016-09-06 6:21 ` Cédric Le Goater
2016-09-05 7:41 ` David Gibson
2016-09-05 9:10 ` Cédric Le Goater
2016-09-06 0:50 ` David Gibson
2016-09-05 7:56 ` Cédric Le Goater
2016-09-06 0:52 ` David Gibson
2016-08-31 16:34 ` [Qemu-devel] [PATCH v2 3/7] ppc/pnv: Add XSCOM infrastructure Cédric Le Goater
2016-09-05 3:39 ` David Gibson
2016-09-05 7:11 ` Benjamin Herrenschmidt
2016-09-06 0:48 ` David Gibson
2016-09-06 14:42 ` Cédric Le Goater
2016-09-06 21:47 ` Benjamin Herrenschmidt
2016-09-06 21:49 ` Benjamin Herrenschmidt
2016-09-07 15:55 ` Cédric Le Goater
2016-09-07 19:48 ` Benjamin Herrenschmidt
2016-09-07 2:03 ` David Gibson
2016-09-07 15:47 ` Cédric Le Goater
2016-09-07 21:53 ` Benjamin Herrenschmidt
2016-09-08 8:52 ` Cédric Le Goater
2016-09-07 2:01 ` David Gibson
2016-09-06 14:42 ` Cédric Le Goater
2016-09-06 21:45 ` Benjamin Herrenschmidt
2016-09-07 2:02 ` David Gibson
2016-09-07 16:40 ` Cédric Le Goater
2016-09-07 1:59 ` David Gibson
2016-09-07 5:27 ` Benjamin Herrenschmidt
2016-09-07 5:46 ` David Gibson
2016-09-07 8:29 ` Benjamin Herrenschmidt
2016-09-05 4:16 ` [Qemu-devel] [Qemu-ppc] " Sam Bobroff
2016-09-06 14:51 ` Cédric Le Goater
2016-08-31 16:34 ` [Qemu-devel] [PATCH v2 4/7] ppc/pnv: add a core mask to PnvChip Cédric Le Goater
2016-09-02 8:03 ` Cédric Le Goater [this message]
2016-09-05 3:42 ` David Gibson
2016-09-05 11:13 ` Cédric Le Goater
2016-09-05 11:30 ` Benjamin Herrenschmidt
2016-08-31 16:34 ` [Qemu-devel] [PATCH v2 5/7] ppc/pnv: add a PnvCore object Cédric Le Goater
2016-09-05 4:02 ` David Gibson
2016-09-06 6:14 ` Cédric Le Goater
2016-09-07 1:48 ` David Gibson
2016-08-31 16:34 ` [Qemu-devel] [PATCH v2 6/7] ppc/pnv: add a XScomDevice to PnvCore Cédric Le Goater
2016-09-05 4:19 ` David Gibson
2016-09-06 13:54 ` Cédric Le Goater
2016-09-07 1:51 ` David Gibson
2016-08-31 16:34 ` [Qemu-devel] [PATCH v2 7/7] monitor: fix crash for platforms without a CPU 0 Cédric Le Goater
2016-09-05 4:27 ` David Gibson
2016-09-06 6:28 ` Cédric Le Goater
2016-09-07 1:49 ` David Gibson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2c2e5bc0-6be5-4e7c-81fb-a8e50d50e7fa@kaod.org \
--to=clg@kaod.org \
--cc=agraf@suse.de \
--cc=benh@kernel.crashing.org \
--cc=david@gibson.dropbear.id.au \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).