From: Jarkko Sakkinen <jarkko@kernel.org>
To: Dave Hansen <dave.hansen@intel.com>
Cc: Shuah Khan <shuah@kernel.org>,
linux-kselftest@vger.kernel.org, linux-sgx@vger.kernel.org,
Reinette Chatre <reinette.chatre@intel.com>,
Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>,
x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
Jonathan Corbet <corbet@lwn.net>,
linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org
Subject: Re: [PATCH 1/4] x86/sgx: Add sgx_nr_all_pages to the debugfs
Date: Wed, 7 Jul 2021 01:08:33 +0300 [thread overview]
Message-ID: <20210706220833.d2o7ncbxs3sztaws@kernel.org> (raw)
In-Reply-To: <b8a31e6e-90e8-f93f-e6b2-e72801fb31e4@intel.com>
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
next prev parent reply other threads:[~2021-07-06 22:08 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-05 14:36 [PATCH 0/4] selftests/sgx: Trigger the page reclaimer and #PF handler Jarkko Sakkinen
2021-07-05 14:36 ` [PATCH 1/4] x86/sgx: Add sgx_nr_all_pages to the debugfs Jarkko Sakkinen
2021-07-06 14:56 ` Dave Hansen
2021-07-06 15:39 ` Greg KH
2021-07-06 22:08 ` Jarkko Sakkinen [this message]
2021-07-05 14:36 ` [PATCH 2/4] selftests/sgx: Fix Q1 and Q2 calculation in sigstruct.c Jarkko Sakkinen
2021-07-06 20:53 ` Dave Hansen
2021-07-06 23:52 ` Jarkko Sakkinen
2021-07-05 14:36 ` [PATCH 3/4] selftests/sgx: Assign source for each segment Jarkko Sakkinen
2021-07-05 14:36 ` [PATCH 4/4] selftests/sgx: Trigger the reclaimer and #PF handler Jarkko Sakkinen
2021-07-06 18:34 ` Reinette Chatre
2021-07-06 23:50 ` Jarkko Sakkinen
2021-07-07 0:10 ` Reinette Chatre
2021-07-07 9:17 ` Jarkko Sakkinen
2021-07-07 15:02 ` Reinette Chatre
2021-07-07 20:50 ` Jarkko Sakkinen
2021-07-07 21:20 ` Reinette Chatre
2021-07-09 16:22 ` Jarkko Sakkinen
2021-07-07 21:20 ` Dave Hansen
2021-07-09 16:25 ` Jarkko Sakkinen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210706220833.d2o7ncbxs3sztaws@kernel.org \
--to=jarkko@kernel.org \
--cc=bp@alien8.de \
--cc=corbet@lwn.net \
--cc=dave.hansen@intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-sgx@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=reinette.chatre@intel.com \
--cc=shuah@kernel.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).