summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kvm/book3s_64_mmu_host.c
diff options
context:
space:
mode:
authorAlexander Graf2012-08-03 13:56:33 +0200
committerAlexander Graf2012-08-16 14:14:53 +0200
commit249ba1ee0f8fcb4e40caa5fbea11dafde201cc46 (patch)
treecbe2fcf2c4e0c966afb3a7cacc785b608304a40c /arch/powerpc/kvm/book3s_64_mmu_host.c
parentKVM: PPC: Book3S HV: Fix incorrect branch in H_CEDE code (diff)
downloadkernel-qcow2-linux-249ba1ee0f8fcb4e40caa5fbea11dafde201cc46.tar.gz
kernel-qcow2-linux-249ba1ee0f8fcb4e40caa5fbea11dafde201cc46.tar.xz
kernel-qcow2-linux-249ba1ee0f8fcb4e40caa5fbea11dafde201cc46.zip
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 10fc8ec9d2a8..0688b6b39585 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);