[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20210706220833.d2o7ncbxs3sztaws@kernel.org>
Date: Wed, 7 Jul 2021 01:08:33 +0300
From: Jarkko Sakkinen <jarkko@...nel.org>
To: Dave Hansen <dave.hansen@...el.com>
Cc: Shuah Khan <shuah@...nel.org>, linux-kselftest@...r.kernel.org,
linux-sgx@...r.kernel.org,
Reinette Chatre <reinette.chatre@...el.com>,
Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, x86@...nel.org,
"H. Peter Anvin" <hpa@...or.com>, Jonathan Corbet <corbet@....net>,
linux-kernel@...r.kernel.org, linux-doc@...r.kernel.org
Subject: Re: [PATCH 1/4] x86/sgx: Add sgx_nr_all_pages to the debugfs
On Tue, Jul 06, 2021 at 07:56:40AM -0700, Dave Hansen wrote:
> On 7/5/21 7:36 AM, Jarkko Sakkinen wrote:
> > Create /sys/kernel/debug/x86/sgx_nr_all_pages, which reports total
> > number of EPC pages available in the system.
> Could we flesh this out a bit, please?
>
> What's the value here when userspace could just re-enumerate the EPC
> size from CPUID?
My thinking is that it is better to use "kernel synthesized" value for the
EPC size, because kernel controls the EPC.
> I'd really appreciate if we could draw parallels between these additions
> to the "SGX VM" and their analogs in the "core VM". In this case, I
> think the closest analog is probably "MemTotal" in /proc/meminfo.
Would make sense.
> Second, how is this going to be used?
SGX kselftest creates a heap, of which size is the same as the total size
of the EPC reported by the kernel.
> Third, is this going to be the ABI forever?
AFAIK, debugfs is not part of the ABI.
/Jarkko
Powered by blists - more mailing lists