This patch breaks PowerPC, which does not supply arch_(get|
set)hvm_ctxt(). In fact, I don't see where IA64 supplies these either.
Please revert and refactor into arch_do_domctl(), thanks.
--
Hollis Blanchard
IBM Linux Technology Center
On Thu, 2007-01-18 at 19:05 -0800, Xen patchbot-unstable wrote:
> # HG changeset patch
> # User Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>
> # Date 1169138884 0
> # Node ID 44668189f354a3d928e4e5a37df416ffc2992772
> # Parent 1e590ddb127789cfde6ed29eef0127b79bfff2a8
> [HVM] save restore: new hyper-call
>
> Signed-off-by: Zhai Edwin <edwin.zhai@xxxxxxxxx>
>
> add a pair of hyper-call for hvm guest context
> ---
> tools/libxc/xc_domain.c | 44 +++++++
> tools/libxc/xenctrl.h | 24 +++
> xen/arch/x86/hvm/hvm.c | 8 +
> xen/arch/x86/hvm/intercept.c | 231
> ++++++++++++++++++++++++++++++++++++++
> xen/common/domctl.c | 73 ++++++++++++
> xen/include/asm-x86/hvm/domain.h | 17 ++
> xen/include/asm-x86/hvm/support.h | 125 ++++++++++++++++++++
> xen/include/public/domctl.h | 16 ++
> 8 files changed, 538 insertions(+)
...
> diff -r 1e590ddb1277 -r 44668189f354 xen/common/domctl.c
> --- a/xen/common/domctl.c Thu Jan 18 16:48:03 2007 +0000
> +++ b/xen/common/domctl.c Thu Jan 18 16:48:04 2007 +0000
> @@ -215,6 +215,39 @@ ret_t do_domctl(XEN_GUEST_HANDLE(xen_dom
> }
> break;
>
> + case XEN_DOMCTL_sethvmcontext:
> + {
> + struct hvm_domain_context *c;
> + struct domain *d;
> + struct vcpu *v;
> +
> + ret = -ESRCH;
> + if ( (d = find_domain_by_id(op->domain)) == NULL )
> + break;
> +
> + ret = -ENOMEM;
> + if ( (c = xmalloc(struct hvm_domain_context)) == NULL )
> + goto sethvmcontext_out;
> +
> + v = d->vcpu[0];
> +
> + ret = -EFAULT;
> +
> +#ifndef CONFIG_COMPAT
> + if ( copy_from_guest(c, op->u.hvmcontext.ctxt, 1) != 0 )
> + goto sethvmcontext_out;
> +
> + ret = arch_sethvm_ctxt(v, c);
> +#endif
> +
> + xfree(c);
> +
> + sethvmcontext_out:
> + put_domain(d);
> +
> + }
> + break;
> +
> case XEN_DOMCTL_pausedomain:
> {
> struct domain *d = find_domain_by_id(op->domain);
> @@ -552,6 +585,46 @@ ret_t do_domctl(XEN_GUEST_HANDLE(xen_dom
> }
> break;
>
> + case XEN_DOMCTL_gethvmcontext:
> + {
> + struct hvm_domain_context *c;
> + struct domain *d;
> + struct vcpu *v;
> +
> + ret = -ESRCH;
> + if ( (d = find_domain_by_id(op->domain)) == NULL )
> + break;
> +
> + ret = -ENOMEM;
> + if ( (c = xmalloc(struct hvm_domain_context)) == NULL )
> + goto gethvmcontext_out;
> +
> + v = d->vcpu[0];
> +
> + ret = -ENODATA;
> + if ( !test_bit(_VCPUF_initialised, &v->vcpu_flags) )
> + goto gethvmcontext_out;
> +
> + ret = 0;
> + if (arch_gethvm_ctxt(v, c) == -1)
> + ret = -EFAULT;
> +
> +#ifndef CONFIG_COMPAT
> + if ( copy_to_guest(op->u.hvmcontext.ctxt, c, 1) )
> + ret = -EFAULT;
> +
> + xfree(c);
> +#endif
> +
> + if ( copy_to_guest(u_domctl, op, 1) )
> + ret = -EFAULT;
> +
> + gethvmcontext_out:
> + put_domain(d);
> +
> + }
> + break;
> +
> case XEN_DOMCTL_getvcpuinfo:
> {
> struct domain *d;
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|