[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <30d6aa4c-3af9-9e4c-748e-c7378b519504@google.com>
Date: Sun, 8 Jan 2023 14:49:24 -0800 (PST)
From: David Rientjes <rientjes@...gle.com>
To: Jarkko Sakkinen <jarkko@...fian.com>
cc: Sean Christopherson <seanjc@...gle.com>,
Paolo Bonzini <pbonzini@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
"H. Peter Anvin" <hpa@...or.com>,
Brijesh Singh <brijesh.singh@....com>,
Tom Lendacky <thomas.lendacky@....com>,
John Allen <john.allen@....com>,
Herbert Xu <herbert@...dor.apana.org.au>,
"David S. Miller" <davem@...emloft.net>,
Jarkko Sakkinen <jarkko@...nel.org>,
"open list:KERNEL VIRTUAL MACHINE FOR X86 (KVM/x86)"
<kvm@...r.kernel.org>,
"open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)"
<linux-kernel@...r.kernel.org>,
"open list:AMD CRYPTOGRAPHIC COPROCESSOR (CCP) DRIVER - SE..."
<linux-crypto@...r.kernel.org>
Subject: Re: [PATCH v2] crypto: ccp: Sanitize sev_platform_init() error
messages
On Sun, 8 Jan 2023, Jarkko Sakkinen wrote:
> The following functions end up calling sev_platform_init() or
> __sev_platform_init_locked():
>
> * sev_guest_init()
> * sev_ioctl_do_pek_csr
> * sev_ioctl_do_pdh_export()
> * sev_ioctl_do_pek_import()
> * sev_ioctl_do_pek_pdh_gen()
> * sev_pci_init()
>
> However, only sev_pci_init() prints out the failed command error code, and
> even there the error message does not specify, SEV which command failed.
>
> Address this by printing out the SEV command errors inside
> __sev_platform_init_locked(), and differentiate between DF_FLUSH, INIT and
> INIT_EX commands. As a side-effect, @error can be removed from the
> parameter list.
>
> This extra information is particularly useful if firmware loading and/or
> initialization is going to be made more robust, e.g. by allowing firmware
> loading to be postponed.
>
> Signed-off-by: Jarkko Sakkinen <jarkko@...fian.com>
Acked-by: David Rientjes <rientjes@...gle.com>
Powered by blists - more mailing lists