|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v5 12/16] xen/mm: Switch common/memory.c to use typesafe MFN
Hi Jan, On 15/03/18 08:06, Jan Beulich wrote: On 14.03.18 at 19:20, <julien.grall@xxxxxxx> wrote: I thought the handle was different type at each call site. I was wrong, so turned it to static inline. The other thing I notice only now is perhaps a little much too ask for a mostly mechanical change like this one: All uses of this sit inside !paging_mode_translate() checks, hence these could do nothing on ARM and resolve to __copy_to_user() on x86 (with the type checking suitably lifted to here). I am quite reluctant to turn this function as nop for Arm. This is common code and should not assume the implementation of paging_mode_translate. Furthermore, I can't see the real benefits as the compiler will optimize out it.
I didn't do it because the line was getting too long and quite difficult to read if you split it. Also, technically the compiler will be clever enough to optimize the code. So I don't see the benefits of removing the variable. Cheers, -- Julien Grall _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |