On Mon, 2015-10-26 at 07:06 -0600, Jan Beulich wrote:
> > > > On 19.10.15 at 16:51, wrote:
>
> "REST" maintainers, could I please get an ack or otherwise on this
> common code change?
>
> Thanks, Jan
>
> > --- a/xen/common/page_alloc.c
> > +++ b/xen/common/page_alloc.c
> > @@ -1959,22 +1959,16 @@ __initcall(pagealloc_keyhandler_init);
> >
> > void scrub_one_page(struct page_info *pg)
> > {
> > -void *p;
> > -
> > if ( unlikely(pg->count_info & PGC_broken) )
> > return;
> >
> > -p = __map_domain_page(pg);
> > -
> > #ifndef NDEBUG
> > /* Avoid callers relying on allocations returning zeroed pages. */
> > -memset(p, 0xc2, PAGE_SIZE);
> > +unmap_domain_page(memset(__map_domain_page(pg), 0xc2, PAGE_SIZE));
I'm not madly keep on this clever nesting of the map/memset/unmap and would
have preferred a more localised void *p (or a memset_domain_page helper
maybe), but I don't mind enough to block this over:
Acked-by: Ian Campbell
> > #else
> > /* For a production build, clear_page() is the fastest way to
> > scrub. */
> > -clear_page(p);
> > +clear_domain_page(_mfn(page_to_mfn(pg)));
> > #endif
> > -
> > -unmap_domain_page(p);
> > }
> >
> > static void dump_heap(unsigned char key)
>
>
>
___
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel