qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Hollis Blanchard <hollisb@us.ibm.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: qemu-devel@nongnu.org, kvm-ppc@vger.kernel.org
Subject: Re: [Qemu-devel] [PATCH 3/6] Enable KVM for ppcemb.
Date: Thu, 11 Dec 2008 16:54:13 -0600	[thread overview]
Message-ID: <1229036053.26586.41.camel@localhost.localdomain> (raw)
In-Reply-To: <49418662.8000205@codemonkey.ws>

On Thu, 2008-12-11 at 15:30 -0600, Anthony Liguori wrote:
> Hollis Blanchard wrote:
> > +int kvm_arch_get_registers(CPUState *env)
> > +{
> > +	struct kvm_regs regs;
> > +	uint32_t i, ret;
> > +
> > +	ret = kvm_vcpu_ioctl(env, KVM_GET_REGS, &regs);
> > +	if (ret < 0)
> > +		return ret;
> > +
> > +	env->ctr = regs.ctr;
> > +	env->lr = regs.lr;
> > +	env->xer = regs.xer;
> > +	env->msr = regs.msr;
> > +	/* calculate hflags based on the current msr using the ppc qemu helper */
> > +	hreg_compute_hflags(env);
> >   
> 
> Do you need this?  Practically speaking, I don't even think we need to 
> maintain them on x86 anymore.

Ah, it seems you're right. That's good.

> > diff --git a/target-ppc/kvm_ppc.c b/target-ppc/kvm_ppc.c
> > new file mode 100644
> > index 0000000..b2b56df
> > --- /dev/null
> > +++ b/target-ppc/kvm_ppc.c
> >   
> 
> Hence my confusion.  These are just kvm related helper?
> 
> I don't know that kvm_ppc.c is a very information name for this sort of 
> stuff.  Since this is really host specific, not target specific, why not 
> move it out of target-ppc.

I could combine kvm_ppc.c into target-ppc/kvm.c. However, they're really
two different things, and I thought it would cause the least confusion
if they were logically separate. Most of it is hooks required by common
code, and then some of it isn't. (I'm thinking about e.g. IA64 doing a
copy/paste, and then wondering which functions they actually need to
implement.) Regardless, I will still need a kvm_ppc.h, so kvm_ppc.c
seemed like a good place to match.

I don't see that you can call any KVM code either host- or
target-specific, since by definition they are the same.

-- 
Hollis Blanchard
IBM Linux Technology Center

  reply	other threads:[~2008-12-11 22:54 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
2008-12-11 21:30     ` Anthony Liguori
2008-12-11 22:54       ` Hollis Blanchard [this message]
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=1229036053.26586.41.camel@localhost.localdomain \
    --to=hollisb@us.ibm.com \
    --cc=anthony@codemonkey.ws \
    --cc=kvm-ppc@vger.kernel.org \
    --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).