|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH RFC v1 25/74] x86/shutdown: Support for using SCHEDOP_{shutdown, reboot}
>>> On 04.01.18 at 14:05, <wei.liu2@xxxxxxxxxx> wrote:
> From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
>
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
with two remarks:
> --- a/xen/include/asm-x86/guest/hypercall.h
> +++ b/xen/include/asm-x86/guest/hypercall.h
> @@ -19,6 +19,11 @@
> #ifndef __X86_XEN_HYPERCALL_H__
> #define __X86_XEN_HYPERCALL_H__
>
> +#include <xen/types.h>
> +
> +#include <public/xen.h>
> +#include <public/sched.h>
> +
> #ifdef CONFIG_XEN_GUEST
Why do you #include ahead of the #ifdef?
> @@ -78,6 +83,30 @@
> (type)res; \
> })
>
> +/*
> + * Primitive Hypercall wrappers
> + */
> +static inline long xen_hypercall_sched_op(unsigned int cmd, void *arg)
> +{
> + return _hypercall64_2(long, __HYPERVISOR_sched_op, cmd, arg);
> +}
> +
> +/*
> + * Higher level hypercall helpers
> + */
> +static inline long xen_hypercall_shutdown(unsigned int reason)
> +{
> + return xen_hypercall_sched_op(SCHEDOP_shutdown, &reason);
It would seem more correct if you went through struct
sched_shutdown here.
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |