xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
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: [RFC PATCH 14/16]: PVH xen: add xenmem_add_foreign_to_pmap()
Date: Fri, 15 Feb 2013 16:17:35 -0800	[thread overview]
Message-ID: <20130215161735.0d25c6dd@mantra.us.oracle.com> (raw)
In-Reply-To: <20130214103927.GE83752@ocelot.phlegethon.org>

On Thu, 14 Feb 2013 10:39:27 +0000
Tim Deegan <tim@xen.org> wrote:

> At 18:18 -0800 on 11 Feb (1360606704), Mukesh Rathor wrote:
> > > > +        if (!is_hvm_domain(fdom)) {
> > > > +            printk("mmio type for non-hvm domain. fd:%d
> > > > fgmfn:%lx gpfn:%lx\n",
> > > > +                   foreign_domid, fgmfn, gpfn);
> > > > +            return -EINVAL;
> > > > +        }
> > > > +        mfn = fgmfn;     /* map 1 to 1 */
> > > 
> > > Surely not -- you want to map the _actual_ MMIO range, right, not
> > > just whatever GFN-address the foreigh domain mapped it at?
> > 
> > Actually, fgmfn here is the machine address of the mmio page. 
> 
> I hope not!  You've just passed it to a p2m lookup a little earlier,
> so it had better be a gfn.  (And in either case it could do with a
> more explicit name: maybe fmfn if it's an mfn or fgfn if it's a gfn?

Yup, already changed the name to fgfn last week.

>It may be that the memory is genuinely not there - since qemu doesn't
>build the guest itself it doesn't necessarily know exactly where the
>builder put all the memory.

>If that's the case, then just failing the mapping is the right
>response. 

Correct, and thats what PV dom0 does. I had it blatantly wrong! Fixed. 

Thanks,
Mukesh

      reply	other threads:[~2013-02-16  0:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-12  2:11 [RFC PATCH 14/16]: PVH xen: add xenmem_add_foreign_to_pmap() Mukesh Rathor
2013-01-24 17:31 ` Tim Deegan
2013-02-12  2:18   ` Mukesh Rathor
2013-02-14  2:34     ` Mukesh Rathor
2013-02-14 10:22       ` Tim Deegan
2013-02-14 10:39     ` Tim Deegan
2013-02-16  0:17       ` 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=20130215161735.0d25c6dd@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).