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: Aravinda Prasad <arawinda.p@gmail.com>,
	qemu-devel@nongnu.org, Nicholas Piggin <npiggin@gmail.com>,
	Greg Kurz <groug@kaod.org>,
	Ganesh Goudar <ganeshgr@linux.ibm.com>,
	qemu-ppc@nongnu.org
Subject: Re: [PATCH v2 6/8] target/ppc: allow ppc_cpu_do_system_reset to take an alternate vector
Date: Tue, 17 Mar 2020 10:28:58 +1100	[thread overview]
Message-ID: <20200316232858.GF20264@umbus.fritz.box> (raw)
In-Reply-To: <85cfff63-88e3-b5a5-75e3-aa29ac13ff60@kaod.org>

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

On Mon, Mar 16, 2020 at 07:15:14PM +0100, Cédric Le Goater wrote:
> On 3/16/20 3:26 PM, Nicholas Piggin wrote:
> > Provide for an alternate delivery location, -1 defaults to the
> > architected address.
> 
> I don't know what is the best approach, to override the vector addr
> computed by powerpc_excp() or use a machine class handler with 
> cpu->vhyp.

Again, in the interests of getting this in for the soft freeze, I've
applied this now.  We can clean it up later.

> 
> > Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
> > ---
> >  hw/ppc/spapr.c           | 2 +-
> >  target/ppc/cpu.h         | 2 +-
> >  target/ppc/excp_helper.c | 5 ++++-
> >  3 files changed, 6 insertions(+), 3 deletions(-)
> > 
> > diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
> > index 5f93c49706..25221d843c 100644
> > --- a/hw/ppc/spapr.c
> > +++ b/hw/ppc/spapr.c
> > @@ -3400,7 +3400,7 @@ static void spapr_machine_finalizefn(Object *obj)
> >  void spapr_do_system_reset_on_cpu(CPUState *cs, run_on_cpu_data arg)
> >  {
> >      cpu_synchronize_state(cs);
> > -    ppc_cpu_do_system_reset(cs);
> > +    ppc_cpu_do_system_reset(cs, -1);
> >  }
> >  
> >  static void spapr_nmi(NMIState *n, int cpu_index, Error **errp)
> > diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h
> > index 3953680534..f8c7d6f19c 100644
> > --- a/target/ppc/cpu.h
> > +++ b/target/ppc/cpu.h
> > @@ -1220,7 +1220,7 @@ int ppc64_cpu_write_elf64_note(WriteCoreDumpFunction f, CPUState *cs,
> >  int ppc32_cpu_write_elf32_note(WriteCoreDumpFunction f, CPUState *cs,
> >                                 int cpuid, void *opaque);
> >  #ifndef CONFIG_USER_ONLY
> > -void ppc_cpu_do_system_reset(CPUState *cs);
> > +void ppc_cpu_do_system_reset(CPUState *cs, target_ulong vector);
> >  void ppc_cpu_do_fwnmi_machine_check(CPUState *cs, target_ulong vector);
> >  extern const VMStateDescription vmstate_ppc_cpu;
> >  #endif
> > diff --git a/target/ppc/excp_helper.c b/target/ppc/excp_helper.c
> > index 7f2b5899d3..08bc885ca6 100644
> > --- a/target/ppc/excp_helper.c
> > +++ b/target/ppc/excp_helper.c
> > @@ -961,12 +961,15 @@ static void ppc_hw_interrupt(CPUPPCState *env)
> >      }
> >  }
> >  
> > -void ppc_cpu_do_system_reset(CPUState *cs)
> > +void ppc_cpu_do_system_reset(CPUState *cs, target_ulong vector)
> >  {
> >      PowerPCCPU *cpu = POWERPC_CPU(cs);
> >      CPUPPCState *env = &cpu->env;
> >  
> >      powerpc_excp(cpu, env->excp_model, POWERPC_EXCP_RESET);
> > +    if (vector != -1) {
> > +        env->nip = vector;
> > +    }
> >  }
> >  
> >  void ppc_cpu_do_fwnmi_machine_check(CPUState *cs, target_ulong vector)
> > 
> 

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

  parent reply	other threads:[~2020-03-16 23:35 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-16 14:26 [PATCH v2 0/8] FWNMI fixes / changes Nicholas Piggin
2020-03-16 14:26 ` [PATCH v2 1/8] ppc/spapr: Fix FWNMI machine check failure handling Nicholas Piggin
2020-03-16 15:27   ` Greg Kurz
2020-03-16 22:46   ` David Gibson
2020-03-16 14:26 ` [PATCH v2 2/8] ppc/spapr: Change FWNMI names Nicholas Piggin
2020-03-16 17:15   ` Greg Kurz
2020-03-16 17:18   ` Mahesh J Salgaonkar
2020-03-16 17:25     ` Greg Kurz
2020-03-16 17:32   ` Cédric Le Goater
2020-03-16 22:46   ` David Gibson
2020-03-16 14:26 ` [PATCH v2 3/8] ppc/spapr: Add FWNMI System Reset state Nicholas Piggin
2020-03-16 17:17   ` Greg Kurz
2020-03-16 17:29   ` Mahesh J Salgaonkar
2020-03-16 17:46   ` Cédric Le Goater
2020-03-16 22:47   ` David Gibson
2020-03-16 14:26 ` [PATCH v2 4/8] ppc/spapr: Fix FWNMI machine check interrupt delivery Nicholas Piggin
2020-03-16 17:59   ` Cédric Le Goater
2020-03-16 23:19     ` Nicholas Piggin
2020-03-16 23:27       ` David Gibson
2020-03-16 14:26 ` [PATCH v2 5/8] ppc/spapr: Allow FWNMI on TCG Nicholas Piggin
2020-03-16 18:00   ` Cédric Le Goater
2020-03-16 18:01   ` Greg Kurz
2020-03-16 23:26     ` Nicholas Piggin
2020-03-17  3:56       ` David? Gibson
2020-03-16 14:26 ` [PATCH v2 6/8] target/ppc: allow ppc_cpu_do_system_reset to take an alternate vector Nicholas Piggin
2020-03-16 18:04   ` Greg Kurz
2020-03-16 18:15   ` Cédric Le Goater
2020-03-16 23:28     ` Nicholas Piggin
2020-03-16 23:34       ` David Gibson
2020-03-17 10:47         ` Cédric Le Goater
2020-03-16 23:28     ` David Gibson [this message]
2020-03-16 14:26 ` [PATCH v2 7/8] ppc/spapr: Implement FWNMI System Reset delivery Nicholas Piggin
2020-03-16 17:35   ` Mahesh J Salgaonkar
2020-03-16 17:52     ` Greg Kurz
2020-03-16 23:31       ` David Gibson
2020-03-16 23:30   ` David Gibson
2020-03-16 14:26 ` [PATCH v2 8/8] ppc/spapr: Ignore common "ibm, nmi-interlock" Linux bug Nicholas Piggin
2020-03-16 23:32   ` [PATCH v2 8/8] ppc/spapr: Ignore common "ibm,nmi-interlock" " David Gibson
     [not found] <mailman.138.1584442890.3017.qemu-ppc@nongnu.org>
2020-03-17 15:06 ` [PATCH v2 6/8] target/ppc: allow ppc_cpu_do_system_reset to take an alternate vector Programmingkid
2020-03-17 22:46   ` David Gibson
2020-03-19 20:49     ` Programmingkid

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=20200316232858.GF20264@umbus.fritz.box \
    --to=david@gibson.dropbear.id.au \
    --cc=arawinda.p@gmail.com \
    --cc=clg@kaod.org \
    --cc=ganeshgr@linux.ibm.com \
    --cc=groug@kaod.org \
    --cc=npiggin@gmail.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).