[PATCH v2 06/15] KVM: MMU: update spte and add it into rmap before dirty log

2013-09-05 Thread Xiao Guangrong
kvm_vm_ioctl_get_dirty_log() write-protects the spte based on the its dirty bitmap, so we should ensure the writable spte can be found in rmap before the dirty bitmap is visible. Otherwise, we clear the dirty bitmap but fail to write-protect the page which is detailed in the comments in this patch

[PATCH v2 06/15] KVM: MMU: update spte and add it into rmap before dirty log

2013-09-05 Thread Xiao Guangrong
kvm_vm_ioctl_get_dirty_log() write-protects the spte based on the its dirty bitmap, so we should ensure the writable spte can be found in rmap before the dirty bitmap is visible. Otherwise, we clear the dirty bitmap but fail to write-protect the page which is detailed in the comments in this patch