Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1453252

Re: [RFC PATCH] Fix EFI callbacks on UV during kexec

From Alex Thorlton <athorlton@sgi.com>
Newsgroups linux.kernel
Subject Re: [RFC PATCH] Fix EFI callbacks on UV during kexec
Date 2016-08-01 16:40 +0200
Message-ID <s1mxQ-7wE-15@gated-at.bofh.it> (permalink)
References <rZjkJ-80Z-9@gated-at.bofh.it> <s1lBM-6Wv-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, Aug 01, 2016 at 02:39:26PM +0100, Matt Fleming wrote:
> On Tue, 26 Jul, at 05:38:32PM, Alex Thorlton wrote:
> > 
> > After investigating the problem here and figuring out the proper way to
> > get the noefi parameter working again, I noticed that there appears to
> > be support for EFI runtime callbacks in a kexec'd kernel now...  I
> > think we need some more cleanup here to get that all working entirely.
> > Without noefi, we hit a bad paging request when we try to do EFI 
> > callbacks:
>  
> [...]
> 
> > [    0.341531] BUG: unable to handle kernel paging request at 000000006a1ab938
> > [    0.349319] IP: [<000000006a1ab938>] 0x6a1ab938
> > [    0.354386] PGD 354e0063 PUD 0
> > [    0.357910] Oops: 0010 [#1] SMP
> > [    0.361414] Modules linked in:
> > [    0.364833] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.7.0-runtime-check+ #713
> 
> [...]
> 
> > This is due to the fact that the efi_map_region_fixed calls in
> > kexec_enter_virtual_mode, which map in the EFI runtime memory
> > descriptors, only map the virtual address of the descriptor.
> > Unfortunately, since we're still relying on the physical address of our
> > EFI runtime code being mapped in, we don't have access to that code in
> > the kexec scenario.
> > 
> > A potential fix for this would be to map in the physical addresses of
> > the descriptors as well as the virtual addresses in
> > efi_map_region_fixed, but the more "correct" fix would be to update
> > our system table pointer to its new virtual address during
> > SetVirtualAddressMap.  We intend to get that piece fixed up relatively
> > soon, but haven't quite gotten around to it yet.
> 
> I don't think it would be so bad if we did the 1:1 mappings in the
> kexec kernel too, we've got our own page tables after all and the VA
> space is available. It would be required if people ever want to use
> kexec with mixed mode kernels too.

Hmm...   That's a good point.  It certainly would be nice for us to have
those mappings in the kexec kernel, at least for the time being.  If
you're not opposed to it, I can write up the patch.  Pretty sure it's a
one-liner.

- Alex

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[RFC PATCH] Fix EFI callbacks on UV during kexec Alex Thorlton <athorlton@sgi.com> - 2016-07-27 00:50 +0200
  Re: [RFC PATCH] Fix EFI callbacks on UV during kexec Matt Fleming <matt@codeblueprint.co.uk> - 2016-08-01 15:40 +0200
    Re: [RFC PATCH] Fix EFI callbacks on UV during kexec Alex Thorlton <athorlton@sgi.com> - 2016-08-01 16:40 +0200
      Re: [RFC PATCH] Fix EFI callbacks on UV during kexec Matt Fleming <matt@codeblueprint.co.uk> - 2016-08-04 11:30 +0200
        Re: [RFC PATCH] Fix EFI callbacks on UV during kexec Alex Thorlton <athorlton@sgi.com> - 2016-08-04 17:20 +0200

csiph-web