]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: MMU: lazily drop large spte
authorXiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Tue, 5 Feb 2013 07:11:09 +0000 (15:11 +0800)
committerMarcelo Tosatti <mtosatti@redhat.com>
Thu, 7 Feb 2013 00:28:01 +0000 (22:28 -0200)
commit38feb0fffc99b645860f6358f78b0b51d225c957
tree327bd3a7bca9cc02e4f4c157885ddd0340d009ee
parente88d1ead7f3567f2cea2e4cdf6326af8b8e4f5ab
KVM: MMU: lazily drop large spte

Currently, kvm zaps the large spte if write-protected is needed, the later
read can fault on that spte. Actually, we can make the large spte readonly
instead of making them not present, the page fault caused by read access can
be avoided

The idea is from Avi:
| As I mentioned before, write-protecting a large spte is a good idea,
| since it moves some work from protect-time to fault-time, so it reduces
| jitter.  This removes the need for the return value.

Reviewed-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
arch/x86/kvm/mmu.c