[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 14/24] xen/arm: Introduce wrappers for MFN <-> MADDR and GFN <-> GADDR
On Tue, 13 Jun 2017, Julien Grall wrote: > The new wrappers will add more safety when converting an address to a > frame number (either machine or guest). A follow-up patch will use them > to simplify the code. > > Signed-off-by: Julien Grall <julien.grall@xxxxxxx> Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx> > --- > xen/include/asm-arm/mm.h | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/xen/include/asm-arm/mm.h b/xen/include/asm-arm/mm.h > index cc3220a6b7..a42da20f0a 100644 > --- a/xen/include/asm-arm/mm.h > +++ b/xen/include/asm-arm/mm.h > @@ -214,6 +214,10 @@ static inline void __iomem *ioremap_wc(paddr_t start, > size_t len) > #define pfn_to_paddr(pfn) ((paddr_t)(pfn) << PAGE_SHIFT) > #define paddr_to_pfn(pa) ((unsigned long)((pa) >> PAGE_SHIFT)) > #define paddr_to_pdx(pa) pfn_to_pdx(paddr_to_pfn(pa)) > +#define gfn_to_gaddr(gfn) pfn_to_paddr(gfn_x(gfn)) > +#define gaddr_to_gfn(ga) _gfn(paddr_to_pfn(ga)) > +#define mfn_to_maddr(mfn) pfn_to_paddr(mfn_x(mfn)) > +#define maddr_to_mfn(ma) _mfn(paddr_to_pfn(ma)) > #define vmap_to_mfn(va) paddr_to_pfn(virt_to_maddr((vaddr_t)va)) > #define vmap_to_page(va) mfn_to_page(vmap_to_mfn(va)) > > -- > 2.11.0 > _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |