From: David Gibson <david@gibson.dropbear.id.au>
To: "Cédric Le Goater" <clg@kaod.org>
Cc: groug@kaod.org, qemu-devel@nongnu.org, qemu-ppc@nongnu.org
Subject: Re: [Qemu-devel] [PATCHv3 6/7] target/ppc: Replace intc pointer with a general machine_data pointer
Date: Fri, 15 Jun 2018 11:34:41 +1000 [thread overview]
Message-ID: <20180615013441.GH4129@umbus.fritz.box> (raw)
In-Reply-To: <2e5b66b8-1eec-48b4-b032-5df522627704@kaod.org>
[-- Attachment #1: Type: text/plain, Size: 1942 bytes --]
On Thu, Jun 14, 2018 at 05:20:56PM +0200, Cédric Le Goater wrote:
> On 06/14/2018 06:41 AM, David Gibson wrote:
> > PowerPCCPU contains an (Object *)intc used to point to the cpu's interrupt
> > controller. Or more precisely to the "presentation" component of the
> > interrupt controller relevant to this cpu.
> >
> > Really, this field is machine specific. The machines which use it can
> > point it to different types of object depending on their needs, and most
> > machines don't use it at all (since they have older style PICs which don't
> > have per-cpu presentation components).
> >
> > There's also other information that's per-cpu, but platform/machine
> > specific. So replace the intc pointer with a (void *)machine_data which
> > can be managed as the machine type likes to conveniently store per cpu
> > information.
>
> I took a closer look. I tried to port the XIVE models on top this
> new machine data field and it does not work out at all.
>
> The problem is that the XIVE models are common to PowerNV and sPAPR,
> they are machine agnostic, and when the cpu->intc pointer is used in
> the TIMA ops, we have no idea in which machine the CPU are running.
> We only expect the CPU to be a POWER9. We need a CPU related pointer
> and not a machine data pointer, but we could imagine having a machine
> data pointer under the CPU data pointer but the first need is a CPU
> data.
>
> Sorry, not have said it ealier, but I will just add back the intc
> pointer under the CPU, for the moment.
Bother. Long term, I'm not sure what to do about this. Fow now, I'll
back out the patch which moved intc to the machine_data (and rework
the vpa -> machine_data patch to apply without it).
--
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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2018-06-15 2:11 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-14 4:41 [Qemu-devel] [PATCHv3 0/7] Better handling of machine specific per-cpu information David Gibson
2018-06-14 4:41 ` [Qemu-devel] [PATCHv3 1/7] spapr: Clean up cpu realize/unrealize paths David Gibson
2018-06-14 4:41 ` [Qemu-devel] [PATCHv3 2/7] pnv: Fix some error handling cpu realize() David Gibson
2018-06-14 5:26 ` Cédric Le Goater
2018-06-14 6:35 ` Greg Kurz
2018-06-14 4:41 ` [Qemu-devel] [PATCHv3 3/7] pnv_core: Allocate cpu thread objects individually David Gibson
2018-06-14 4:41 ` [Qemu-devel] [PATCHv3 4/7] pnv: Clean up cpu realize path David Gibson
2018-06-14 4:41 ` [Qemu-devel] [PATCHv3 5/7] pnv: Add cpu unrealize path David Gibson
2018-06-14 4:41 ` [Qemu-devel] [PATCHv3 6/7] target/ppc: Replace intc pointer with a general machine_data pointer David Gibson
2018-06-14 5:30 ` Cédric Le Goater
2018-06-14 13:34 ` Greg Kurz
2018-06-15 0:19 ` David Gibson
2018-06-14 15:20 ` Cédric Le Goater
2018-06-15 1:34 ` David Gibson [this message]
2018-06-14 4:41 ` [Qemu-devel] [PATCHv3 7/7] target/ppc, spapr: Move VPA information to machine_data 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=20180615013441.GH4129@umbus.fritz.box \
--to=david@gibson.dropbear.id.au \
--cc=clg@kaod.org \
--cc=groug@kaod.org \
--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).