[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] x86/altp2m: cleanup p2m_altp2m_lazy_copy
On Fri, Apr 12, 2019 at 10:48 AM Andrew Cooper <andrew.cooper3@xxxxxxxxxx> wrote: > > On 12/04/2019 17:39, Tamas K Lengyel wrote: > > The p2m_altp2m_lazy_copy is responsible for lazily populating an altp2m view > > when the guest traps out due to no EPT entry being present in the active > > view. > > Currently the function took several inputs that it didn't use and also > > locked/unlocked gfns when it didn't need to. > > I've got a series, "[PATCH 00/14] XSA-277 followup" which is still > waiting for mm review, which cleans some of this up, but came to a > different conclusion about the locking safety of the GFNs. > > Specifically, > > [PATCH 04/14] x86/p2m: Fix locking in p2m_altp2m_lazy_copy() > > (and some other cleanup changes in patch 5 and 6) which extends the > duration of the gfn locks. Thanks, I remember seeing that but I think my approach here is more straight forward. The caller of this function already has all the info gathered from the hostp2m (and holds the lock) this function needs, so no need to duplicate that within the function. Additionally getting the p2m_lock for the altp2m while also holding a gfn lock from the altp2m seems to me like it's not really accomplishing anything since the gfn_lock is really just p2m_lock in disguise. So let's just get the p2m_lock once and be done with it. Tamas _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |