[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 2 of 2] x86/mm: New mem access type to log access
> At 16:58 -0500 on 29 Nov (1322585905), Andres Lagar-Cavilla wrote: >> @@ -1162,10 +1167,13 @@ int p2m_mem_access_check(unsigned long g >> } >> else >> { >> - /* A listener is not required, so clear the access >> restrictions */ >> - p2m_lock(p2m); >> - p2m->set_entry(p2m, gfn, mfn, PAGE_ORDER_4K, p2mt, >> p2m_access_rwx); >> - p2m_unlock(p2m); >> + if ( p2ma != p2m_access_n2rwx ) >> + { >> + /* A listener is not required, so clear the access >> restrictions */ >> + p2m_lock(p2m); >> + p2m->set_entry(p2m, gfn, mfn, PAGE_ORDER_4K, p2mt, >> p2m_access_rwx); >> + p2m_unlock(p2m); >> + } >> return 1; >> } > > This logic is getting a bit convoluted, and I'm not sure it's correct. > If a page is marked n2rwx and there's no listener, it looks like this > will cause it to spin forever re-taking the fault rather than pausing it > waiting for the listener to attach. The entry is set to p2m_access_rwx, so no additional faults will be generated. In the n2rwx case, the entry was promoted to rwx previously, in a p2m_lock protected section. We're avoiding a repeat here. Andres > > Cheers, > > Tim. > _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |