xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Mukesh Rathor <mukesh.rathor@oracle.com>
To: Mukesh Rathor <mukesh.rathor@oracle.com>
Cc: Xen-devel@lists.xensource.com, george.dunlap@eu.citrix.com,
	Julien Grall <julien.grall@linaro.org>,
	tim@xen.org, keir.xen@gmail.com, JBeulich@suse.com
Subject: Re: [V5 PATCH 6/7] pvh dom0: Add and remove foreign pages
Date: Thu, 5 Dec 2013 18:40:46 -0800	[thread overview]
Message-ID: <20131205184046.0b79d5aa@mantra.us.oracle.com> (raw)
In-Reply-To: <20131205175717.0ced0f81@mantra.us.oracle.com>

On Thu, 5 Dec 2013 17:57:17 -0800
Mukesh Rathor <mukesh.rathor@oracle.com> wrote:

> On Thu, 05 Dec 2013 13:12:57 +0000
> Julien Grall <julien.grall@linaro.org> wrote:
> 
> > On 12/05/2013 02:05 AM, Mukesh Rathor wrote:
> 
> ......
> 
> > > -        page = get_page_from_gfn(d, xrfp.gpfn, NULL, P2M_ALLOC);
> > > -        if ( page )
> > > +        /*
> > > +         * if PVH, the gfn could be mapped to a mfn from foreign
> > > domain by the
> > > +         * user space tool during domain creation. We need to
> > > check for that,
> > > +         * free it up from the p2m, and release refcnt on it. In
> > > such a case,
> > > +         * page would be NULL and the following call would not
> > > have refcnt'd
> > > +         * the page. See also xenmem_add_foreign_to_p2m().
> > > +         */
> > > +        page = get_page_from_gfn(d, xrfp.gpfn, &p2mt, P2M_ALLOC);
> > 
> > Actually, on debug build, get_page_from_gfn on ARM will crash Xen.
> > For now we have an ASSERT to check if the type (p2m_type_t *) is
> > NULL.
> 
> Thanks for noticing that. Wish you had also mentioned if it'd be OK to
> remove the assert from arm to save a day, George is closing the
> checking window on me :). If not OK to remove the assert, I'll ifdef
> the get_page_from_gfn, or rework the logic. May be I'll try that
> anyways... 

Never mind, I reworked the logic so that p2mt is now being passed NULL
in the common code as before. See V6.

thanks
Mukesh

  reply	other threads:[~2013-12-06  2:40 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-05  2:05 [V5 PATCH 0/7]: PVH dom0 Mukesh Rathor
2013-12-05  2:05 ` [V5 PATCH 1/7] pvh dom0: move some pv specific code to static functions Mukesh Rathor
2013-12-05  2:05 ` [V5 PATCH 2/7] pvh dom0: construct_dom0 changes Mukesh Rathor
2013-12-05  2:05 ` [V5 PATCH 3/7] pvh dom0: implement XENMEM_add_to_physmap_range for x86 Mukesh Rathor
2013-12-05  2:05 ` [V5 PATCH 4/7] pvh dom0: Introduce p2m_map_foreign Mukesh Rathor
2013-12-05  2:05 ` [V5 PATCH 5/7] pvh: change xsm_add_to_physmap Mukesh Rathor
2013-12-05  2:05 ` [V5 PATCH 6/7] pvh dom0: Add and remove foreign pages Mukesh Rathor
2013-12-05 12:00   ` Ian Campbell
2013-12-06  1:15     ` Mukesh Rathor
2013-12-06  1:32       ` Mukesh Rathor
2013-12-06 10:18         ` Ian Campbell
2013-12-07  2:07           ` Mukesh Rathor
2013-12-06 10:15       ` Ian Campbell
2013-12-05 12:47   ` Julien Grall
2013-12-06  1:39     ` Mukesh Rathor
2013-12-05 13:12   ` Julien Grall
2013-12-06  1:57     ` Mukesh Rathor
2013-12-06  2:40       ` Mukesh Rathor [this message]
2013-12-05  2:05 ` [V5 PATCH 7/7] pvh dom0: add opt_dom0pvh to setup.c Mukesh Rathor

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=20131205184046.0b79d5aa@mantra.us.oracle.com \
    --to=mukesh.rathor@oracle.com \
    --cc=JBeulich@suse.com \
    --cc=Xen-devel@lists.xensource.com \
    --cc=george.dunlap@eu.citrix.com \
    --cc=julien.grall@linaro.org \
    --cc=keir.xen@gmail.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).