Thread (86 messages) 86 messages, 6 authors, 2021-08-23

Re: [PATCH Part1 RFC v4 24/36] x86/compressed/acpi: move EFI config table access to common code

From: Borislav Petkov <bp@alien8.de>
Date: 2021-08-19 17:09:12
Also in: kvm, linux-coco, linux-efi, linux-mm, lkml, platform-driver-x86

On Thu, Aug 19, 2021 at 09:58:31AM -0500, Michael Roth wrote:
Not sure what you mean here. All the interfaces introduced here are used
by acpi.c. There is another helper added later (efi_bp_find_vendor_table())
in "enable SEV-SNP-validated CPUID in #VC handler", since it's not used
here by acpi.c.
Maybe I got confused by the amount of changes in a single patch. I'll
try harder with your v5. :)
There is the aforementioned efi_bp_find_vendor_table() that does the
simple iteration, but I wasn't sure how to build the "find one of these,
but this one is preferred" logic into it in a reasonable way.
Instead of efi_foreach_conf_entry() you simply do a bog-down simple
loop and each time you stop at a table, you examine it and overwrite
pointers, if you've found something better.

With "overwrite pointers" I mean you cache the pointers to those conf
tables you iterate over and dig out so that you don't have to do it a
second time. That is, *if* you need them a second time. I believe you
call at least efi_bp_get_conf_table() twice... you get the idea.
I could just call it once for each of these GUIDs though. I was
hesitant to do so since it's less efficient than existing code, but if
it's worth it for the simplification then I'm all for it.
Yeah, this is executed once during boot so I don't think you can make it
more efficient than a single iteration over the config table blobs.

I hope that makes more sense.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help