kvm: set page dirty only if page has been writable
authorYu Zhao <yuzhao@google.com>
Wed, 30 Mar 2016 20:38:09 +0000 (13:38 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 1 Apr 2016 10:10:10 +0000 (12:10 +0200)
commit14f4760562e41d50817d56b42c821d70ad10b483
treea5883be4834d815db85463c1218b20da509b1830
parent14ebda3394fd3e5388747e742e510b0802a65d24
kvm: set page dirty only if page has been writable

In absence of shadow dirty mask, there is no need to set page dirty
if page has never been writable. This is a tiny optimization but
good to have for people who care much about dirty page tracking.

Signed-off-by: Yu Zhao <yuzhao@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu.c