Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1220779
| From | Matt Fleming <matt@codeblueprint.co.uk> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] x86/efi: Map EFI memmap entries in-order at runtime |
| Date | 2015-09-08 15:20 +0200 |
| Message-ID | <q6qYA-5iH-37@gated-at.bofh.it> (permalink) |
| References | <q4Z4n-39P-47@gated-at.bofh.it> <q4Ze1-3lc-13@gated-at.bofh.it> <q53Ul-1Af-3@gated-at.bofh.it> <q54np-286-27@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Fri, 04 Sep, at 08:53:36PM, Ard Biesheuvel wrote: > On 4 September 2015 at 20:23, Matt Fleming <matt@codeblueprint.co.uk> wrote: > > On Fri, 04 Sep, at 03:24:21PM, Ard Biesheuvel wrote: > >> > >> Since the UEFI spec does not mandate an enumeration order for > >> GetMemoryMap(), it seems to me that you still need to sort its output > >> before laying out the VA space. Since you need to sort it anyway, why > >> not simply sort it in reverse order and keep all the original code? > >> Considering that this is meant for stable, that would keep the delta > >> *much* smaller. > > > > Hmm... that'd be a neat trick and while it would save on the diff > > size, I don't think it would be smaller in terms of change complexity. > > > > EDK2 sorts the memory map when EFI_PROPERTIES_TABLE is enabled, so we > > can be reasonably sure the entry order returned by GetMemoryMap() is > > compatible with the split regions, even if it's not mandated by the > > spec. > > > > EDK2 does sort it, but the spec does not mandate it so another > implementation may do something different entirely. Yeah, we should get that requirement added to the spec. > > For the non-EFI_PROPERTIES_TABLE case, things have been working fine > > without the sorting, so I'm reluctant to introduce it now (it's also > > much less of an issue there). > > > > I see. I do wonder, since the VA mapping preserves the modulo 2 MB > alignment of each region, aren't you using much more VA space when > mapping in reverse order as you are doing now? It doesn't enforce a 2MB alignment for every entry, just those that are actually 2MB aligned. This should be exactly what was done in the previous version of the code. Do you see a bug? -- Matt Fleming, Intel Open Source Technology Center -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
Re: [PATCH] x86/efi: Map EFI memmap entries in-order at runtime Matt Fleming <matt@codeblueprint.co.uk> - 2015-09-08 15:20 +0200
Re: [PATCH] x86/efi: Map EFI memmap entries in-order at runtime Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2015-09-08 15:30 +0200
Re: [PATCH] x86/efi: Map EFI memmap entries in-order at runtime Matt Fleming <matt@codeblueprint.co.uk> - 2015-09-08 22:40 +0200
Re: [PATCH] x86/efi: Map EFI memmap entries in-order at runtime Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2015-09-09 09:40 +0200
Re: [PATCH] x86/efi: Map EFI memmap entries in-order at runtime Matt Fleming <matt@codeblueprint.co.uk> - 2015-09-09 12:00 +0200
Re: [PATCH] x86/efi: Map EFI memmap entries in-order at runtime Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2015-09-09 12:10 +0200
csiph-web