summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kvm/book3s_emulate.c
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2010-04-20 02:49:54 +0200
committerAvi Kivity <avi@redhat.com>2010-05-17 12:19:08 +0300
commitb83d4a9cfc81503a082331cc5d1e480d99f3a531 (patch)
tree50e042408f2f7cc16b23b2c83462e8d8cc71d987 /arch/powerpc/kvm/book3s_emulate.c
parent251585b5d02152973dbc24c803ca322bb977d4a2 (diff)
downloadop-kernel-dev-b83d4a9cfc81503a082331cc5d1e480d99f3a531.zip
op-kernel-dev-b83d4a9cfc81503a082331cc5d1e480d99f3a531.tar.gz
KVM: PPC: Enable native paired singles
When we're on a paired single capable host, we can just always enable paired singles and expose them to the guest directly. This approach breaks when multiple VMs run and access PS concurrently, but this should suffice until we get a proper framework for it in Linux. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/powerpc/kvm/book3s_emulate.c')
-rw-r--r--arch/powerpc/kvm/book3s_emulate.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/powerpc/kvm/book3s_emulate.c b/arch/powerpc/kvm/book3s_emulate.c
index 3f7afb5..c85f906 100644
--- a/arch/powerpc/kvm/book3s_emulate.c
+++ b/arch/powerpc/kvm/book3s_emulate.c
@@ -365,7 +365,10 @@ int kvmppc_core_emulate_mtspr(struct kvm_vcpu *vcpu, int sprn, int rs)
case 0x00083213: /* gekko 2.3b */
case 0x00083204: /* gekko 2.4 */
case 0x00083214: /* gekko 2.4e (8SE) - retail HW2 */
- if (spr_val & (1 << 29)) { /* HID2.PSE */
+ case 0x00087200: /* broadway */
+ if (vcpu->arch.hflags & BOOK3S_HFLAG_NATIVE_PS) {
+ /* Native paired singles */
+ } else if (spr_val & (1 << 29)) { /* HID2.PSE */
vcpu->arch.hflags |= BOOK3S_HFLAG_PAIRED_SINGLE;
kvmppc_giveup_ext(vcpu, MSR_FP);
} else {
OpenPOWER on IntegriCloud