|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH RFC XEN v1 12/14] tools: libxc: implement modify_returncode for ARM.
On Wed, 9 Dec 2015, Ian Campbell wrote:
> Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
> ---
> tools/libxc/xc_resume.c | 18 ++++++++++++++++++
> 1 file changed, 18 insertions(+)
>
> diff --git a/tools/libxc/xc_resume.c b/tools/libxc/xc_resume.c
> index 87d4324..fa16c3e 100644
> --- a/tools/libxc/xc_resume.c
> +++ b/tools/libxc/xc_resume.c
> @@ -81,6 +81,24 @@ static int modify_returncode(xc_interface *xch, uint32_t
> domid)
> return 0;
> }
>
> +#elif defined (__arm__) || defined(__aarch64__)
> +
> +static int modify_returncode(xc_interface *xch, uint32_t domid)
> +{
> + vcpu_guest_context_any_t ctxt;
> + int rc;
Should we call xc_domain_getinfo and check for info.shutdown_reason !=
SHUTDOWN_suspend, like x86 does?
> + if ( (rc = xc_vcpu_getcontext(xch, domid, 0, &ctxt)) != 0 )
> + return rc;
> +
> + ctxt.c.user_regs.x0 = 1;
> +
> + if ( (rc = xc_vcpu_setcontext(xch, domid, 0, &ctxt)) != 0 )
> + return rc;
> +
> + return 0;
> +}
> +
> #else
>
> static int modify_returncode(xc_interface *xch, uint32_t domid)
> --
> 2.6.1
>
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |