lkml.org 
[lkml]   [2007]   [Mar]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch -mm 1/2] i386: add ptep_test_and_clear_{dirty,young}
Hugh Dickins wrote:
> On Sun, 25 Mar 2007, Zachary Amsden wrote:
>
>> If you actually clear the bit, you need to:
>>
>> + pte_update_defer(vma->vm_mm, addr, ptep);
>>
>> The reason is, when updating PTEs, the hypervisor must be notified. Using
>> atomic operations to do this is fine for all hypervisors I am aware of.
>> However, for hypervisors which shadow page tables, if these PTE modifications
>> are not trapped, you need a post-modification call to fulfill the update of
>> the shadow page table.
>>
>
> Thanks for the very rapid response.
>
> So, David just needs to move the pte_update_defer out of
> ptep_clear_flush_* and into ptep_test_and_clear_*?
>

Yes.

> That leaves me wondering why you deleted ptep_test_and_clear_*
> (while leaving their __HAVE_ARCHes) in the first place?
>

Because raw use of them in the arch independent MM code would introduce
exactly this bug on i386, so leaving __HAVE_ARCH but leaving out the
definition would catch this case.

Zach
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-03-26 21:23    [W:0.273 / U:0.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site