[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v3 02/13] xen: harmonize return types of hypercall handlers
Hi, On 08/12/2021 15:55, Juergen Gross wrote: Today most hypercall handlers have a return type of long, while the compat ones return an int. There are a few exceptions from that rule, however. So on Arm64, I don't think you can make use of the full 64-bit because a 32-bit domain would not be able to see the top 32-bit. In fact, this could potentially cause us some trouble (see [1]) in Xen.So it feels like the hypercalls should always return a 32-bit signed value on Arm. The other advantage is it would be clear that the top 32-bit are not usuable. Stefano, what do you think? Get rid of the exceptions by letting compat handlers always return int and others always return long. For the compat hvm case use eax instead of rax for the stored result as it should have been from the beginning. Additionally move some prototypes to include/asm-x86/hypercall.h as they are x86 specific. Move the do_physdev_op() prototype from both architecture dependant headers to the common one. Move the compat_platform_op() prototype to the common header. Switch some non style compliant types (u32, s32, s64) to style compliant ones. TBH, I think this should have been split because the modifications are done on lines that are untouched. The extra patch would have made the review easier (even if this patch is still quite small). Rename paging_domctl_continuation() to do_paging_domctl_cont() and add a matching define for the associated hypercall. Make do_callback_op() and compat_callback_op() more similar by adding the const attribute to compat_callback_op()'s 2nd parameter. Change the type of the cmd parameter for [do|compat]_kexec_op() to unsigned int, as this is more appropriate for the compat case. Signed-off-by: Juergen Gross <jgross@xxxxxxxx> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx> Cheers,[1] [1] https://lore.kernel.org/xen-devel/20211206142032.27536-1-michal.orzel@xxxxxxx/ -- Julien Grall
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |