lkml.org 
[lkml]   [2012]   [Mar]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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


\
 
 \ /
  Last update: 2012-03-14 02:01    [from the cache]
©2003-2011 Jasper Spaans