qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-ppc] [PATCHv3 6/7] target/ppc: Replace intc pointer with a gen


From: David Gibson
Subject: Re: [Qemu-ppc] [PATCHv3 6/7] target/ppc: Replace intc pointer with a general machine_data pointer
Date: Fri, 15 Jun 2018 11:34:41 +1000
User-agent: Mutt/1.10.0 (2018-05-17)

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: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]