aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-12-02 18:56:17 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2008-12-02 18:56:17 -0500
commitb7d626606201c397319b40721ca558b7e54040d5 (patch)
tree465c4004c514c3d47f4f7f60bed99cb19b8e5ec8 /arch/powerpc
parente6d9f0fb5f9ceca5f4945f12cd3e71efd3382c13 (diff)
parent6c475352e87224a8f0b8cc6f6cc96b30563dc5b4 (diff)
Merge branch 'kvm-updates/2.6.28' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm
* 'kvm-updates/2.6.28' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm: KVM: MMU: avoid creation of unreachable pages in the shadow KVM: ppc: stop leaking host memory on VM exit KVM: MMU: fix sync of ptes addressed at owner pagetable KVM: ia64: Fix: Use correct calling convention for PAL_VPS_RESUME_HANDLER KVM: ia64: Fix incorrect kbuild CFLAGS override KVM: VMX: Fix interrupt loss during race with NMI KVM: s390: Fix problem state handling in guest sigp handler
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/include/asm/kvm_ppc.h2
-rw-r--r--arch/powerpc/kvm/44x_tlb.c8
-rw-r--r--arch/powerpc/kvm/powerpc.c1
3 files changed, 11 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/kvm_ppc.h b/arch/powerpc/include/asm/kvm_ppc.h
index 8931ba729d2b..bb62ad876de3 100644
--- a/arch/powerpc/include/asm/kvm_ppc.h
+++ b/arch/powerpc/include/asm/kvm_ppc.h
@@ -104,4 +104,6 @@ static inline void kvmppc_set_pid(struct kvm_vcpu *vcpu, u32 new_pid)
104 } 104 }
105} 105}
106 106
107extern void kvmppc_core_destroy_mmu(struct kvm_vcpu *vcpu);
108
107#endif /* __POWERPC_KVM_PPC_H__ */ 109#endif /* __POWERPC_KVM_PPC_H__ */
diff --git a/arch/powerpc/kvm/44x_tlb.c b/arch/powerpc/kvm/44x_tlb.c
index 2e227a412bc2..ad72c6f9811f 100644
--- a/arch/powerpc/kvm/44x_tlb.c
+++ b/arch/powerpc/kvm/44x_tlb.c
@@ -124,6 +124,14 @@ static void kvmppc_44x_shadow_release(struct kvm_vcpu *vcpu,
124 } 124 }
125} 125}
126 126
127void kvmppc_core_destroy_mmu(struct kvm_vcpu *vcpu)
128{
129 int i;
130
131 for (i = 0; i <= tlb_44x_hwater; i++)
132 kvmppc_44x_shadow_release(vcpu, i);
133}
134
127void kvmppc_tlbe_set_modified(struct kvm_vcpu *vcpu, unsigned int i) 135void kvmppc_tlbe_set_modified(struct kvm_vcpu *vcpu, unsigned int i)
128{ 136{
129 vcpu->arch.shadow_tlb_mod[i] = 1; 137 vcpu->arch.shadow_tlb_mod[i] = 1;
diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c
index 90a6fc422b23..fda9baada132 100644
--- a/arch/powerpc/kvm/powerpc.c
+++ b/arch/powerpc/kvm/powerpc.c
@@ -238,6 +238,7 @@ int kvm_arch_vcpu_init(struct kvm_vcpu *vcpu)
238 238
239void kvm_arch_vcpu_uninit(struct kvm_vcpu *vcpu) 239void kvm_arch_vcpu_uninit(struct kvm_vcpu *vcpu)
240{ 240{
241 kvmppc_core_destroy_mmu(vcpu);
241} 242}
242 243
243/* Note: clearing MSR[DE] just means that the debug interrupt will not be 244/* Note: clearing MSR[DE] just means that the debug interrupt will not be