[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v2 03/15] xen: harmonize return types of hypercall handlers
On 01.11.2021 16:20, 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. > > 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. > > 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. I continue to have reservations here, but I'll leave ack-ing of this to the kexec maintainer. > Signed-off-by: Juergen Gross <jgross@xxxxxxxx> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx> with one further nit: > --- a/xen/arch/x86/x86_64/platform_hypercall.c > +++ b/xen/arch/x86/x86_64/platform_hypercall.c > @@ -4,10 +4,11 @@ > > EMIT_FILE; > > +#include <xen/hypercall.h> > +#include <xen/types.h> > #include <xen/lib.h> > #include <compat/platform.h> Would have been nice if the addition was done such that the result was properly sorted; one way to do that would be to simply omit xen/types.h which already gets included by xen/lib.h (and very likely always will be). Also I'm not convinced the do_get_debugreg() hoops are really useful to retain if one way or another we need to rely on implementation defined behavior anyway. Jan
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |