[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [XenPPC][Patch 2/3] xen patches for xm save/restore
Hollis Blanchard wrote: 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.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? -- Yi Ge <kudva@xxxxxxxxxxxxxx> _______________________________________________ Xen-ppc-devel mailing list Xen-ppc-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-ppc-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |