Re: [RFC PATCH 02/23] x86/sgx: Add enum for SGX_CHILD_PRESENT error code

Jarkko Sakkinen
2021-01-12T01:47:48Z

On Tue, Jan 12, 2021 at 01:16:53PM +1300, Kai Huang wrote:
> On Tue, 12 Jan 2021 01:32:19 +0200 Jarkko Sakkinen wrote:
> > On Wed, Jan 06, 2021 at 02:55:19PM +1300, Kai Huang wrote:
> > > From: Sean Christopherson <sean.j.christopherson@intel.com>
> > >
> > > SGX virtualization requires to allocate "raw" EPC and use it as "virtual
> > > EPC" for SGX guest. Unlike EPC used by SGX driver, virtual EPC doesn't
> > > track how EPC pages are used in VM, e.g. (de)construction of enclaves,
> > > so it cannot guarantee EREMOVE success, e.g. it doesn't have a priori
> > > knowledge of which pages are SECS with non-zero child counts.
> > >
> > > Add SGX_CHILD_PRESENT for use by SGX virtualization to assert EREMOVE
> > > failures are expected, but only due to SGX_CHILD_PRESENT.
> > >
> > > Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
> > > Signed-off-by: Kai Huang <kai.huang@intel.com>
> >
> > Acked-by: Jarkko Sakkinen <jarkko@kernel.org>
>
> Thanks Jarkko.
>
> Dave suggested to change patch subject to explicitly call out hardware error
> code:
> Add SGX_CHILD_PRESENT hardware error code
>
> I suppose this also works for you, and I can have your Acked-by after I changed
> that in v2?

Yeah, I agree with that.

/Jarkko