[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] x86/mem_sharing: Rectify test for "empty" physmap entry in sharing_add_to_physmap
> diff -r f83397dfb6c0 -r 3169fba29613 xen/arch/x86/mm/mem_sharing.c > --- a/xen/arch/x86/mm/mem_sharing.c > +++ b/xen/arch/x86/mm/mem_sharing.c > @@ -1073,9 +1073,10 @@ int mem_sharing_add_to_physmap(struct do > if ( spage->sharing->handle != sh ) > goto err_unlock; > > - /* Make sure the target page is a hole in the physmap */ > - if ( mfn_valid(cmfn) || > - (!(p2m_is_ram(cmfn_type))) ) > + /* Make sure the target page is a hole in the physmap. These are > typically > + * p2m_mmio_dm, but also accept p2m_invalid and paged out pages. See the > + * definition of p2m_is_hole in p2m.h. */ > + if ( !p2m_is_hole(cmfn_type) || mfn_valid(cmfn) ) As I said last time, the mfn_valid test is wrong for everything except p2m_paging_in. I've checked in a reduced version of this that just drops p2m_paging_in from P2M_HOLE_TYPES (so the pager wins this race instead of the sharer) which I think will do for 4.2: http://xenbits.xen.org/hg/staging/xen-unstable.hg/rev/25bdef4493ae can you check that it makes sense, please? Cheers, Tim. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |