mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Huang Ying <ying.huang@intel.com>
To: Yinghai Lu <yinghai@kernel.org>
Cc: Brian Maly <bmaly@redhat.com>, Ingo Molnar <mingo@elte.hu>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Fix e820 end address with EFI
Date: Tue, 03 Mar 2009 11:06:14 +0800	[thread overview]
Message-ID: <1236049574.6204.253.camel@yhuang-dev.sh.intel.com> (raw)
In-Reply-To: <49AC9B99.5020000@kernel.org>

[-- Attachment #1: Type: text/plain, Size: 3326 bytes --]

On Tue, 2009-03-03 at 10:53 +0800, Yinghai Lu wrote:
> Huang Ying wrote:
> > On Tue, 2009-03-03 at 09:28 +0800, Yinghai Lu wrote:
> >> Huang Ying wrote:
> >>> On Tue, 2009-03-03 at 05:38 +0800, Yinghai Lu wrote:
> >>>> Huang Ying wrote:
> >>>>> On Mon, 2009-03-02 at 10:51 +0800, Yinghai Lu wrote:
> >>>>>> On Sun, Mar 1, 2009 at 6:37 PM, Huang Ying <ying.huang@intel.com> wrote:
> >>>>>>>> so 64bit could use ioremap_cache() too?
> >>>>>>>> we may keep 32bit and 64bit a bit consistent.
> >>>>>>> If we use ioremap_cache(), kexec runtime service will not work in kexec
> >>>>>>> situation, which needs EFI runtime memory area to be mapped at exact
> >>>>>>> same location across kexec. I think we should support kexec if possible.
> >>>>>> sure.
> >>>>>>
> >>>>>> please don't touch max_low_pfn_mapped, because some range may not
> >>>>>> directly mapped under those efi run-time code
> >>>>> Find an issue to use init_memory_mapping() here.
> >>>>>
> >>>>> If the memory range to be mapped is less than 2M, the last mapped
> >>>>> address may be next 2M aligned position, this may lead mapping
> >>>>> overlapping between memory range. Such as:
> >>>>>
> >>>>> 0x3f388000 - 0x3f488000: real mapped	0x3f388000 - 0x3f600000
> >>>>> 0x3f590000 - 0x3f5bb000: real mapped	0x3f590000 - 0x3f600000
> >>>>>
> >>>>> The problem is that the memory range 0x3f400000 - 0x3f590000 is left not
> >>>>> mapped!
> >>>> what is max_low_pfn_mapped before that?
> >>> I don't know exactly what you mean. Can you elaborate a little?
> >>>
> >>> 0 ~ max_low_pfn_mapped ~ max_pfn_mapped can be mapped with
> >>> init_memory_mapping() properly.
> >>>
> >>> The issue of above example is that 0x3f400000 ~ 0x3f488000 is a
> >>> sub-range of 0x3f388000 ~ 0x3f488000, which should be mapped but is left
> >>> not mapped.
> >> what is max_low_pfn_mapped?
> >>
> >> what is init_memory_mapping() printout?
> > 
> > This does not comes from a real test case. To test the changes I made, I
> > make efi_ioremap() being used even if the corresponding memory range is
> > below max_low_pfn_mapped. The dmesg of test is attached with the mail.
> > 
> > The printout of init_memory_mapping shows:
> > 
> > init_memory_mapping: 000000003f488000-000000003f4bb000                          
> > last_map_addr: 3f600000 end: 3f4bb000
> > init_memory_mapping: 000000003f590000-000000003f5bb000                          
> > last_map_addr: 3f600000 end: 3f5bb000
> init_memory_mapping: 0000000000000000-000000003f700000                          
> 
> last_map_addr: 3f700000 end: 3f700000                                           
> 
> (6 early reservations) ==> bootmem [0000000000 - 003f700000]
> 
> so max_low_pfn_mapped is (3f700000>>12)
> and you try to init_memory_mapping again before it

Yes. Just for testing, I want to use efi_ioremap() on more memory range
to test.

> > init_memory_mapping: 00000000fffb0000-00000000fffba000                          
> > last_map_addr: 100000000 end: fffba000
> this one is interesting... got over mapped...
> > 
> > So I think it is possible to have the issue I mentioned above.
> 
> looks like.

So, If you have no time, I can try to fix that. Do you think
init_memory_mapping should stop at specified end page?

Best Regards,
Huang Ying


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

  reply	other threads:[~2009-03-03  3:06 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-28 16:26 Brian Maly
2009-03-01  4:14 ` Yinghai Lu
2009-03-01  5:42   ` Yinghai Lu
2009-03-01 18:44     ` Brian Maly
2009-03-01 20:13     ` Brian Maly
2009-03-01 20:16       ` Yinghai Lu
2009-03-02  1:07       ` Huang Ying
2009-03-02  1:41         ` Brian Maly
2009-03-02  1:45         ` Brian Maly
     [not found]         ` <49AB38E7.60305@redhat.com>
2009-03-02  2:13           ` Huang Ying
2009-03-02  2:16             ` Yinghai Lu
2009-03-02  2:25               ` Huang Ying
2009-03-02  2:32                 ` Yinghai Lu
2009-03-02  2:37                   ` Huang Ying
2009-03-02  2:51                     ` Yinghai Lu
2009-03-02  7:45                       ` Huang Ying
2009-03-02 21:38                         ` Yinghai Lu
2009-03-03  1:07                           ` Huang Ying
2009-03-03  1:28                             ` Yinghai Lu
2009-03-03  2:22                               ` Huang Ying
2009-03-03  2:53                                 ` Yinghai Lu
2009-03-03  3:06                                   ` Huang Ying [this message]
2009-03-03  3:57                                     ` Yinghai Lu
2009-03-03  5:32                                       ` Huang Ying
2009-03-03  5:37                                         ` Yinghai Lu
2009-03-03  5:40                                           ` Huang Ying
2009-03-03  5:51                                             ` Yinghai Lu
2009-03-03  6:37                                               ` Huang Ying
2009-03-03  7:36                                                 ` [PATCH] x86: make init_memory_mapping could handle small range Yinghai Lu
2009-03-03  7:51                                                   ` [tip:x86/urgent] x86: fix init_memory_mapping() to handle small ranges Yinghai Lu
2009-03-02  2:57                     ` [PATCH] Fix e820 end address with EFI Brian Maly
2009-03-02  3:06                       ` Huang Ying

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=1236049574.6204.253.camel@yhuang-dev.sh.intel.com \
    --to=ying.huang@intel.com \
    --cc=bmaly@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=yinghai@kernel.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

Powered by JetHome