WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Re: [Xen-changelog] [xen-unstable] [HVM] save restore: new h

To: Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>, Zhai Edwin <edwin.zhai@xxxxxxxxx>
Subject: [Xen-devel] Re: [Xen-changelog] [xen-unstable] [HVM] save restore: new hyper-call
From: Hollis Blanchard <hollisb@xxxxxxxxxx>
Date: Fri, 19 Jan 2007 11:50:30 -0600
Cc: xen-ia64-devel <xen-ia64-devel@xxxxxxxxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx, xen-ppc-devel <xen-ppc-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 19 Jan 2007 09:52:02 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <200701190305.l0J35Ets030489@xxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: IBM Linux Technology Center
References: <200701190305.l0J35Ets030489@xxxxxxxxxxxxxxxxxxxxxx>
Reply-to: Hollis Blanchard <hollisb@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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

<Prev in Thread] Current Thread [Next in Thread>