KVM: MMU: Keep a reverse mapping of non-writable translations
authorIzik Eidus <izike@qumranet.com>
Tue, 16 Oct 2007 12:43:46 +0000 (14:43 +0200)
committerAvi Kivity <avi@qumranet.com>
Wed, 30 Jan 2008 15:52:54 +0000 (17:52 +0200)
commit9647c14c98687d0abf5197e74b9d1448ab6ebb95
tree6bd61ace880d9428c38ebe45858793d689ca4f4b
parent98348e9507ace5fda95432ff8ca23f13e7f66176
KVM: MMU: Keep a reverse mapping of non-writable translations

The current kvm mmu only reverse maps writable translation.  This is used
to write-protect a page in case it becomes a pagetable.

But with swapping support, we need a reverse mapping of read-only pages as
well:  when we evict a page, we need to remove any mapping to it, whether
writable or not.

Signed-off-by: Izik Eidus <izike@qumranet.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
drivers/kvm/mmu.c