Re: [RFC v2 01/32] x86/paravirt: Introduce CONFIG_PARAVIRT_XL

From: Andi Kleen
Date: Mon May 10 2021 - 11:52:36 EST


\
CONFIG_PARAVIRT_XL will be used by TDX that needs couple of paravirt
calls that were hidden under CONFIG_PARAVIRT_XXL, but the rest of the
config would be a bloat for TDX.

Used how? Why is it bloat for TDX?

Is there any major downside to move the halt related pvops functions
from CONFIG_PARAVIRT_XXL to CONFIG_PARAVIRT?

I think the main motivation is to get rid of all the page table related hooks for modern configurations. These are the bulk of the annotations and  cause bloat and worse code. Shadow page tables are really obscure these days and very few people still need them and it's totally reasonable to build even widely used distribution kernels without them. On contrast most of the other hooks are comparatively few and also on comparatively slow paths, so don't really matter too much.

I think it would be ok to have a CONFIG_PARAVIRT that does not have page table support, and a separate config option for those (that could be eventually deprecated).

But that would break existing .configs for those shadow stack users, that's why I think Kirill did it the other way around.

-Andi