Re: [PATCH 1/5] x86/boot/compressed/64: Introduce sev_status

From: Sean Christopherson
Date: Mon Oct 19 2020 - 21:08:08 EST


On Mon, Oct 19, 2020 at 05:59:25PM -0700, Sean Christopherson wrote:
> On Mon, Oct 19, 2020 at 05:11:17PM +0200, Joerg Roedel wrote:
> > From: Joerg Roedel <jroedel@xxxxxxx>
> >
> > Introduce sev_status and initialize it together with sme_me_mask to have
> > an indicator which SEV features are enabled.
> >
> > Signed-off-by: Joerg Roedel <jroedel@xxxxxxx>
> > ---
> > arch/x86/boot/compressed/mem_encrypt.S | 14 +++++++++++++-
> > 1 file changed, 13 insertions(+), 1 deletion(-)
> >
> > diff --git a/arch/x86/boot/compressed/mem_encrypt.S b/arch/x86/boot/compressed/mem_encrypt.S
> > index dd07e7b41b11..0effd58f0095 100644
> > --- a/arch/x86/boot/compressed/mem_encrypt.S
> > +++ b/arch/x86/boot/compressed/mem_encrypt.S
> > @@ -71,6 +71,8 @@ SYM_FUNC_END(get_sev_encryption_bit)
> > SYM_FUNC_START(set_sev_encryption_mask)
> > #ifdef CONFIG_AMD_MEM_ENCRYPT
> > push %rbp
> > + push %rax
> > + push %rcx
>
> There's no need to save/restore RAX and RCX, they are callee save. This
> function is only called from C, so I doubt it's using a custom ABI.

Gah, *caller* save. Feedback stands, my English notwithstanding.