aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kvm/e500_tlb.h
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2010-07-29 14:47:43 +0200
committerAvi Kivity <avi@redhat.com>2010-10-24 10:50:43 +0200
commit666e7252a15b7fc4a116e65deaf6da5e4ce660e3 (patch)
treee7a56f03cb4e181eacd4f481fb3e6e038ad05b82 /arch/powerpc/kvm/e500_tlb.h
parent96bc451a153297bf1f99ef2d633d512ea349ae7a (diff)
downloadkernel_samsung_smdk4412-666e7252a15b7fc4a116e65deaf6da5e4ce660e3.zip
kernel_samsung_smdk4412-666e7252a15b7fc4a116e65deaf6da5e4ce660e3.tar.gz
kernel_samsung_smdk4412-666e7252a15b7fc4a116e65deaf6da5e4ce660e3.tar.bz2
KVM: PPC: Convert MSR to shared page
One of the most obvious registers to share with the guest directly is the MSR. The MSR contains the "interrupts enabled" flag which the guest has to toggle in critical sections. So in order to bring the overhead of interrupt en- and disabling down, let's put msr into the shared page. Keep in mind that even though you can fully read its contents, writing to it doesn't always update all state. There are a few safe fields that don't require hypervisor interaction. See the documentation for a list of MSR bits that are safe to be set from inside the guest. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/powerpc/kvm/e500_tlb.h')
-rw-r--r--arch/powerpc/kvm/e500_tlb.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/kvm/e500_tlb.h b/arch/powerpc/kvm/e500_tlb.h
index d28e301..458946b 100644
--- a/arch/powerpc/kvm/e500_tlb.h
+++ b/arch/powerpc/kvm/e500_tlb.h
@@ -171,7 +171,7 @@ static inline int tlbe_is_host_safe(const struct kvm_vcpu *vcpu,
/* Does it match current guest AS? */
/* XXX what about IS != DS? */
- if (get_tlb_ts(tlbe) != !!(vcpu->arch.msr & MSR_IS))
+ if (get_tlb_ts(tlbe) != !!(vcpu->arch.shared->msr & MSR_IS))
return 0;
gpa = get_tlb_raddr(tlbe);