diff options
author | Alexander Graf <agraf@suse.de> | 2012-08-03 13:56:33 +0200 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2012-08-16 14:14:53 +0200 |
commit | 249ba1ee0f8fcb4e40caa5fbea11dafde201cc46 (patch) | |
tree | cbe2fcf2c4e0c966afb3a7cacc785b608304a40c /arch/powerpc/kvm/e500_tlb.c | |
parent | 04f995a544d1289ffb8108849cd71b1325c5af6a (diff) |
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/e500_tlb.c')
-rw-r--r-- | arch/powerpc/kvm/e500_tlb.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/powerpc/kvm/e500_tlb.c b/arch/powerpc/kvm/e500_tlb.c index c510fc961302..fb3bb3ad8b3c 100644 --- a/arch/powerpc/kvm/e500_tlb.c +++ b/arch/powerpc/kvm/e500_tlb.c @@ -539,6 +539,9 @@ static inline void kvmppc_e500_shadow_map(struct kvmppc_vcpu_e500 *vcpu_e500, kvmppc_e500_setup_stlbe(&vcpu_e500->vcpu, gtlbe, tsize, ref, gvaddr, stlbe); + + /* Clear i-cache for new pages */ + kvmppc_mmu_flush_icache(pfn); } /* XXX only map the one-one case, for now use TLB0 */ |