aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc/include/asm
diff options
context:
space:
mode:
authorHollis Blanchard <hollisb@us.ibm.com>2008-11-10 14:57:36 -0600
committerAvi Kivity <avi@redhat.com>2008-12-31 16:52:26 +0200
commitfe4e771d5c37f0949047faf95d16a512b21406bf (patch)
tree518b4ff17a8e1e62b747ce1912c08b62883d2855 /arch/powerpc/include/asm
parentdf9b856c454e331bc394c80903fcdea19cae2a33 (diff)
KVM: ppc: fix userspace mapping invalidation on context switch
We used to defer invalidating userspace TLB entries until jumping out of the kernel. This was causing MMU weirdness most easily triggered by using a pipe in the guest, e.g. "dmesg | tail". I believe the problem was that after the guest kernel changed the PID (part of context switch), the old process's mappings were still present, and so copy_to_user() on the "return to new process" path ended up using stale mappings. Testing with large pages (64K) exposed the problem, probably because with 4K pages, pressure on the TLB faulted all process A's mappings out before the guest kernel could insert any for process B. Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/powerpc/include/asm')
-rw-r--r--arch/powerpc/include/asm/kvm_44x.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/kvm_44x.h b/arch/powerpc/include/asm/kvm_44x.h
index dece0935071..72e593914ad 100644
--- a/arch/powerpc/include/asm/kvm_44x.h
+++ b/arch/powerpc/include/asm/kvm_44x.h
@@ -44,4 +44,6 @@ static inline struct kvmppc_vcpu_44x *to_44x(struct kvm_vcpu *vcpu)
return container_of(vcpu, struct kvmppc_vcpu_44x, vcpu);
}
+void kvmppc_set_pid(struct kvm_vcpu *vcpu, u32 new_pid);
+
#endif /* __ASM_44X_H__ */