From: "Andres Lagar-Cavilla" <andres@lagarcavilla.org>
To: Jan Beulich <JBeulich@suse.com>
Cc: olaf@aepfle.de, keir@xen.org, andres@gridcentric.ca,
Tim Deegan <tim@xen.org>,
xen-devel@lists.xen.org, wei.wang2@amd.com,
hongkaixing@huawei.com, adin@gridcentric.ca
Subject: Re: [PATCH 2 of 3] Clip mfn to allowable width when building a PTE
Date: Tue, 27 Mar 2012 08:21:24 -0700 [thread overview]
Message-ID: <ebaf06bb42da9aaf68eb460b1b704828.squirrel@webmail.lagarcavilla.org> (raw)
In-Reply-To: <4F6B53DA020000780007A4C6@nat28.tlf.novell.com>
>>>> On 22.03.12 at 15:54, "Andres Lagar-Cavilla" <andres@lagarcavilla.org>
>>>> wrote:
>>>>>> On 22.03.12 at 11:50, Tim Deegan <tim@xen.org> wrote:
>>>> At 09:18 +0000 on 22 Mar (1332407899), Jan Beulich wrote:
>>>>> >>> On 21.03.12 at 20:22, Andres Lagar-Cavilla
>>>>> <andres@lagarcavilla.org> wrote:
>>>>> > xen/include/asm-x86/page.h | 12 ++++++++----
>>>>> > 1 files changed, 8 insertions(+), 4 deletions(-)
>>>>> >
>>>>> >
>>>>> > Otherwise, INVALID_MFN tramples over high order bits used for
>>>>> additional
>>>>> > flags.
>>>>>
>>>>> But is passing INVALID_PFN into these macros valid/sensible in the
>>>>> first
>>>>> place?
>>>>
>>>> The p2m code uses pte layout even for entries that don't have the
>>>> _PAGE_PRESENT bit set. We can:
>>>> - mask out in these macros, making everything safe;
>>>> - make new macros just for p2m code;
>>>> - rewrite p2m callers not to use INVALID_MFN; or
>>>> - have the p2m code explicitly replace INVALID_MFN with some other
>>>> value when callers specify it.
>>>
>>> As the transformation backwards doesn't yield INVALID_MFN anyway,
>>> I'd prefer one of those options.
>>
>> The whole issue originates in p2m-pt, which uses l1e_from_pfn with
>> INVALID_PFN -- sometimes. My favourite option would be to replace that
>> with p2m_l1e_from_pfn, which does the masking of the pfn and then calls
>> l1e_from_pfn.
>>
>> Limits the masking to the only places where it is relevant. If that's ok
>> with you I'll prepare and resend.
>
> Yes, that sounds good to me.
Posted here
http://lists.xen.org/archives/html/xen-devel/2012-03/msg01982.html
(just making sure it doesn't slip through the cracks)
Andres
>
> Jan
>
>
next prev parent reply other threads:[~2012-03-27 15:21 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-21 19:22 [PATCH 0 of 3] Fixes for paging/sharing with AMD processors Andres Lagar-Cavilla
2012-03-21 19:22 ` [PATCH 1 of 3] IOMMU: Add command line param to disable sharing of IOMMU and hap tables Andres Lagar-Cavilla
2012-03-22 9:17 ` Jan Beulich
2012-03-22 10:44 ` Tim Deegan
2012-03-22 10:57 ` Jan Beulich
2012-03-22 11:03 ` Tim Deegan
2012-03-27 15:19 ` Andres Lagar-Cavilla
2012-03-29 10:27 ` Tim Deegan
2012-03-29 10:57 ` Keir Fraser
2012-03-29 11:09 ` Tim Deegan
2012-03-29 15:05 ` Jan Beulich
2012-03-21 19:22 ` [PATCH 2 of 3] Clip mfn to allowable width when building a PTE Andres Lagar-Cavilla
2012-03-22 9:18 ` Jan Beulich
2012-03-22 10:50 ` Tim Deegan
2012-03-22 11:02 ` Jan Beulich
2012-03-22 14:54 ` Andres Lagar-Cavilla
2012-03-22 15:31 ` Jan Beulich
2012-03-27 15:21 ` Andres Lagar-Cavilla [this message]
2012-03-21 19:23 ` [PATCH 3 of 3] x86/mm: Teach paging to page table-based p2m Andres Lagar-Cavilla
2012-03-22 10:55 ` Tim Deegan
2012-03-22 14:47 ` Andres Lagar-Cavilla
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=ebaf06bb42da9aaf68eb460b1b704828.squirrel@webmail.lagarcavilla.org \
--to=andres@lagarcavilla.org \
--cc=JBeulich@suse.com \
--cc=adin@gridcentric.ca \
--cc=andres@gridcentric.ca \
--cc=hongkaixing@huawei.com \
--cc=keir@xen.org \
--cc=olaf@aepfle.de \
--cc=tim@xen.org \
--cc=wei.wang2@amd.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 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).