[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 04/14] x86/p2m: Fix locking in p2m_altp2m_lazy_copy()
On 11/21/18 3:21 PM, Andrew Cooper wrote: > The gfn references need to remain held until after the p2m_set_entry() has > completed. This is only a latent bug for now, because there is no per-gfn > locking and we recursively hold the main p2m locks. > > Rearrange the code to have a single exit path, and defer taking the ap2m lock > until it is necessary to do so. Leave some comments behind to help people > attempting to follow the logic. > > Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> > --- > CC: Jan Beulich <JBeulich@xxxxxxxx> > CC: Wei Liu <wei.liu2@xxxxxxxxxx> > CC: Roger Pau Monné <roger.pau@xxxxxxxxxx> > CC: Razvan Cojocaru <rcojocaru@xxxxxxxxxxxxxxx> > CC: Tamas K Lengyel <tamas@xxxxxxxxxxxxx> > CC: George Dunlap <george.dunlap@xxxxxxxxxxxxx> > --- > xen/arch/x86/mm/p2m.c | 27 ++++++++++++++++++++------- > 1 file changed, 20 insertions(+), 7 deletions(-) > > diff --git a/xen/arch/x86/mm/p2m.c b/xen/arch/x86/mm/p2m.c > index b5a59d6..ae9cb20 100644 > --- a/xen/arch/x86/mm/p2m.c > +++ b/xen/arch/x86/mm/p2m.c > @@ -2184,24 +2184,29 @@ bool_t p2m_altp2m_lazy_copy(struct vcpu *v, paddr_t > gpa, > unsigned long mask; > mfn_t mfn; > int rv; > + bool ret; Thanks for the patches! This one looks good, except I think you'll want to also change the return type of p2m_altp2m_lazy_copy() from bool_t to bool. With that: Reviewed-by: Razvan Cojocaru <rcojocaru@xxxxxxxxxxxxxxx> Thanks, Razvan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |