]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
KVM: MIPS/MMU: Pass GPA PTE bits to mapped GVA PTEs
authorJames Hogan <james.hogan@imgtec.com>
Tue, 6 Dec 2016 14:59:43 +0000 (14:59 +0000)
committerJames Hogan <james.hogan@imgtec.com>
Fri, 3 Feb 2017 15:21:27 +0000 (15:21 +0000)
commitf9b11e51f89f6d2eca2ca8f41bb0ceb07c943e60
treec4138efee7e3f28af17d439c8a79c98304b78eaf
parentb584f460e6d6f1bf968acfcd23aceb663ba996fa
KVM: MIPS/MMU: Pass GPA PTE bits to mapped GVA PTEs

Propagate the GPA PTE protection bits on to the GVA PTEs on a mapped
fault (except _PAGE_WRITE, and filtered by the guest TLB entry), rather
than always overriding the protection. This allows dirty page tracking
to work in mapped guest segments as a clear dirty bit in the GPA PTE
will propagate to the GVA PTEs even when the guest TLB has the dirty bit
set.

Since the filtering of protection bits is now abstracted, if the buddy
GVA PTE is also valid, we obtain the corresponding GPA PTE using a
simple non-allocating walk and load that into the GVA PTE similarly
(which may itself be invalid).

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: "Radim Krčmář" <rkrcmar@redhat.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Cc: kvm@vger.kernel.org
arch/mips/kvm/mmu.c