From: Mukesh Rathor <mukesh.rathor@oracle.com>
To: Tim Deegan <tim@xen.org>
Cc: "Xen-devel@lists.xensource.com" <Xen-devel@lists.xensource.com>
Subject: Re: [PATCH 14/18 V2]: PVH xen: add xenmem_add_foreign_to_pmap()
Date: Mon, 8 Apr 2013 18:58:15 -0700 [thread overview]
Message-ID: <20130408185815.02f1a18c@mantra.us.oracle.com> (raw)
In-Reply-To: <20130408171758.006e8761@mantra.us.oracle.com>
On Mon, 8 Apr 2013 17:17:58 -0700
Mukesh Rathor <mukesh.rathor@oracle.com> wrote:
> On Thu, 21 Mar 2013 17:41:46 +0000
> Tim Deegan <tim@xen.org> wrote:
>
> > > diff --git a/xen/common/memory.c b/xen/common/memory.c
> > > index 68501d1..91a56b6 100644
> >
>
> Actually, looking at this again, I can't find reason why I can't just
> change get_page_from_gfn_p2m() to return page for foreign also:
>
> if ( likely(!p2m_locked_by_me(p2m)) )
> {
> /* Fast path: look up and get out */
> p2m_read_lock(p2m);
> mfn = __get_gfn_type_access(p2m, gfn, t, a, 0, NULL, 0);
> if ( (p2m_is_ram(*t) || p2m_is_grant(*t) ||
> p2m_is_foreign(*t)) <==== && mfn_valid(mfn)
> && !((q & P2M_UNSHARE) && p2m_is_shared(*t)) )
> {
> page = mfn_to_page(mfn);
> if ( !get_page(page, d)
> /* Page could be shared */
> && !get_page(page, dom_cow) )
> page = NULL;
> }
> ......
Nah, get_page() barfs on me because the mfn owner is foreign domain.
Sigh... any suggestion? May be for now, I can just leave
get_page_from_gfn_p2m() as is, and put my change back in
XENMEM_remove_from_physmap where it checks for p2m_is_foreign.
thanks,
Mukesh
prev parent reply other threads:[~2013-04-09 1:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-16 0:58 [PATCH 14/18 V2]: PVH xen: add xenmem_add_foreign_to_pmap() Mukesh Rathor
2013-03-21 17:41 ` Tim Deegan
2013-04-06 2:07 ` Mukesh Rathor
2013-04-09 0:17 ` Mukesh Rathor
2013-04-09 1:58 ` Mukesh Rathor [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=20130408185815.02f1a18c@mantra.us.oracle.com \
--to=mukesh.rathor@oracle.com \
--cc=Xen-devel@lists.xensource.com \
--cc=tim@xen.org \
/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).