All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] KVM: PPC: e500: emulate SVR
@ 2011-03-29 21:49 Scott Wood
  2011-03-30  7:28 ` Alexander Graf
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Scott Wood @ 2011-03-29 21:49 UTC (permalink / raw)
  To: kvm-ppc

Return the actual host SVR for now, as we already do for PVR.  Eventually
we may support Qemu overriding PVR/SVR if the situation is appropriate,
once we implement KVM_SET_SREGS on e500.

Signed-off-by: Scott Wood <scottwood@freescale.com>
---
v2: Move to e500 code, and use a backing variable, even though we don't
support changing it yet.

 arch/powerpc/include/asm/kvm_e500.h |    1 +
 arch/powerpc/kvm/e500.c             |    1 +
 arch/powerpc/kvm/e500_emulate.c     |    2 ++
 3 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/include/asm/kvm_e500.h b/arch/powerpc/include/asm/kvm_e500.h
index 7fea26f..bb2a089 100644
--- a/arch/powerpc/include/asm/kvm_e500.h
+++ b/arch/powerpc/include/asm/kvm_e500.h
@@ -43,6 +43,7 @@ struct kvmppc_vcpu_e500 {
 
 	u32 host_pid[E500_PID_NUM];
 	u32 pid[E500_PID_NUM];
+	u32 svr;
 
 	u32 mas0;
 	u32 mas1;
diff --git a/arch/powerpc/kvm/e500.c b/arch/powerpc/kvm/e500.c
index e3768ee..0c1af12 100644
--- a/arch/powerpc/kvm/e500.c
+++ b/arch/powerpc/kvm/e500.c
@@ -63,6 +63,7 @@ int kvmppc_core_vcpu_setup(struct kvm_vcpu *vcpu)
 
 	/* Registers init */
 	vcpu->arch.pvr = mfspr(SPRN_PVR);
+	vcpu_e500->svr = mfspr(SPRN_SVR);
 
 	/* Since booke kvm only support one core, update all vcpus' PIR to 0 */
 	vcpu->vcpu_id = 0;
diff --git a/arch/powerpc/kvm/e500_emulate.c b/arch/powerpc/kvm/e500_emulate.c
index 8e3edfb..e2fb47f 100644
--- a/arch/powerpc/kvm/e500_emulate.c
+++ b/arch/powerpc/kvm/e500_emulate.c
@@ -175,6 +175,8 @@ int kvmppc_core_emulate_mfspr(struct kvm_vcpu *vcpu, int sprn, int rt)
 		kvmppc_set_gpr(vcpu, rt, vcpu_e500->hid0); break;
 	case SPRN_HID1:
 		kvmppc_set_gpr(vcpu, rt, vcpu_e500->hid1); break;
+	case SPRN_SVR:
+		kvmppc_set_gpr(vcpu, rt, vcpu_e500->svr); break;
 
 	case SPRN_MMUCSR0:
 		kvmppc_set_gpr(vcpu, rt, 0); break;
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] KVM: PPC: e500: emulate SVR
  2011-03-29 21:49 [PATCH v2] KVM: PPC: e500: emulate SVR Scott Wood
@ 2011-03-30  7:28 ` Alexander Graf
  2011-03-30  7:56 ` Avi Kivity
  2011-03-30  8:20 ` Alexander Graf
  2 siblings, 0 replies; 4+ messages in thread
From: Alexander Graf @ 2011-03-30  7:28 UTC (permalink / raw)
  To: kvm-ppc


On 29.03.2011, at 23:49, Scott Wood wrote:

> Return the actual host SVR for now, as we already do for PVR.  Eventually
> we may support Qemu overriding PVR/SVR if the situation is appropriate,
> once we implement KVM_SET_SREGS on e500.

Haha - maybe I should have read your v2 before replying to the other mail :). Thanks!
I'll take this patch into my staging tree.

Avi, please ack.


Alex


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] KVM: PPC: e500: emulate SVR
  2011-03-29 21:49 [PATCH v2] KVM: PPC: e500: emulate SVR Scott Wood
  2011-03-30  7:28 ` Alexander Graf
@ 2011-03-30  7:56 ` Avi Kivity
  2011-03-30  8:20 ` Alexander Graf
  2 siblings, 0 replies; 4+ messages in thread
From: Avi Kivity @ 2011-03-30  7:56 UTC (permalink / raw)
  To: kvm-ppc

On 03/30/2011 09:28 AM, Alexander Graf wrote:
> On 29.03.2011, at 23:49, Scott Wood wrote:
>
> >  Return the actual host SVR for now, as we already do for PVR.  Eventually
> >  we may support Qemu overriding PVR/SVR if the situation is appropriate,
> >  once we implement KVM_SET_SREGS on e500.
>
> Haha - maybe I should have read your v2 before replying to the other mail :). Thanks!
> I'll take this patch into my staging tree.
>
> Avi, please ack.
>

Looks fine.  As I mentioned on IRC, I'm primarily interested in 
guest/host and kernel/user interfaces.

-- 
error compiling committee.c: too many arguments to function


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] KVM: PPC: e500: emulate SVR
  2011-03-29 21:49 [PATCH v2] KVM: PPC: e500: emulate SVR Scott Wood
  2011-03-30  7:28 ` Alexander Graf
  2011-03-30  7:56 ` Avi Kivity
@ 2011-03-30  8:20 ` Alexander Graf
  2 siblings, 0 replies; 4+ messages in thread
From: Alexander Graf @ 2011-03-30  8:20 UTC (permalink / raw)
  To: kvm-ppc


On 30.03.2011, at 09:56, Avi Kivity wrote:

> On 03/30/2011 09:28 AM, Alexander Graf wrote:
>> On 29.03.2011, at 23:49, Scott Wood wrote:
>> 
>> >  Return the actual host SVR for now, as we already do for PVR.  Eventually
>> >  we may support Qemu overriding PVR/SVR if the situation is appropriate,
>> >  once we implement KVM_SET_SREGS on e500.
>> 
>> Haha - maybe I should have read your v2 before replying to the other mail :). Thanks!
>> I'll take this patch into my staging tree.
>> 
>> Avi, please ack.
>> 
> 
> Looks fine.  As I mentioned on IRC, I'm primarily interested in guest/host and kernel/user interfaces.

Ah, that part flew in after I left that client already O_o. Either way, thanks!


Alex


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-03-30  8:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-29 21:49 [PATCH v2] KVM: PPC: e500: emulate SVR Scott Wood
2011-03-30  7:28 ` Alexander Graf
2011-03-30  7:56 ` Avi Kivity
2011-03-30  8:20 ` Alexander Graf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.