[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <35441491-99cf-403b-9e64-9d7b0453e59e@intel.com>
Date: Thu, 25 Jul 2024 14:00:59 +1200
From: "Huang, Kai" <kai.huang@...el.com>
To: Dmitrii Kuvaiskii <dmitrii.kuvaiskii@...el.com>,
<dave.hansen@...ux.intel.com>, <jarkko@...nel.org>,
<haitao.huang@...ux.intel.com>, <reinette.chatre@...el.com>,
<linux-sgx@...r.kernel.org>, <linux-kernel@...r.kernel.org>
CC: <mona.vij@...el.com>, <kailun.qin@...el.com>, <stable@...r.kernel.org>
Subject: Re: [PATCH v4 1/3] x86/sgx: Split SGX_ENCL_PAGE_BEING_RECLAIMED into
two flags
On 5/07/2024 7:45 pm, Dmitrii Kuvaiskii wrote:
> SGX_ENCL_PAGE_BEING_RECLAIMED flag is set when the enclave page is being
> reclaimed (moved to the backing store). This flag however has two
> logical meanings:
>
> 1. Don't attempt to load the enclave page (the page is busy).
> 2. Don't attempt to remove the PCMD page corresponding to this enclave
> page (the PCMD page is busy).
Nit:
I think the SGX_ENCL_PAGE_PCMD_BUSY isn't that accurate, because
obviously the actual backing page is busy (i.e., cannot be truncated)
too. So the current SGX_ENCL_PAGE_BEING_RECLAIMED is also fine to me.
But truncating the actual backing page can also be determined by
SGX_ENCL_PAGE_PCMD_BUSY I suppose (if needed in the future), so this
looks fine to me too.
>
> To reflect these two meanings, split SGX_ENCL_PAGE_BEING_RECLAIMED into
> two flags: SGX_ENCL_PAGE_BUSY and SGX_ENCL_PAGE_PCMD_BUSY. Currently,
> both flags are set only when the enclave page is being reclaimed. A
> future commit will introduce a new case when the enclave page is being
> removed; this new case will set only the SGX_ENCL_PAGE_BUSY flag.
As replied to the last patch, IIUC EREMOVE ioctl doesn't seem to be the
only case where the BUSY needs to be marked, so let's just say something
general but not mention the removal case specifically.
Anyway, feel free to add:
Acked-by: Kai Huang <kai.huang@...el.com>
Powered by blists - more mailing lists