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: [PATCH 2/8] HVM save restore: new hyper-call

To: Anthony Liguori <aliguori@xxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] Re: [PATCH 2/8] HVM save restore: new hyper-call
From: "Zhai, Edwin" <edwin.zhai@xxxxxxxxx>
Date: Sat, 13 Jan 2007 00:05:17 +0800
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, "Zhai, Edwin" <edwin.zhai@xxxxxxxxx>
Delivery-date: Fri, 12 Jan 2007 08:07:23 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <45A6740D.1010403@xxxxxxxxxxxxxxxxxx>
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>
References: <20070111140826.GA2860@xxxxxxxxxxxxxxxxxxxxxx> <45A6740D.1010403@xxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.11
On Thu, Jan 11, 2007 at 11:29:49AM -0600, Anthony Liguori wrote:
> Zhai, Edwin wrote:
> >+
> >+/* set info to hvm guest for restore */
> >+int xc_domain_hvm_setcontext(int xc_handle,
> >+                             uint32_t domid,
> >+                             hvm_domain_context_t *hvm_ctxt)
> >+{
> >+    int rc;
> >+    DECLARE_DOMCTL;
> >+
> >+    domctl.cmd = XEN_DOMCTL_sethvmcontext;
> >+    domctl.domain = domid;
> >+    set_xen_guest_handle(domctl.u.hvmcontext.ctxt, hvm_ctxt);
> >+
> >+    if ( (rc = mlock(hvm_ctxt, sizeof(*hvm_ctxt))) != 0 )
> >+        return rc;
> >+
> >+    rc = do_domctl(xc_handle, &domctl);
> >+
> >+    safe_munlock(hvm_ctxt, sizeof(*hvm_ctxt));
> >+
> >+    return rc;
> > }
> 
> Perhaps these should be lock_pages instead of calling mlock() directly?

yes, you are right. i forgot to refresh old patch when rebase.
attached minor fix is okay.

thanks,

> 
> Regards,
> 
> Anthony Liguori
> 

-- 
best rgds,
edwin

Attachment: hyper-call-fix.patch
Description: Text document

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>