save restore: new hyper-call
A message that is not in the archive (sent off-list or not yet received): [email protected]
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.
Signature · 2 lines
Hollis Blanchard IBM Linux Technology Center
Quoted 20 lines · Xen patchbot-unstable
# HG changeset patch
# User Tim Deegan <[email protected]> # Date 1169138884 0
# Node ID44668189f354a3d928e4e5a37df416ffc2992772# Parent1e590ddb127789cfde6ed29eef0127b79bfff2a8[HVM] save restore: new hyper-callSigned-off-by Zhai Edwin <[email protected]>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(+)
...
Quoted 90 lines
diff -r
1e590ddb1277-r44668189f354xen/common/domctl.cxen/common/domctl.c +73
-0@@ -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;
Quoted 2 lines · Hollis Blanchard
This patch breaks PowerPC, which does not supply
arch_(get| set)hvm_ctxt(). In fact, I don't see where IA64 supplies these either.
We don't. This definitely breaks ia64 as well. Thanks,
Alex
Signature · 1 line
Alex Williamson HP Open Source & Linux Org.
Quoted 4 lines · Hollis Blanchard
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.
Now done.
K.