Re: [PATCH v27 04/22] x86/sgx: Add SGX microarchitectural data structures

From: Sean Christopherson
Date: Mon Mar 02 2020 - 19:40:03 EST


On Sun, Feb 23, 2020 at 07:25:41PM +0200, Jarkko Sakkinen wrote:
> Define the SGX microarchitectural data structures used by various SGX
> opcodes. This is not an exhaustive representation of all SGX data
> structures but only those needed by the kernel.
>
> The data structures are described in:
>
> Intel SDM: 37.6 INTEL® SGX DATA STRUCTURES OVERVIEW
>
> Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@xxxxxxxxxxxxxxx>
> ---

...

> +#define SGX_SSA_GPRS_SIZE 182

SSA GPRs size is 184. Per table 37.9 in the SDM:

Field OFFSET (Bytes) Size (Bytes)

GSBASE 176 8

Reported by a third party, I'm just the messenger and not that good at math :-).