[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 15/15] xen: arm: handle 40-bit addresses in the p2m
On Thu, 2013-11-28 at 17:41 +0000, Stefano Stabellini wrote: > On Fri, 22 Nov 2013, Ian Campbell wrote: > > On the X-gene platform there are resources up this high which must be mapped > > to dom0. > > > > Remove the first level page from the p2m->pages list since it is actually > > two > > pages and must be freed as such. Do so in p2m_teardown. > > > > I've also punted on the implementation of dump_p2m_lookup for high > > addresses... > > > > Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx> > > --- > > v2: > > Remove irrelevant commentary from commit message > > No longer RFC > > --- > > xen/arch/arm/p2m.c | 60 > > +++++++++++++++++++++++++++++++++++++++++----------- > > 1 file changed, 48 insertions(+), 12 deletions(-) > > > > diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c > > index 82dda65..af32511 100644 > > --- a/xen/arch/arm/p2m.c > > +++ b/xen/arch/arm/p2m.c > > @@ -7,6 +7,10 @@ > > #include <asm/flushtlb.h> > > #include <asm/gic.h> > > > > +/* First level P2M is 2 consecutive pages */ > > +#define P2M_FIRST_ORDER 1 > > +#define P2M_FIRST_ENTRIES (LPAE_ENTRIES<<P2M_FIRST_ORDER) > > + > > void dump_p2m_lookup(struct domain *d, paddr_t addr) > > { > > struct p2m_domain *p2m = &d->arch.p2m; > > @@ -14,6 +18,12 @@ void dump_p2m_lookup(struct domain *d, paddr_t addr) > > > > printk("dom%d IPA 0x%"PRIpaddr"\n", d->domain_id, addr); > > > > + if ( first_linear_offset(addr) > LPAE_ENTRIES ) > > + { > > + printk("Cannot dump addresses in second of first level > > pages...\n"); > > + return; > > + } > > + > > printk("P2M @ %p mfn:0x%lx\n", > > p2m->first_level, page_to_mfn(p2m->first_level)); > > > > @@ -31,6 +41,30 @@ void p2m_load_VTTBR(struct domain *d) > > isb(); /* Ensure update is visible */ > > } > > > > +static int p2m_first_level_index(paddr_t addr) > > Would it make sense to make this an inline function? I'm happy to let gcc figure out if it makes sense or not based on the callsites etc, rather than second guessing. > Regardless you have my acked-by. Thanks, I'll apply this series in the morning. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |