[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v10 01/13] x86/mm: rewrite virt_to_xen_l*e
On 21.04.2021 16:15, Hongyan Xia wrote: > From: Wei Liu <wei.liu2@xxxxxxxxxx> > > Rewrite those functions to use the new APIs. Modify its callers to unmap > the pointer returned. Since alloc_xen_pagetable_new() is almost never > useful unless accompanied by page clearing and a mapping, introduce a > helper alloc_map_clear_xen_pt() for this sequence. > > Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx> > Signed-off-by: Hongyan Xia <hongyxia@xxxxxxxxxx> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx> albeit ... > @@ -4941,33 +4961,33 @@ static l3_pgentry_t *virt_to_xen_l3e(unsigned long v) > if ( !(l4e_get_flags(*pl4e) & _PAGE_PRESENT) ) > { > bool locking = system_state > SYS_STATE_boot; > - l3_pgentry_t *l3t = alloc_xen_pagetable(); > + mfn_t l3mfn; > + l3_pgentry_t *l3t = alloc_mapped_pagetable(&l3mfn); > > if ( !l3t ) > return NULL; > - clear_page(l3t); > + UNMAP_DOMAIN_PAGE(l3t); ... this immediate unmapping (and then re-mapping below) will imo want re-doing down the road as well. Even if it's not a severe performance hit, it's simply odd, at least to me. Jan
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |