qemu-ppc
[Top][All Lists]
Advanced

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

Re: [Qemu-ppc] [Qemu-devel] [PATCH v3 0/4] target-ppc: Add FWNMI support


From: David Gibson
Subject: Re: [Qemu-ppc] [Qemu-devel] [PATCH v3 0/4] target-ppc: Add FWNMI support in qemu for powerKVM guests
Date: Thu, 3 Sep 2015 09:53:20 +1000
User-agent: Mutt/1.5.23 (2014-03-12)

On Wed, Sep 02, 2015 at 04:34:01PM +1000, Sam Bobroff wrote:
> On Tue, Sep 01, 2015 at 04:37:51PM +0530, Aravinda Prasad wrote:
> > 
> > 
> > On Monday 10 August 2015 09:35 AM, Sam Bobroff wrote:
> > > On Sun, Aug 09, 2015 at 03:53:02PM +0200, Alexander Graf wrote:
> > >>
> > >>
> > >> On 07.08.15 05:37, Sam Bobroff wrote:
[snip]
> > >>> (c) Assemble it (as above) but include it directly in the QEMU binary by
> > >>> objcopying it in or hexdumping into a C string or something similar. 
> > >>> This seems
> > >>> fairly neat but I'm not sure how people would feel about including 
> > >>> "binaries"
> > >>> into QEMU this way.  Although it would take some work in the build 
> > >>> system, it
> > >>> seems like a fairly neat solution to me.
> > >>
> > >> We tried to move away from code as hex arrays in QEMU to make it easier
> > >> for people to patch things when they want to. But then again if we're
> > >> talking 3 instructions it might not be the worst option.
> > > 
> > > Sounds sensible.
> > > 
> > > So, in summary, it sounds like a decent approach would be:
> > > * store the guest's handlers in QEMU's spapr structure,
> > > * simplify the trampolines down to a single, non-returning, hcall,
> > 
> > However, other instructions such as saving r3 and re-trying hcall are
> > still required.
> 
> Ah yes, that's true. I was thinking that the retrying could happen inside the
> hcall but it can't.

Sorry, I may have missed something here.  What does the code in the
vector need to retry?

Also, it looks like the vector will need at least one scratch register
(for the hcall number, if nothing else).  Does PAPR specify what SPRGs
the vector can clobber?  Obviously it can't be anything the guest
kernel uses.


Btw, does anyone know what happens with the VPA (and dispatch trace
log and so forth) on kexec() - it could be subject to the same stale
address problem, and rewriting vectors won't save us there.

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


reply via email to

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