From: Tim Deegan <tim@xen.org>
To: Mukesh Rathor <mukesh.rathor@oracle.com>
Cc: "Xen-devel@lists.xensource.com" <Xen-devel@lists.xensource.com>
Subject: Re: [RFC PATCH 13/16]: PVH xen: introduce p2m_map_foreign
Date: Thu, 7 Feb 2013 10:56:21 +0000 [thread overview]
Message-ID: <20130207105621.GA77133@ocelot.phlegethon.org> (raw)
In-Reply-To: <20130131183824.3af5e6a0@mantra.us.oracle.com>
At 18:38 -0800 on 31 Jan (1359657504), Mukesh Rathor wrote:
> On Thu, 24 Jan 2013 17:18:15 +0000
> Tim Deegan <tim@xen.org> 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?
Currently, guest_physmap_add_entry() just overwrites the old entry,
allowing the guest to leak it if it wants to. It's perhaps not the best
interface in the world, but I think PVH guetst should get the same
treatment as HVM ones.
Tim.
prev parent reply other threads:[~2013-02-07 10:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-12 2:09 [RFC PATCH 13/16]: PVH xen: introduce p2m_map_foreign Mukesh Rathor
2013-01-14 12:21 ` Jan Beulich
2013-01-24 17:18 ` Tim Deegan
2013-02-01 2:38 ` Mukesh Rathor
2013-02-07 10:56 ` Tim Deegan [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130207105621.GA77133@ocelot.phlegethon.org \
--to=tim@xen.org \
--cc=Xen-devel@lists.xensource.com \
--cc=mukesh.rathor@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).