diff options
author | Alexander Graf <agraf@suse.de> | 2010-04-15 18:11:49 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2010-05-17 05:18:40 -0400 |
commit | 33fd27c7d26ec869f637634526e7293027bd8746 (patch) | |
tree | 572ddc5cff8ad38114976768b92f994556f77f4a /arch/powerpc | |
parent | 53e5b8bbbd0d0305234b2cfeae400183db98f993 (diff) |
KVM: PPC: Release clean pages as clean
When we mapped a page as read-only, we can just release it as clean to
KVM's page claim mechanisms, because we're pretty sure it hasn't been
touched.
Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/kvm/book3s_64_mmu_host.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/powerpc/kvm/book3s_64_mmu_host.c b/arch/powerpc/kvm/book3s_64_mmu_host.c index 0eea589dbef0..b23015438371 100644 --- a/arch/powerpc/kvm/book3s_64_mmu_host.c +++ b/arch/powerpc/kvm/book3s_64_mmu_host.c | |||
@@ -55,7 +55,11 @@ static void invalidate_pte(struct hpte_cache *pte) | |||
55 | MMU_PAGE_4K, MMU_SEGSIZE_256M, | 55 | MMU_PAGE_4K, MMU_SEGSIZE_256M, |
56 | false); | 56 | false); |
57 | pte->host_va = 0; | 57 | pte->host_va = 0; |
58 | kvm_release_pfn_dirty(pte->pfn); | 58 | |
59 | if (pte->pte.may_write) | ||
60 | kvm_release_pfn_dirty(pte->pfn); | ||
61 | else | ||
62 | kvm_release_pfn_clean(pte->pfn); | ||
59 | } | 63 | } |
60 | 64 | ||
61 | void kvmppc_mmu_pte_flush(struct kvm_vcpu *vcpu, u64 guest_ea, u64 ea_mask) | 65 | void kvmppc_mmu_pte_flush(struct kvm_vcpu *vcpu, u64 guest_ea, u64 ea_mask) |