[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH RFC 25/55] x86_64/mm: introduce pl2e in setup_m2p_table
On Thu, 2019-02-07 at 16:44 +0000, Wei Liu wrote: > Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx> > --- > xen/arch/x86/x86_64/mm.c | 9 +++++---- > 1 file changed, 5 insertions(+), 4 deletions(-) > > diff --git a/xen/arch/x86/x86_64/mm.c b/xen/arch/x86/x86_64/mm.c > index 55fa338d71..d3e2398b6c 100644 > --- a/xen/arch/x86/x86_64/mm.c > +++ b/xen/arch/x86/x86_64/mm.c > @@ -397,7 +397,7 @@ static int setup_m2p_table(struct mem_hotadd_info > *info) > { > unsigned long i, va, smap, emap; > unsigned int n; > - l2_pgentry_t *l2_ro_mpt = NULL; > + l2_pgentry_t *pl2e = NULL, *l2_ro_mpt; nit: Here too, the next patch will add the NULL initialization back in. > l3_pgentry_t *l3_ro_mpt = NULL; > int ret = 0; > > @@ -458,7 +458,7 @@ static int setup_m2p_table(struct mem_hotadd_info > *info) > _PAGE_PSE)); > if ( l3e_get_flags(l3_ro_mpt[l3_table_offset(va)]) & > _PAGE_PRESENT ) > - l2_ro_mpt = > l3e_to_l2e(l3_ro_mpt[l3_table_offset(va)]) + > + pl2e = l3e_to_l2e(l3_ro_mpt[l3_table_offset(va)]) + > l2_table_offset(va); > else > { > @@ -473,11 +473,12 @@ static int setup_m2p_table(struct > mem_hotadd_info *info) > l3e_write(&l3_ro_mpt[l3_table_offset(va)], > l3e_from_paddr(__pa(l2_ro_mpt), > __PAGE_HYPERVISOR_RO | > _PAGE_USER)); > - l2_ro_mpt += l2_table_offset(va); > + pl2e = l2_ro_mpt; > + pl2e += l2_table_offset(va); nit: These could also be on a single line. - Stefan > } > > /* NB. Cannot be GLOBAL: guest user mode should not see > it. */ > - l2e_write(l2_ro_mpt, l2e_from_mfn(mfn, > + l2e_write(pl2e, l2e_from_mfn(mfn, > /*_PAGE_GLOBAL|*/_PAGE_PSE|_PAGE_USER|_PAGE_PRESE > NT)); > } > i += ( 1UL << (L2_PAGETABLE_SHIFT - 3)); Amazon Development Center Germany GmbH Krausenstr. 38 10117 Berlin Geschaeftsfuehrer: Christian Schlaeger, Ralf Herbrich Ust-ID: DE 289 237 879 Eingetragen am Amtsgericht Charlottenburg HRB 149173 B _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |