qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <dwg@au1.ibm.com>
To: Aurelien Jarno <aurelien@aurel32.net>
Cc: aliguori@us.ibm.com, qemu-ppc@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH 3/6] target-ppc: Extend FPU state for newer POWER CPUs
Date: Thu, 27 Sep 2012 10:03:04 +1000	[thread overview]
Message-ID: <20120927000304.GG31993@truffula.fritz.box> (raw)
In-Reply-To: <20120926063645.GK23819@ohm.aurel32.net>

On Wed, Sep 26, 2012 at 08:36:45AM +0200, Aurelien Jarno wrote:
> On Wed, Sep 26, 2012 at 01:12:18PM +1000, David Gibson wrote:
> > This patch adds some extra FPU state to CPUPPCState.  Specifically, fpscr
> > is extended to 64 bits, since some recent CPUs now have more status bits
> > than fit inside 64 bits, and we add the 32 VSR registers present on CPUs
> > with VSX (these extend the standard FP regs, which together with the
> > Altivec/VMX registers form a 64 x 128bit register file for VSX).
> > 
> > We don't actually support the instructions using these extra registers in
> > TCG yet, but we still a place to store the state so we can sync it with
> > KVM and savevm/loadvm it.  This patch updates the savevm code to not
> > fail on the extended state, but also does not actually save it - that's
> > a project for another patch.
> > 
> > Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
> > ---
> >  target-ppc/cpu.h       |    4 +++-
> >  target-ppc/machine.c   |    8 ++++++--
> >  target-ppc/translate.c |    2 +-
> >  3 files changed, 10 insertions(+), 4 deletions(-)
> > 
> > diff --git a/target-ppc/cpu.h b/target-ppc/cpu.h
> > index faf4404..846778f 100644
> > --- a/target-ppc/cpu.h
> > +++ b/target-ppc/cpu.h
> > @@ -963,7 +963,7 @@ struct CPUPPCState {
> >      /* floating point registers */
> >      float64 fpr[32];
> >      /* floating point status and control register */
> > -    uint32_t fpscr;
> > +    uint64_t fpscr;
> 
> This will break the TCG code, as fpscr is mapped as an i32 in TCG. Also
> if it is 64-bit only on PPC64 machines, it might be a good idea to
> change it to target_ulong instead, and use _tl in the TCG code.

Ah, good point, thanks for catching that.  Both changes made for the
next version.

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

  reply	other threads:[~2012-09-27  0:27 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-26  3:12 [Qemu-devel] [0/6] Pending pseries updates David Gibson
2012-09-26  3:12 ` [Qemu-devel] [PATCH 1/6] pseries: Set hash table size based on RAM size David Gibson
2012-09-26  3:12 ` [Qemu-devel] [PATCH 2/6] target-ppc: Remove unused power_mode field from cpu state David Gibson
2012-09-26  3:12 ` [Qemu-devel] [PATCH 3/6] target-ppc: Extend FPU state for newer POWER CPUs David Gibson
2012-09-26  6:36   ` Aurelien Jarno
2012-09-27  0:03     ` David Gibson [this message]
2012-09-26  3:12 ` [Qemu-devel] [PATCH 4/6] pseries: Implement PAPR NVRAM David Gibson
2012-09-26 12:55   ` Alexander Graf
2012-09-26 21:25     ` [Qemu-devel] [Qemu-ppc] " Alexander Graf
2012-09-26  3:12 ` [Qemu-devel] [PATCH 5/6] pseries: Don't test for MSR_PR for hypercalls under KVM David Gibson
2012-09-26  3:12 ` [Qemu-devel] [PATCH 6/6] ppc/pseries: Reset VPA registration on CPU reset David Gibson
2012-09-26 12:59 ` [Qemu-devel] [0/6] Pending pseries updates Alexander Graf
2012-09-26 23:31   ` [Qemu-devel] [Qemu-ppc] " David Gibson
2012-09-27  8:05     ` Alexander Graf
2012-09-27 10:29       ` 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=20120927000304.GG31993@truffula.fritz.box \
    --to=dwg@au1.ibm.com \
    --cc=aliguori@us.ibm.com \
    --cc=aurelien@aurel32.net \
    --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).