From: Balamuruhan S <bala24@linux.ibm.com>
To: "Cédric Le Goater" <clg@kaod.org>
Cc: maddy@linux.vnet.ibm.com, groug@kaod.org, qemu-devel@nongnu.org,
anju@linux.vnet.ibm.com, qemu-ppc@nongnu.org,
hari@linux.vnet.ibm.com, david@gibson.dropbear.id.au
Subject: Re: [Qemu-devel] [PATCH v1 3/3] hw/ppc/pnv_homer: add PowerNV homer device model
Date: Tue, 10 Sep 2019 20:25:17 +0530 [thread overview]
Message-ID: <20190910145517.GB25854@localhost.localdomain> (raw)
In-Reply-To: <f0a5499f-4a76-85b8-db74-0c83a0587974@kaod.org>
On Tue, Sep 10, 2019 at 01:00:54PM +0200, Cédric Le Goater wrote:
> >>> +
> >>> + object_initialize_child(obj, "homer", &chip9->homer, sizeof(chip9->homer),
> >>> + TYPE_PNV9_HOMER, &error_abort, NULL);
> >>> + object_property_add_const_link(OBJECT(&chip9->homer), "chip", obj,
> >>> + &error_abort);
> >>
> >> Does HOMER need the chip ? It is not used but we might want to in the
> >> core_max_array() ?
> >
> > sorry, no it is not required, I will remove it.
>
> It seems you will need the chip in core_max_array(). I would keep it.
> See below,
Thanks Cedric, I was not aware of how to use it,
>
> [ ... ]
>
> >>> +static bool core_max_array(void *opaque, hwaddr addr)
>
> Please change the 'void *opaque' function parameter in 'PnvHOMER *homer'
>
> >>> +{
> >>> + PnvHOMER *homer = PNV_HOMER(opaque);
> >>> + PnvHOMERClass *homer_class = PNV_HOMER_GET_CLASS(homer);
> >>> +
> >>> + MachineState *ms = MACHINE(qdev_get_machine());
> >>
> >> Do you need the whole machine or only the chip ?
> >
> > yes, I see it is for active cores in the chip, I can use `nr_cores`
> > defined in PnvChip.
>
>
> If you keep the QOM link above, you can grab it in the realize handler of
> the HOMER model with :
>
> Object *obj;
> Error *local_err = NULL;
>
> obj = object_property_get_link(OBJECT(dev), "chip", &local_err);
> if (!obj) {
> error_propagate(errp, local_err);
> error_prepend(errp, "required link 'chip' not found: ");
> return;
> }
>
> homer->chip = PNV_CHIP(obj);
sure, :+1:
>
> [ ... ]
>
> >>> +
> >>> +/* P9 Pstate table */
> >>> +
> >>
> >> no version ?
> >
> > PNV9_OCC_PSTATE_MAJOR_VERSION is the P9 pstate version.
>
> why isn't it in the switch statement below ?
it is there in the switch statement,
::
+ case PNV9_OCC_PSTATE_MAJOR_VERSION:
+ return 0x90;
::
>
> [ ... ]
>
> >>> +typedef struct PnvHOMER {
> >>> + DeviceState parent;
> >>> +
> >>> + MemoryRegion homer_regs;
> >>
> >> the homer_ prefix is not useful.
> >
> > okay, I will change it to `hregs`.
>
> I would just remove the prefix
will make the change as suggested by removing the prefix.
-- Bala
>
> Thanks,
>
> C.
>
next prev parent reply other threads:[~2019-09-10 15:04 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-10 7:10 [Qemu-devel] [PATCH v1 0/3] add Homer/OCC common area emulation for PowerNV Balamuruhan S
2019-09-10 7:10 ` [Qemu-devel] [PATCH v1 1/3] hw/ppc/pnv_xscom: retrieve homer/occ base address from PBA BARs Balamuruhan S
2019-09-10 7:16 ` Cédric Le Goater
2019-09-10 7:10 ` [Qemu-devel] [PATCH v1 2/3] hw/ppc/pnv_occ: add sram device model for occ common area Balamuruhan S
2019-09-10 7:19 ` Cédric Le Goater
2019-09-10 9:31 ` Balamuruhan S
2019-09-10 9:33 ` Cédric Le Goater
2019-09-10 7:10 ` [Qemu-devel] [PATCH v1 3/3] hw/ppc/pnv_homer: add PowerNV homer device model Balamuruhan S
2019-09-10 7:46 ` Cédric Le Goater
2019-09-10 10:30 ` Balamuruhan S
2019-09-10 11:00 ` Cédric Le Goater
2019-09-10 14:55 ` Balamuruhan S [this message]
2019-09-11 0:34 ` David Gibson
2019-09-11 4:47 ` Balamuruhan S
2019-09-10 11:45 ` [Qemu-devel] [PATCH v1 0/3] add Homer/OCC common area emulation for PowerNV Cédric Le Goater
2019-09-10 14:40 ` Balamuruhan S
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=20190910145517.GB25854@localhost.localdomain \
--to=bala24@linux.ibm.com \
--cc=anju@linux.vnet.ibm.com \
--cc=clg@kaod.org \
--cc=david@gibson.dropbear.id.au \
--cc=groug@kaod.org \
--cc=hari@linux.vnet.ibm.com \
--cc=maddy@linux.vnet.ibm.com \
--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).