From: Dave Young <dyoung@redhat.com>
To: Borislav Petkov <bp@alien8.de>, Matt Fleming <matt@console-pimps.org>
Cc: Linux EFI <linux-efi@vger.kernel.org>,
Borislav Petkov <bp@suse.de>, "H. Peter Anvin" <hpa@zytor.com>,
James Bottomley <James.Bottomley@HansenPartnership.com>,
Matthew Garrett <mjg59@srcf.ucam.org>,
Vivek Goyal <vgoyal@redhat.com>,
LKML <linux-kernel@vger.kernel.org>, X86 ML <x86@kernel.org>
Subject: Re: [PATCH 10/11] EFI: Runtime services virtual mapping
Date: Sun, 3 Nov 2013 20:31:15 +0800 [thread overview]
Message-ID: <20131103123115.GA5313@dhcp-16-126.nay.redhat.com> (raw)
In-Reply-To: <20131101032551.GC4378@dhcp-16-126.nay.redhat.com>
On 11/01/13 at 11:25am, Dave Young wrote:
> On 10/31/13 at 05:25pm, Borislav Petkov wrote:
> > From: Borislav Petkov <bp@suse.de>
> >
> > We map the EFI regions needed for runtime services non-contiguously,
> > with preserved alignment on virtual addresses starting from -4G down
> > for a total max space of 64G. This way, we provide for stable runtime
> > services addresses across kernels so that a kexec'd kernel can still use
> > them.
> >
> > Thus, they're mapped in a separate pagetable so that we don't pollute
> > the kernel namespace.
> >
> > Add an efi= kernel command line parameter for passing miscellaneous
> > options and chicken bits from the command line.
> >
> > While at it, add a chicken bit called "efi=old_map" which can be used as
> > a fallback to the old runtime services mapping method in case there's
> > some b0rkage with a particular EFI implementation (haha, it is hard to
> > hold up the sarcasm here...).
> >
> > Also, add the UEFI RT VA space to Documentation/x86/x86_64/mm.txt.
> >
> > Signed-off-by: Borislav Petkov <bp@suse.de>
> > ---
> > Documentation/kernel-parameters.txt | 6 ++
> > Documentation/x86/x86_64/mm.txt | 7 +++
> > arch/x86/include/asm/efi.h | 64 ++++++++++++++------
> > arch/x86/include/asm/pgtable_types.h | 3 +-
> > arch/x86/platform/efi/efi.c | 94 +++++++++++++++++++++---------
> > arch/x86/platform/efi/efi_32.c | 9 ++-
> > arch/x86/platform/efi/efi_64.c | 109 +++++++++++++++++++++++++++++++++++
> > arch/x86/platform/efi/efi_stub_64.S | 54 +++++++++++++++++
> > include/linux/efi.h | 1 +
> > 9 files changed, 300 insertions(+), 47 deletions(-)
> >
>
> Hi,
>
> This one still does not apply:
>
> [dave@darkstar linux-2.6]$ git am ~/Mail/bp/new/*
> Applying: efi: Simplify EFI_DEBUG
> Applying: x86, pageattr: Lookup address in an arbitrary PGD
> Applying: x86, pageattr: Add a PGD pagetable populating function
> Applying: x86, pageattr: Add a PUD pagetable populating function
> Applying: x86, pageattr: Add a PMD pagetable populating function
> Applying: x86, pageattr: Add a PTE pagetable populating function
> Applying: x86, pageattr: Add a PUD error unwinding path
> Applying: x86, pageattr: Add last levels of error path
> Applying: x86, cpa: Map in an arbitrary pgd
> Applying: EFI: Runtime services virtual mapping
> error: patch failed: arch/x86/platform/efi/efi.c:808
> error: arch/x86/platform/efi/efi.c: patch does not apply
> Patch failed at 0010 EFI: Runtime services virtual mapping
> The copy of the patch that failed is found in:
> /home/dave/git/linux-2.6/.git/rebase-apply/patch
> When you have resolved this problem, run "git am --resolved".
> If you prefer to skip this patch, run "git am --skip" instead.
> To restore the original branch and stop patching, run "git am --abort".
>
> I found the reason, here is the diff of the efi.c
> between (linus tree + matt next) and the one in matt next:
>
> --- efi.c.linus-tree 2013-11-01 11:16:44.731554778 +0800
> +++ efi.c.matt-next 2013-11-01 11:17:41.662316832 +0800
> @@ -806,13 +806,10 @@ void __init efi_enter_virtual_mode(void)
>
> for (p = memmap.map; p < memmap.map_end; p += memmap.desc_size) {
> md = p;
> - if (!(md->attribute & EFI_MEMORY_RUNTIME)) {
> -#ifdef CONFIG_X86_64
> - if (md->type != EFI_BOOT_SERVICES_CODE &&
> - md->type != EFI_BOOT_SERVICES_DATA)
> -#endif
> - continue;
> - }
> + if (!(md->attribute & EFI_MEMORY_RUNTIME) &&
> + md->type != EFI_BOOT_SERVICES_CODE &&
> + md->type != EFI_BOOT_SERVICES_DATA)
> + continue;
>
> size = md->num_pages << EFI_PAGE_SHIFT;
> end = md->phys_addr + size;
>
> The conflict is caused by missing one commit in matt's efi next tree:
>
> commit 700870119f49084da004ab588ea2b799689efaf7
> Author: Josh Boyer <jwboyer@redhat.com>
> Date: Thu Apr 18 07:51:34 2013 -0700
>
> x86, efi: Don't map Boot Services on i386
>
> Add patch to fix 32bit EFI service mapping (rhbz 726701)
>
> Multiple people are reporting hitting the following WARNING on i386,
>
> WARNING: at arch/x86/mm/ioremap.c:102 __ioremap_caller+0x3d3/0x440()
> Modules linked in:
> Pid: 0, comm: swapper Not tainted 3.9.0-rc7+ #95
Hi, Matt
How should I handle this problem, would you take above commit or rebase efi
next branch?
--
Thanks
Dave
next prev parent reply other threads:[~2013-11-03 12:31 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-31 16:24 [PATCH 00/11] EFI runtime services virtual mapping, vN++ Borislav Petkov
2013-10-31 16:24 ` [PATCH 01/11] efi: Simplify EFI_DEBUG Borislav Petkov
2013-10-31 16:25 ` [PATCH 02/11] x86, pageattr: Lookup address in an arbitrary PGD Borislav Petkov
2013-10-31 16:25 ` [PATCH 03/11] x86, pageattr: Add a PGD pagetable populating function Borislav Petkov
2013-10-31 16:25 ` [PATCH 04/11] x86, pageattr: Add a PUD " Borislav Petkov
2013-10-31 16:25 ` [PATCH 05/11] x86, pageattr: Add a PMD " Borislav Petkov
2013-10-31 16:25 ` [PATCH 06/11] x86, pageattr: Add a PTE " Borislav Petkov
2013-10-31 16:25 ` [PATCH 07/11] x86, pageattr: Add a PUD error unwinding path Borislav Petkov
2013-10-31 16:25 ` [PATCH 08/11] x86, pageattr: Add last levels of error path Borislav Petkov
2013-10-31 16:25 ` [PATCH 09/11] x86, cpa: Map in an arbitrary pgd Borislav Petkov
2013-10-31 16:25 ` [PATCH 10/11] EFI: Runtime services virtual mapping Borislav Petkov
2013-11-01 3:25 ` Dave Young
2013-11-01 3:35 ` Dave Young
2013-11-01 12:50 ` Matt Fleming
2013-11-03 12:35 ` Dave Young
2013-11-03 12:31 ` Dave Young [this message]
2013-11-04 9:18 ` Matt Fleming
2013-10-31 16:25 ` [PATCH 11/11] efi: Check krealloc return value Borislav Petkov
2013-11-04 9:21 ` [PATCH 00/11] EFI runtime services virtual mapping, vN++ Matt Fleming
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=20131103123115.GA5313@dhcp-16-126.nay.redhat.com \
--to=dyoung@redhat.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=bp@alien8.de \
--cc=bp@suse.de \
--cc=hpa@zytor.com \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matt@console-pimps.org \
--cc=mjg59@srcf.ucam.org \
--cc=vgoyal@redhat.com \
--cc=x86@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
all inboxes | Powered by JetHome®