From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: "Cédric Le Goater" <clg@kaod.org>,
"David Gibson" <david@gibson.dropbear.id.au>
Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v3 07/10] ppc/pnv: add XSCOM infrastructure
Date: Tue, 27 Sep 2016 20:18:38 +1000 [thread overview]
Message-ID: <1474971518.2857.280.camel@kernel.crashing.org> (raw)
In-Reply-To: <403f0f67-abee-6fcd-bf69-1339623fe228@kaod.org>
On Tue, 2016-09-27 at 11:30 +0200, Cédric Le Goater wrote:
> On 09/27/2016 11:10 AM, Cédric Le Goater wrote:
> >
> > >
> > > >
> > > > +#include <libfdt.h>
> > > > +
> > > > +static void xscom_complete(uint64_t hmer_bits)
> > > > +{
> > > > + CPUState *cs = current_cpu;
> > >
> > > Hmm.. is current_cpu a safe thing to use in the case of KVM or MTTCG?
> >
> > yes, as we are running under cpu_exec when doing this call.
>
> well, this is not true under the monitor.
>
> So we will have to come up with something to handle xscom read/writes
> from the monitor. Could we use first_cpu in that case ?
Well, we'll need to find the chip etc... I think the XSCOM bridge (or bus)
should have special methods for the monitor that don't update HMER but
print out the status instead.
Cheers,
Ben.
> Thanks,
>
> C.
>
> >
> > >
> > > >
> > > > + PowerPCCPU *cpu = POWERPC_CPU(cs);
> > > > + CPUPPCState *env = &cpu->env;
> > > > +
> > > > + cpu_synchronize_state(cs);
> > > > + env->spr[SPR_HMER] |= hmer_bits;
> > > > +
> > > > + /* XXX Need a CPU helper to set HMER, also handle gneeration
> > > > + * of HMIs
> > > > + */
> >
> > Ben,
> >
> > The CPU helper would be to replicate the value of the SPR_HMER in all
> > the threads of the core I guess ?
> >
> > Thanks,
> >
> > C.
> >
next prev parent reply other threads:[~2016-09-27 10:18 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-15 12:45 [Qemu-devel] [PATCH v3 00/10] ppc/pnv: loading skiboot and booting the kernel Cédric Le Goater
2016-09-15 12:45 ` [Qemu-devel] [PATCH v3 01/10] ppc/pnv: add skeleton PowerNV platform Cédric Le Goater
2016-09-20 7:53 ` David Gibson
2016-09-21 7:32 ` Cédric Le Goater
2016-09-15 12:45 ` [Qemu-devel] [PATCH v3 02/10] ppc/pnv: add a PnvChip object Cédric Le Goater
2016-09-20 13:50 ` David Gibson
2016-09-21 7:44 ` Cédric Le Goater
2016-09-15 12:45 ` [Qemu-devel] [PATCH v3 03/10] ppc/pnv: add a core mask to PnvChip Cédric Le Goater
2016-09-20 13:57 ` David Gibson
2016-09-21 7:57 ` Cédric Le Goater
2016-09-15 12:45 ` [Qemu-devel] [PATCH v3 04/10] ppc/pnv: add a PIR handler " Cédric Le Goater
2016-09-21 1:29 ` David Gibson
2016-09-21 1:52 ` Benjamin Herrenschmidt
2016-09-21 7:05 ` Cédric Le Goater
2016-09-15 12:45 ` [Qemu-devel] [PATCH v3 05/10] ppc/pnv: add a PnvCore object Cédric Le Goater
2016-09-21 1:51 ` David Gibson
2016-09-21 2:05 ` Benjamin Herrenschmidt
2016-09-21 2:15 ` David Gibson
2016-09-21 7:15 ` Cédric Le Goater
2016-09-21 7:09 ` Cédric Le Goater
2016-09-21 14:24 ` Cédric Le Goater
2016-09-15 12:45 ` [Qemu-devel] [PATCH v3 06/10] monitor: fix crash for platforms without a CPU 0 Cédric Le Goater
2016-09-21 5:30 ` David Gibson
2016-09-21 8:06 ` Cédric Le Goater
2016-09-15 12:45 ` [Qemu-devel] [PATCH v3 07/10] ppc/pnv: add XSCOM infrastructure Cédric Le Goater
2016-09-15 22:11 ` Benjamin Herrenschmidt
2016-09-21 5:56 ` David Gibson
2016-09-21 7:44 ` Benjamin Herrenschmidt
2016-09-21 6:08 ` David Gibson
2016-09-22 8:25 ` Cédric Le Goater
2016-09-23 2:46 ` David Gibson
2016-09-26 16:11 ` Cédric Le Goater
2016-09-27 2:35 ` David Gibson
2016-09-27 5:54 ` Cédric Le Goater
2016-09-27 6:10 ` Benjamin Herrenschmidt
2016-09-27 7:16 ` Cédric Le Goater
2016-09-28 1:40 ` David Gibson
2016-09-27 9:10 ` Cédric Le Goater
2016-09-27 9:30 ` Cédric Le Goater
2016-09-27 10:18 ` Benjamin Herrenschmidt [this message]
2016-09-27 10:17 ` Benjamin Herrenschmidt
2016-09-15 12:45 ` [Qemu-devel] [PATCH v3 08/10] ppc/pnv: add a XScomDevice to PnvCore Cédric Le Goater
2016-09-21 6:12 ` David Gibson
2016-09-22 8:33 ` Cédric Le Goater
2016-09-23 2:50 ` David Gibson
2016-09-15 12:45 ` [Qemu-devel] [PATCH v3 09/10] ppc/pnv: add a LPC controller Cédric Le Goater
2016-09-15 22:13 ` Benjamin Herrenschmidt
2016-09-16 17:35 ` Cédric Le Goater
2016-09-21 6:23 ` David Gibson
2016-09-15 12:46 ` [Qemu-devel] [PATCH v3 10/10] ppc/pnv: add a ISA bus Cédric Le Goater
2016-09-21 6:30 ` David Gibson
2016-09-22 8:44 ` Cédric Le Goater
2016-09-23 2:54 ` 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=1474971518.2857.280.camel@kernel.crashing.org \
--to=benh@kernel.crashing.org \
--cc=clg@kaod.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.