From: Tomasz Wroblewski <tomasz.wroblewski@citrix.com>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: Razvan Cojocaru <rzvncj@gmail.com>,
Jan Beulich <JBeulich@suse.com>,
"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: Why does xc_map_foreign_range() refuse to map pfns below 1M from a domU
Date: Wed, 4 Dec 2013 12:23:11 +0100 [thread overview]
Message-ID: <529F109F.8080508@citrix.com> (raw)
In-Reply-To: <1386155067.17466.16.camel@kazak.uk.xensource.com>
On 12/04/2013 12:04 PM, Ian Campbell wrote:
> On Wed, 2013-12-04 at 10:54 +0000, Jan Beulich wrote:
>>>>> On 04.12.13 at 11:45, Ian Campbell <Ian.Campbell@citrix.com> wrote:
>>> Correct. The check for mapping domain 0's 1:1 map is overly broad I
>>> think, and erroneously prevents a domU from mapping a foreign PFN < 1M.
>>
>> But that's the source of my not understanding: xen_make_pte()
>> derives addr from the passed in pte, and that pte can - for a
>> foreign domain's page - hardly hold a PFN. Otherwise how would
>> the translation to MFN be supposed to happen? Yet, if it's a
>> machine address that's coming in, it can't point into the low 1Mb.
>
> Isn't it a foreign gpfn at this point, which for an HVM guest is
> actually a PFN not an MFN?
>
> You are making me think I might be talking out my a**e though, because
> what is a foreign mapping even doing in xen_make_pte -- those need to be
> instantiated in a special way.
>
I believe the callpath for this is
xen_remap_domain_range() (mmu.c)
|
v
remap_area_pfn_pte() (mmu.c)
|
v
pfn_pte() (somewhere, one of the pgtable.h hdrs)
|
v
__pte() (paravirt.h)
|
v
xen_make_pte (mmu.c) via pv_mmu_ops.make_pte
Sorry, can't offer much insight as to why addr in pte holds the hvm's PFN, but it seems the case.
next prev parent reply other threads:[~2013-12-04 11:23 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-03 15:06 Why does xc_map_foreign_range() refuse to map pfns below 1M from a domU Razvan Cojocaru
2013-12-03 15:51 ` Ian Campbell
2013-12-03 15:59 ` Razvan Cojocaru
2013-12-03 16:09 ` Ian Campbell
2013-12-03 17:36 ` Tomasz Wroblewski
2013-12-03 18:59 ` Razvan Cojocaru
2013-12-03 19:07 ` Konrad Rzeszutek Wilk
2013-12-04 10:24 ` Tomasz Wroblewski
2013-12-04 10:31 ` Jan Beulich
2013-12-04 10:39 ` Ian Campbell
2013-12-04 10:42 ` Jan Beulich
2013-12-04 10:45 ` Ian Campbell
2013-12-04 10:54 ` Jan Beulich
2013-12-04 11:04 ` Ian Campbell
2013-12-04 11:23 ` Tomasz Wroblewski [this message]
2013-12-04 11:36 ` Jan Beulich
2013-12-04 12:01 ` Tomasz Wroblewski
2013-12-04 12:14 ` Jan Beulich
2013-12-04 12:23 ` Ian Campbell
2013-12-04 12:39 ` Jan Beulich
2013-12-04 16:40 ` Konrad Rzeszutek Wilk
2013-12-04 17:16 ` Tomasz Wroblewski
2014-07-08 14:54 ` Mihai Donțu
2013-12-04 11:42 ` Mihai Donțu
2013-12-04 14:19 ` Tomasz Wroblewski
2013-12-04 16:15 ` Mihai Donțu
-- strict thread matches above, loose matches on Subject: below --
2013-12-03 16:18 Razvan Cojocaru
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=529F109F.8080508@citrix.com \
--to=tomasz.wroblewski@citrix.com \
--cc=Ian.Campbell@citrix.com \
--cc=JBeulich@suse.com \
--cc=rzvncj@gmail.com \
--cc=xen-devel@lists.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.