Re: [PATCH v2 07/12] x86/sev: Replace occurrences of sev_es_active() with prot_guest_has()

From: Borislav Petkov
Date: Tue Aug 17 2021 - 06:07:31 EST


On Fri, Aug 13, 2021 at 11:59:26AM -0500, Tom Lendacky wrote:
> Replace occurrences of sev_es_active() with the more generic
> prot_guest_has() using PATTR_GUEST_PROT_STATE, except for in
> arch/x86/kernel/sev*.c and arch/x86/mm/mem_encrypt*.c where PATTR_SEV_ES
> will be used. If future support is added for other memory encyrption
> techonologies, the use of PATTR_GUEST_PROT_STATE can be updated, as
> required, to specifically use PATTR_SEV_ES.
>
> Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
> Cc: Ingo Molnar <mingo@xxxxxxxxxx>
> Cc: Borislav Petkov <bp@xxxxxxxxx>
> Signed-off-by: Tom Lendacky <thomas.lendacky@xxxxxxx>
> ---
> arch/x86/include/asm/mem_encrypt.h | 2 --
> arch/x86/kernel/sev.c | 6 +++---
> arch/x86/mm/mem_encrypt.c | 7 +++----
> arch/x86/realmode/init.c | 3 +--
> 4 files changed, 7 insertions(+), 11 deletions(-)

Same comments to this one as for the previous two.

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette