[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] xsm_remove_from_physmap is (so far) only defined for X86 architecture, not for ARM

On 01/11/2013 11:46 AM, Ian Campbell wrote:
> On Fri, 2013-01-11 at 16:36 +0000, Keir Fraser wrote:
>> On 11/01/2013 16:24, "Lars Rasmusson" <lra@xxxxxxx> wrote:
>>>> On 11/01/2013 13:32, "lra@xxxxxxx" <lra@xxxxxxx> wrote:
>>>>> From: Lars Rasmusson <Lars.Rasmusson@xxxxxxx>
>>>>> Signed-off-by: Lars Rasmusson <Lars.Rasmusson@xxxxxxx>
>>>> If this is a build fix after my checkins this morning then:
>>>> Acked-by: Keir Fraser <keir@xxxxxxx>
>>> Yes, the XEN_TARGET_ARCH=arm32 make  breaks when compiling memory.c
>>> In xen/include/xsm/dummy.h where many of the functions are used, some are
>>> declared only for X86, so I picked the same #ifdef CONFIG_X86
>>> as the header file uses.
>>> As Ian said, it's not pretty, but since ARM doesn't have xsm (yet?) I think
>>> adding a dummy xsm_remove_from_physmap for arm also is ugly.
>>> Is there some other way to write memory.c so that it doesn't need
>>> xsm_remove...?  (I mean, it does't need xsm_add....)
>> The XSM infrastructure is not architecture dependent. It's probably a
>> mistake that xsm_remove_from_physmap() is ifdef CONFIG_X86.
> Agreed.
> 8<---------------------
>>From fb57be285e956cadea51dc48a28fba77d752044d Mon Sep 17 00:00:00 2001
> From: Ian Campbell <ian.campbell@xxxxxxxxxx>
> Date: Fri, 11 Jan 2013 16:44:14 +0000
> Subject: [PATCH] xen arm: add XSM hooks to arch_memory_op
> Treat XENMEM_add_to_physmap_range the same as
> XENMEM_add_to_physmap.
> Reported-by: Lars Rasmusson <Lars.Rasmusson@xxxxxxx>
> Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
> Cc: Daniel De Graaf <dgdegra@xxxxxxxxxxxxx>
> ---
>  xen/arch/arm/mm.c       |   13 +++++++++++++
>  xen/include/xsm/dummy.h |   24 ++++++++++++------------
>  2 files changed, 25 insertions(+), 12 deletions(-)

I agree with the movement (neither of these hooks are x86-specific), but
this patch also needs to move the hooks in xen/include/xsm/xsm.h and
xen/xsm/flask/hooks.c out of the same #ifdefs.

On a mostly unrelated note, Ian: do you think it would be useful to add 
build tests with XSM enabled to catch these types of issues during the
automated testing?  It just requires "echo XSM_ENABLE=y > .config"
before the build, and is apparently best done for both x86 and arm.

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.