From: Alexander Graf <agraf@suse.de>
To: KVM devel mailing list <kvm@vger.kernel.org>
Cc: Scott Wood <scottwood@freescale.com>
Subject: [PATCH 1/6] KVM: PPC: e500: emulate SVR
Date: Tue, 3 May 2011 14:36:56 +0200 [thread overview]
Message-ID: <1304426221-23178-2-git-send-email-agraf@suse.de> (raw)
In-Reply-To: <1304426221-23178-1-git-send-email-agraf@suse.de>
From: Scott Wood <scottwood@freescale.com>
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>
Signed-off-by: Alexander Graf <agraf@suse.de>
---
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.6.0.2
next prev parent reply other threads:[~2011-05-03 12:37 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-03 12:36 [PULL 0/6] PPC KVM patches Alexander Graf
2011-05-03 12:36 ` Alexander Graf [this message]
2011-05-03 12:36 ` [PATCH 2/6] KVM: PPC: fix exit accounting for SPRs, tlbwe, tlbsx Alexander Graf
2011-05-03 12:36 ` [PATCH 3/6] KVM: PPC: use ticks, not usecs, for exit timing Alexander Graf
2011-05-03 12:36 ` [PATCH 4/6] KVM: PPC: booke: save/restore VRSAVE (a.k.a. USPRG0) Alexander Graf
2011-05-03 12:37 ` [PATCH 5/6] KVM: PPC: booke: add sregs support Alexander Graf
2011-05-03 12:37 ` [PATCH 6/6] KVM: PPC: Add kvm headers to headers_install Alexander Graf
2011-05-03 14:20 ` Jan Kiszka
2011-05-03 14:36 ` Alexander Graf
2011-05-03 14:44 ` Jan Kiszka
2011-05-03 15:04 ` Alexander Graf
2011-05-03 15:10 ` Jan Kiszka
2011-05-03 15:14 ` Alexander Graf
2011-05-03 16:20 ` Scott Wood
2011-05-04 5:55 ` Alexander Graf
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=1304426221-23178-2-git-send-email-agraf@suse.de \
--to=agraf@suse.de \
--cc=kvm@vger.kernel.org \
--cc=scottwood@freescale.com \
/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).