qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: "Cédric Le Goater" <clg@kaod.org>
Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 02/10] ppc/xive: introduce a XiveTCTX pointer under PowerPCCPU
Date: Fri, 4 Jan 2019 16:25:38 +1100	[thread overview]
Message-ID: <20190104052538.GF2801@umbus.fritz.box> (raw)
In-Reply-To: <76f4f558-5e0d-52ee-5c99-c208d005f643@kaod.org>

[-- Attachment #1: Type: text/plain, Size: 2484 bytes --]

On Thu, Jan 03, 2019 at 06:44:30PM +0100, Cédric Le Goater wrote:
> On 1/3/19 4:57 AM, David Gibson wrote:
> > On Wed, Jan 02, 2019 at 06:57:35AM +0100, Cédric Le Goater wrote:
> >> which will be used by the machine only when the XIVE interrupt mode is
> >> in use.
> > 
> > I don't love the idea of putting a hook this specific into the
> > PowerPCCPU structure, though it might be the easiest path in the short
> > term.
> > 
> > A couple of approaches: 1) revisit my changes to allow for a pointer
> > to machine-defined per-cpu data.  
> 
> ok but we still need two different presenters objects, one for each
> mode.
> 
> > or 2) do we actually need a cpu to tctx pointer.
> > 
> > Expanding on (2) - here you use the pointer to find the right TIMA
> > state to access,
> 
> yes. 
> 
> > but that could also be handled by having different TIMA IO instances 
> > and mapping those individually to cpu_as.  
> 
> It might work for QEMU but I am not sure how to implement the KVM 
> backend with such a design. We only have a single ram ptr mapping 
> for the machine in the KVM case.
> 
> There are a couple of places where we need to loop on the XiveTCTX 
> (presenter, KVM) and we use the QEMU CPU list and the cpu->tctx for 
> that. One of the reasons we introduced the cpu->intc pointer some 
> time ago was to get rid of the ICP array. 
> 
> I don't think we want to introduce a XiveTCTX array again.
> 
> > On the interrupt delivery side I think a tctx to cpu link will suffice.  
> 
> yes. that we already have. It is mostly used by KVM in fact. 
> 
> > For sPAPR there might be complications with translating cpu numbers in
> > hcalls to the right tctx.
> 
> The XiveTCTX is not used by the hcalls. We are fine on that side.
> 
> 
> The double pointer solution is what I prefer today, but if you are 
> uncomfortable with it, we can come back to the previous where I was 
> allocating a XiveTCTX child under the CPU and switching the presenter 
> objects at reset. The only issue remaining was the child unparenting 
> in the unrealize() method.

Hm, yes, I see your point.  For now I'm applying patches 1-3, and hope
to clean it up later with a revised version of my machine specific
per-cpu patch when I get the chance.

-- 
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 --]

  reply	other threads:[~2019-01-04 10:52 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-02  5:57 [Qemu-devel] [PATCH 00/10] spapr: introduce the 'dual' interrupt mode XICS/XIVE Cédric Le Goater
2019-01-02  5:57 ` [Qemu-devel] [PATCH 01/10] spapr: modify the prototype of the cpu_intc_create() method Cédric Le Goater
2019-01-02  5:57 ` [Qemu-devel] [PATCH 02/10] ppc/xive: introduce a XiveTCTX pointer under PowerPCCPU Cédric Le Goater
2019-01-03  3:57   ` David Gibson
2019-01-03 17:44     ` Cédric Le Goater
2019-01-04  5:25       ` David Gibson [this message]
2019-01-02  5:57 ` [Qemu-devel] [PATCH 03/10] ppc: replace the 'Object *intc' by a 'ICPState *icp' pointer under the CPU Cédric Le Goater
2019-01-02  5:57 ` [Qemu-devel] [PATCH 04/10] spapr/xive: simplify the sPAPR IRQ qirq method for XIVE Cédric Le Goater
2019-01-03  3:58   ` David Gibson
2019-01-02  5:57 ` [Qemu-devel] [PATCH 05/10] ppc: export the XICS and XIVE set_irq handlers Cédric Le Goater
2019-01-02  5:57 ` [Qemu-devel] [PATCH 06/10] pnv/psi: move the ICSState qemu_irq array under the PSI device model Cédric Le Goater
2019-01-02  5:57 ` [Qemu-devel] [PATCH 07/10] spapr: move the qemu_irq array under the machine Cédric Le Goater
2019-01-02  5:57 ` [Qemu-devel] [PATCH 08/10] ppc/xics: allow ICSState to have an offset 0 Cédric Le Goater
2019-01-03  4:33   ` David Gibson
2019-01-03 17:45     ` Cédric Le Goater
2019-01-07  4:29       ` David Gibson
2019-01-02  5:57 ` [Qemu-devel] [PATCH 09/10] spapr: introduce a new sPAPR IRQ backend supporting XIVE and XICS Cédric Le Goater
2019-01-03  4:35   ` David Gibson
2019-01-03 17:45     ` Cédric Le Goater
2019-01-02  5:57 ` [Qemu-devel] [PATCH 10/10] spapr: enable XIVE MMIOs at reset Cédric Le Goater
2019-01-07  4:48 ` [Qemu-devel] [PATCH 00/10] spapr: introduce the 'dual' interrupt mode XICS/XIVE David Gibson
2019-01-07  6:54   ` Cédric Le Goater

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=20190104052538.GF2801@umbus.fritz.box \
    --to=david@gibson.dropbear.id.au \
    --cc=clg@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).