|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [RFC PATCH 13/16]: PVH xen: introduce p2m_map_foreign
On Thu, 24 Jan 2013 17:18:15 +0000
Tim Deegan <tim@xxxxxxx> wrote:
> At 18:09 -0800 on 11 Jan (1357927784), Mukesh Rathor wrote:
> > @@ -584,6 +584,11 @@ guest_physmap_add_entry(struct domain *d
> > {
> > ASSERT(mfn_valid(omfn));
> > set_gpfn_from_mfn(mfn_x(omfn), INVALID_M2P_ENTRY);
> > +
> > + /* Because PVH domU uses kmalloc for grant pfn, we
> > need to save
> > + * and restore the old mfn */
> > + if (is_pvh_domain(d) && p2m_is_grant(t))
> > + free_domheap_page(mfn_to_page(omfn));
>
> I think you'll need to explain this in more detail. The comment
> assumes that the guest is running linux, which is worrying. And in
> any case you can't just free_domheap_page() the guest's memory! What
> if another domain has a reference to it?
Ok, I fixed linux side so instead of kmalloc it uses ballooning to
get pfn space for the grant table. That means there should not be
an omfn here. If there is, I think I should just fail the operation,
ie, guest_physmap_add_entry(), right?
thanks,
Mukesh
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |