Messages in this thread |  | | | Date | Wed, 14 Mar 2012 10:04:35 +0900 | | From | Takuya Yoshikawa <> | | Subject | Re: [PATCH 2/4] KVM: Avoid checking huge page mappings in get_dirty_log() |
| |
Marcelo Tosatti <mtosatti@redhat.com> wrote:
> > This is a race with hugetlbfs which is not an issue ATM (it is > hidden by the removal of huge sptes in get_dirty).
Thank you! I did not notice this possibility at all.
...
> It can be fixed with a preceding patch that checks whether > slot->dirty_bitmap value changes between mapping_level and after > mmu_lock acquision, similarly to mmu_seq. Also please add a > WARN_ON in mmu_set_spte if(slot->dirty_bitmap && level > 1). > And document it clearly.
We may also be able to change the "if (slot->dirty_bitmap)" check to use another flag so that we can delay the start of logging until mmu_lock acquisition in kvm_set_memory_region(). Looking dirty_bitmap directly should be limited to when we are in get_dirty functions.
Takuya
|  |