On 10/03/2017 04:20 PM, Sergey Dyasli wrote:
> There is a possibility for nested_p2m to became stale between
> nestedhvm_hap_nested_page_fault() and nestedhap_fix_p2m().  At the moment
> this is handled by detecting such a race inside nestedhap_fix_p2m() and
> special-casing it.
> 
> Instead, introduce p2m_get_nestedp2m_locked(), which will returned a
> still-locked p2m.  This allows us to call nestedhap_fix_p2m() with the
> lock held and remove the code detecting the special-case.
> 
> Signed-off-by: Sergey Dyasli <sergey.dya...@citrix.com>
> Signed-off-by: George Dunlap <george.dun...@citrix.com>

It seems really strange to have two functions named _locked() which have
different semantics (one of which assumes that the p2m has already been
locked, one which returns a p2m which is locked).  But I can't think of
a better option, so:

Reviewed-by: George Dunlap <george.dun...@citrix.com>

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

Reply via email to