From: Hollis Blanchard <hollisb@us.ibm.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 3/6] Enable KVM for ppcemb.
Date: Thu, 11 Dec 2008 18:04:28 -0600 [thread overview]
Message-ID: <1229040268.26586.52.camel@localhost.localdomain> (raw)
In-Reply-To: <f43fc5580812111319y5651cdb4k5efb08450cd6c829@mail.gmail.com>
On Thu, 2008-12-11 at 23:19 +0200, Blue Swirl wrote:
> > +int kvm_arch_put_registers(CPUState *env)
> > +{
> > + struct kvm_regs regs;
> > + int ret;
> > + int i;
> > +
> > + ret = kvm_vcpu_ioctl(env, KVM_GET_REGS, ®s);
> > + if (ret < 0)
> > + return ret;
> > +
> > + /* cr is untouched in qemu and not existant in CPUState fr
> ppr */
> > + /* hflags is a morphed to MSR on ppc, no need to sync that
> down to kvm */
> > +
> > + regs.pc = env->nip;
> > +
> > + regs.ctr = env->ctr;
> > + regs.lr = env->lr;
> > + regs.xer = env->xer;
> > + regs.msr = env->msr;
> > +
> > + regs.srr0 = env->spr[SPR_SRR0];
> > + regs.srr1 = env->spr[SPR_SRR1];
> > +
> > + regs.sprg0 = env->spr[SPR_SPRG0];
> > + regs.sprg1 = env->spr[SPR_SPRG1];
> > + regs.sprg2 = env->spr[SPR_SPRG2];
> > + regs.sprg3 = env->spr[SPR_SPRG3];
> > + regs.sprg4 = env->spr[SPR_SPRG4];
> > + regs.sprg5 = env->spr[SPR_SPRG5];
> > + regs.sprg6 = env->spr[SPR_SPRG6];
> > + regs.sprg7 = env->spr[SPR_SPRG7];
> > +
> > + for (i = 0;i < 32; i++)
> > + regs.gpr[i] = env->gpr[i];
> > +
> > + ret = kvm_vcpu_ioctl(env, KVM_SET_REGS, ®s);
> > + if (ret < 0)
> > + return ret;
> > +
> > + return ret;
> > +}
>
> Maybe this is a dumb question, but why don't you get/put floating
> point registers?
Not a dumb question. Qemu won't change the floating point registers at
all, so there is no need to push to KVM. For debugging purposes ("info
registers" or gdbstub) it might be nice to pull the FP state from KVM,
but we simply haven't needed to do that so far.
--
Hollis Blanchard
IBM Linux Technology Center
next prev parent reply other threads:[~2008-12-12 0:04 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-11 20:52 [Qemu-devel] PowerPC KVM support Hollis Blanchard
2008-12-11 20:52 ` [Qemu-devel] [PATCH 1/6] Include headers for types used in helper_regs.h Hollis Blanchard
2008-12-11 20:52 ` [Qemu-devel] [PATCH 2/6] kvm: sync vcpu state during initialization Hollis Blanchard
2008-12-11 20:57 ` [Qemu-devel] " Hollis Blanchard
2008-12-11 21:24 ` [Qemu-devel] " Anthony Liguori
2008-12-13 0:23 ` Hollis Blanchard
2008-12-13 0:24 ` Hollis Blanchard
2008-12-13 16:37 ` Anthony Liguori
2008-12-11 20:52 ` [Qemu-devel] [PATCH 3/6] Enable KVM for ppcemb Hollis Blanchard
2008-12-11 21:19 ` Blue Swirl
2008-12-12 0:04 ` Hollis Blanchard [this message]
2008-12-11 21:30 ` Anthony Liguori
2008-12-11 22:54 ` Hollis Blanchard
2008-12-14 1:37 ` Hollis Blanchard
2008-12-14 3:29 ` Anthony Liguori
2008-12-11 20:52 ` [Qemu-devel] [PATCH 4/6] Implement device tree support needed for Bamboo emulation Hollis Blanchard
2008-12-11 21:33 ` Anthony Liguori
2008-12-11 20:52 ` [Qemu-devel] [PATCH 5/6] PowerPC 440EP SoC emulation Hollis Blanchard
2008-12-11 20:52 ` [Qemu-devel] [PATCH 6/6] IBM PowerPC 440EP Bamboo reference board emulation Hollis Blanchard
2008-12-11 21:25 ` Blue Swirl
2008-12-11 21:39 ` Anthony Liguori
2008-12-11 23:08 ` Hollis Blanchard
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=1229040268.26586.52.camel@localhost.localdomain \
--to=hollisb@us.ibm.com \
--cc=qemu-devel@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).