Message ID | 20210703171152.15874-4-julien@xen.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | xen/arm: Properly disable M2P on Arm | expand |
On 03.07.2021 19:11, Julien Grall wrote: > From: Julien Grall <julien.grall@arm.com> > > The current implementation of mfn_to_gfn() is completely bogus and > there are no plan to implement an M2P on Arm. As there are no more > users, drop the helper. > s/plan/plans/ > At the same time rework a comment in Arm code that does not make sense. > > Signed-off-by: Julien Grall <julien.grall@arm.com> Reviewed-by: Michal Orzel <michal.orzel@arm.com> > > --- > Changes in v5: > - Rebase to the latest Xen > - The patch is now arm only because mfn_to_gmfn() has > been dropped on x86 and the arm helper was renamed to > mfn_to_gfn(). > > Changes in v4: > - Remove acks as the patch is old > > Changes in v2: > - Add Jan's and Stefano's acked-by > --- > xen/include/asm-arm/mm.h | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/xen/include/asm-arm/mm.h b/xen/include/asm-arm/mm.h > index ded74d29da0c..07c24654a0b6 100644 > --- a/xen/include/asm-arm/mm.h > +++ b/xen/include/asm-arm/mm.h > @@ -326,9 +326,8 @@ struct page_info *get_page_from_gva(struct vcpu *v, vaddr_t va, > #define SHARED_M2P_ENTRY (~0UL - 1UL) > #define SHARED_M2P(_e) ((_e) == SHARED_M2P_ENTRY) > > -/* Xen always owns P2M on ARM */ > +/* We don't have a M2P on Arm */ > #define set_gpfn_from_mfn(mfn, pfn) do { (void) (mfn), (void)(pfn); } while (0) > -#define mfn_to_gfn(d, mfn) ((void)(d), _gfn(mfn_x(mfn))) > > /* Arch-specific portion of memory_op hypercall. */ > long arch_memory_op(int op, XEN_GUEST_HANDLE_PARAM(void) arg); >
On Tue, 6 Jul 2021, Michal Orzel wrote: > On 03.07.2021 19:11, Julien Grall wrote: > > From: Julien Grall <julien.grall@arm.com> > > > > The current implementation of mfn_to_gfn() is completely bogus and > > there are no plan to implement an M2P on Arm. As there are no more > > users, drop the helper. > > > s/plan/plans/ > > At the same time rework a comment in Arm code that does not make sense. > > > > Signed-off-by: Julien Grall <julien.grall@arm.com> > Reviewed-by: Michal Orzel <michal.orzel@arm.com> Acked-by: Stefano Stabellini <sstabellini@kernel.org> > > --- > > Changes in v5: > > - Rebase to the latest Xen > > - The patch is now arm only because mfn_to_gmfn() has > > been dropped on x86 and the arm helper was renamed to > > mfn_to_gfn(). > > > > Changes in v4: > > - Remove acks as the patch is old > > > > Changes in v2: > > - Add Jan's and Stefano's acked-by > > --- > > xen/include/asm-arm/mm.h | 3 +-- > > 1 file changed, 1 insertion(+), 2 deletions(-) > > > > diff --git a/xen/include/asm-arm/mm.h b/xen/include/asm-arm/mm.h > > index ded74d29da0c..07c24654a0b6 100644 > > --- a/xen/include/asm-arm/mm.h > > +++ b/xen/include/asm-arm/mm.h > > @@ -326,9 +326,8 @@ struct page_info *get_page_from_gva(struct vcpu *v, vaddr_t va, > > #define SHARED_M2P_ENTRY (~0UL - 1UL) > > #define SHARED_M2P(_e) ((_e) == SHARED_M2P_ENTRY) > > > > -/* Xen always owns P2M on ARM */ > > +/* We don't have a M2P on Arm */ > > #define set_gpfn_from_mfn(mfn, pfn) do { (void) (mfn), (void)(pfn); } while (0) > > -#define mfn_to_gfn(d, mfn) ((void)(d), _gfn(mfn_x(mfn))) > > > > /* Arch-specific portion of memory_op hypercall. */ > > long arch_memory_op(int op, XEN_GUEST_HANDLE_PARAM(void) arg); > > >
diff --git a/xen/include/asm-arm/mm.h b/xen/include/asm-arm/mm.h index ded74d29da0c..07c24654a0b6 100644 --- a/xen/include/asm-arm/mm.h +++ b/xen/include/asm-arm/mm.h @@ -326,9 +326,8 @@ struct page_info *get_page_from_gva(struct vcpu *v, vaddr_t va, #define SHARED_M2P_ENTRY (~0UL - 1UL) #define SHARED_M2P(_e) ((_e) == SHARED_M2P_ENTRY) -/* Xen always owns P2M on ARM */ +/* We don't have a M2P on Arm */ #define set_gpfn_from_mfn(mfn, pfn) do { (void) (mfn), (void)(pfn); } while (0) -#define mfn_to_gfn(d, mfn) ((void)(d), _gfn(mfn_x(mfn))) /* Arch-specific portion of memory_op hypercall. */ long arch_memory_op(int op, XEN_GUEST_HANDLE_PARAM(void) arg);