Re: [PATCH v28 06/22] x86/sgx: Add wrappers for ENCLS leaf functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Mar 04, 2020 at 01:35:53AM +0200, Jarkko Sakkinen wrote:
> +/* Issue a WARN() about an ENCLS leaf. */
> +#define ENCLS_WARN(r, name) {						  \
> +	do {								  \
> +		int _r = (r);						  \
> +		WARN(_r, "%s returned %d (0x%x)\n", (name), _r, _r); \

This should be a WARN_ONCE(), otherwise we'll spam the log if something
goes awry, e.g. if there's a correctable #MC or a rogue write to a MCi_CTL
MSR, either of which will "soft" disable SGX (CPUID 0x7 still reports
SGX/SGXLC support, but all CPUID 0x12 sub-leafs return zeros).

> +	} while (0);							  \
> +}



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux