Re: [PATCH 01/11] mm: Introduce a function to check for virtualization protection features

From
Borislav Petkov <bp@alien8.de>
Date
2021-07-28 16:27:58
Also in
amd-gfx, dri-devel, kexec, kvm, linux-efi, linux-fsdevel, linux-iommu, linux-s390, lkml, platform-driver-x86
Reply to
Christoph Hellwig, 2021-07-28
On Wed, Jul 28, 2021 at 02:17:27PM +0100, Christoph Hellwig wrote:
So common checks obviously make sense, but I really hate the stupid
multiplexer.  Having one well-documented helper per feature is much
easier to follow.
We had that in x86 - it was called cpu_has_<xxx> where xxx is the
feature bit. It didn't scale with the sheer amount of feature bits that
kept getting added so we do cpu_feature_enabled(X86_FEATURE_XXX) now.

The idea behind this is very similar - those protected guest flags
will only grow in the couple of tens range - at least - so having a
multiplexer is a lot simpler, I'd say, than having a couple of tens of
helpers. And those PATTR flags should have good, readable names, btw.

Thx.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette
Thread (43 messages) 43 messages, 9 authors, last reply 2021-08-13
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help