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-ppc-devel

Re: [XenPPC][Patch 2/3] xen patches for xm save/restore

To: Hollis Blanchard <hollisb@xxxxxxxxxx>
Subject: Re: [XenPPC][Patch 2/3] xen patches for xm save/restore
From: geyi <kudva@xxxxxxxxxxxxxx>
Date: Thu, 02 Nov 2006 15:27:19 -0500
Cc: XenPPC-devel <xen-ppc-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Thu, 02 Nov 2006 13:45:48 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <1162494597.23822.7.camel@xxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-ppc-devel-request@lists.xensource.com?subject=help>
List-id: Xen PPC development <xen-ppc-devel.lists.xensource.com>
List-post: <mailto:xen-ppc-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=unsubscribe>
References: <454A217C.5070505@xxxxxxxxxxxxxx> <1162494597.23822.7.camel@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-ppc-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 1.5.0.7 (Windows/20060909)
Hollis Blanchard wrote:
On Thu, 2006-11-02 at 11:49 -0500, geyi wrote:
+    case XEN_DOMCTL_getshadowlist:
+    {
+       struct domain *d = find_domain_by_id(domctl->domain);
+       uint num_ptes;
+
+       printk(" XEN_DOMCTL_getshadowlist: \n");
+
+       ret = -EINVAL;
+       if ( d != NULL)
+       {
+          ret = 0;
+
+          domctl->u.getshadowlist.htab_map = (uint64_t)(d->arch.htab.map);
+          printk("htab_map: 0x%016lx\n",(uint64_t)(d->arch.htab.map));
+
+          num_ptes = 1UL << d->arch.htab.log_num_ptes;
+ domctl->u.getshadowlist.htab_num_ptes = num_ptes;

Here you've set htab_map to a machine address. What is the domain
supposed to do with that? Does "save" destroy the domain? Are you
expecting that address to be valid once the domain is destroyed?

The operation is called "getshadowlist", but there is no list here.
Wouldn't a copying a list into a domain-provided buffer make more sense?

The htab for a domain is not so small to copy it to the user space in one hcall. For a 64MB domain, the size of htab is 1MB(256 pages), and it grows when the domain becomes bigger. This hcall return the start point of the htab array to application. So user can access the shadow list page by page. Now this hcall is used only in domain save/restore scenario. The save process reads the shadow list, converts the mfn of each valid entry to pfn and save them to the file. After all things done, the saved domain will be destroyed. On the restore side, the machine address of new domain shadow list will be given with this call. The pte entries stored in file will be copied back to it, after the pfn in the entries is converted back to mfn. So the machine address of shadow list will be only used when domain is valid.

--
Yi Ge <kudva@xxxxxxxxxxxxxx>


_______________________________________________
Xen-ppc-devel mailing list
Xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ppc-devel

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