[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v1 2/8]: PVH mmu changes



On Fri, 2012-09-21 at 20:15 +0100, Mukesh Rathor wrote:
> 
> +int pvh_rem_xen_p2m(unsigned long spfn, int count)
> +{
> +       struct xen_remove_from_physmap xrp;
> +       int i, rc;
> +
> +       for (i=0; i < count; i++) {
> +               xrp.domid = DOMID_SELF;
> +               xrp.gpfn = spfn+i;
> +               rc = HYPERVISOR_memory_op(XENMEM_remove_from_physmap, &xrp);

It seems that the current implementation of this hypercall in the h/v
doesn't handle unmapping of foreign pages, since it requires that the
page be owned by the domain whose P2M it is manipulating.

How did you fix this on the hypervisor side? I'd like to make sure I do
things consistently on the ARM side.

Talking with Tim it seems like having foreign mappings in a p2m is a bit
tricky and needs a bit of careful thought WRT reference counting etc.

Ian.


> +               if (rc) {
> +                       pr_warn("Failed to unmap pfn:%lx rc:%d done:%d\n",
> +                               spfn+i, rc, i);
> +                       return 1;
> +               }
> +       }
> +       return 0;
> +}
> +EXPORT_SYMBOL_GPL(pvh_rem_xen_p2m); 



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.