summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kvm/booke.h
diff options
context:
space:
mode:
authorLiu Yu <yu.liu@freescale.com>2011-06-14 18:35:14 -0500
committerAvi Kivity <avi@redhat.com>2011-07-12 13:16:39 +0300
commitdd9ebf1f94354b010f2ac7a98bf69168636cb08e (patch)
treed7a6cbe2b31cd7349913d289b715fa1086ba0a1a /arch/powerpc/kvm/booke.h
parent08b7fa92b9250eab0f493f7721977e781a887b3d (diff)
downloadblackbird-op-linux-dd9ebf1f94354b010f2ac7a98bf69168636cb08e.tar.gz
blackbird-op-linux-dd9ebf1f94354b010f2ac7a98bf69168636cb08e.zip
KVM: PPC: e500: Add shadow PID support
Dynamically assign host PIDs to guest PIDs, splitting each guest PID into multiple host (shadow) PIDs based on kernel/user and MSR[IS/DS]. Use both PID0 and PID1 so that the shadow PIDs for the right mode can be selected, that correspond both to guest TID = zero and guest TID = guest PID. This allows us to significantly reduce the frequency of needing to invalidate the entire TLB. When the guest mode or PID changes, we just update the host PID0/PID1. And since the allocation of shadow PIDs is global, multiple guests can share the TLB without conflict. Note that KVM does not yet support the guest setting PID1 or PID2 to a value other than zero. This will need to be fixed for nested KVM to work. Until then, we enforce the requirement for guest PID1/PID2 to stay zero by failing the emulation if the guest tries to set them to something else. Signed-off-by: Liu Yu <yu.liu@freescale.com> Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'arch/powerpc/kvm/booke.h')
-rw-r--r--arch/powerpc/kvm/booke.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/powerpc/kvm/booke.h b/arch/powerpc/kvm/booke.h
index 0fa1732ddcb7..8e1fe33d64e5 100644
--- a/arch/powerpc/kvm/booke.h
+++ b/arch/powerpc/kvm/booke.h
@@ -53,6 +53,7 @@
extern unsigned long kvmppc_booke_handlers;
void kvmppc_set_msr(struct kvm_vcpu *vcpu, u32 new_msr);
+void kvmppc_mmu_msr_notify(struct kvm_vcpu *vcpu, u32 old_msr);
int kvmppc_booke_emulate_op(struct kvm_run *run, struct kvm_vcpu *vcpu,
unsigned int inst, int *advance);
OpenPOWER on IntegriCloud