summaryrefslogtreecommitdiff
path: root/arch/powerpc/kvm/book3s_64_mmu_host.c
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2012-08-03 11:56:33 (GMT)
committerAlexander Graf <agraf@suse.de>2012-08-16 12:14:53 (GMT)
commit249ba1ee0f8fcb4e40caa5fbea11dafde201cc46 (patch)
treecbe2fcf2c4e0c966afb3a7cacc785b608304a40c /arch/powerpc/kvm/book3s_64_mmu_host.c
parent04f995a544d1289ffb8108849cd71b1325c5af6a (diff)
downloadlinux-249ba1ee0f8fcb4e40caa5fbea11dafde201cc46.tar.xz
KVM: PPC: Add cache flush on page map
When we map a page that wasn't icache cleared before, do so when first mapping it in KVM using the same information bits as the Linux mapping logic. That way we are 100% sure that any page we map does not have stale entries in the icache. Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'arch/powerpc/kvm/book3s_64_mmu_host.c')
-rw-r--r--arch/powerpc/kvm/book3s_64_mmu_host.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/kvm/book3s_64_mmu_host.c b/arch/powerpc/kvm/book3s_64_mmu_host.c
index 10fc8ec..0688b6b 100644
--- a/arch/powerpc/kvm/book3s_64_mmu_host.c
+++ b/arch/powerpc/kvm/book3s_64_mmu_host.c
@@ -126,6 +126,8 @@ int kvmppc_mmu_map_page(struct kvm_vcpu *vcpu, struct kvmppc_pte *orig_pte)
if (!orig_pte->may_execute)
rflags |= HPTE_R_N;
+ else
+ kvmppc_mmu_flush_icache(hpaddr >> PAGE_SHIFT);
hash = hpt_hash(va, PTE_SIZE, MMU_SEGSIZE_256M);