[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YG7EWDXmwC9ai38k@kernel.org>
Date: Thu, 8 Apr 2021 11:52:40 +0300
From: Jarkko Sakkinen <jarkko@...nel.org>
To: Borislav Petkov <bp@...en8.de>
Cc: linux-sgx@...r.kernel.org,
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>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/2] x86/sgx: Add sgx_nr_{all, free}_pages to the
debugfs
On Wed, Apr 07, 2021 at 06:15:33PM +0200, Borislav Petkov wrote:
> On Wed, Apr 07, 2021 at 07:09:11PM +0300, Jarkko Sakkinen wrote:
> > I left out "epc" because they are already prefixed with "sgx_".
>
> Are there any other "page" types which are going to be figurating in
> some pseudofs or is "sgx" == "epc" in this case?
>
> > debugfs was my first shot, but for sure these could be sysfs.
>
> Ok, let's keep it in debugfs for now, it can always be made an ABI later
> and moved to sysfs. But pls document what those are and what they do and
> that when in debugfs, there are no guarantees that these interfaces will
> be there in the future.
I think these attributes are quite useful information to have available so
I'd go actually doing sysfs attributes and create
Documentation/ABI/stable/sysfs-driver-sgx to document them.
Given that they would go then to the sysfs directory of the driver, then
probably the legit names for the attributes ought to be:
- nr_all_epc_pages
- nr_free_epc_pages
What do you think?
PS. One useful case that I forgot to mention is that I use these to give
idea what I gave EPC size in the BIOS. Now my EPC is set to 32 MB, and
these report 20 MB of EPC pages. It's because other metadata (e.g. EPCM
containing page attributes) is also stored in this area.
/Jarkko
Powered by blists - more mailing lists