Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp4767405pxv; Tue, 6 Jul 2021 08:40:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz1iqQdthtYgscn3NlbW4wC2nDtwsAKgqW2sCOcl6XpF2rXVqxIJ9oV5wEfwGzyYccaJYlr X-Received: by 2002:a92:a005:: with SMTP id e5mr14589845ili.22.1625586058274; Tue, 06 Jul 2021 08:40:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625586058; cv=none; d=google.com; s=arc-20160816; b=ljz41CaPn5mjPRtB5s3j2naCOSYwabxuj88z0I3XbNo8h1RfNFL9V4apLcafVqN+R1 x0AMQsReBC1h2suW84WO4ES19WpimI/9Q53JAwTXNLTFIuH9RQVd3/gT/ZspsLFe9MII q7/qCntapVHJs6xLgtrpaBJSggsxBk9Hny6Qbw8H7XVGWU2Q6I7dnUMNbQh/6WilrmCm Iw0yOU2U1DBYKFqP6scDFCX7FjpWpiS2An1+jHqMoADTwU/pzpfb3mlqF2mUIvpvJk9X 96ajTt9Uspfd0TAZ0XdvVWTMT5+91htgWxBDam2E11smCOZkqOPpI9AVUheyhaMt/QI1 Kt/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=UXxEnAN0QHCPLSUFL3HPhg9N9XgFFP+fzXmkjBgsVaw=; b=ieTsdxyvtYHgd4buf3MIj3Xz/hDJysfnxchyuoSexNs5h8KmP8ADpqzclhzSVvFmN0 OLlJP6kH3QuDT/v1QLEEIZdMcNhGhdlgn1GAMSc8NrD9Ok0eMTcXpIbwjCjQv3VbX7CD jry15lfJcwumMJbaxg4VJuswuY/pHnjOEgjVj3aM5f7fbDB0Fz2A1kXR48VElFOgcQA0 vBlRFFM93POgmv9ZyfO0YLT/SspnDvgM0uMiQTZJ0FmSS9jZaKTTk4eZV8EpQrKFLevH /Wh0/9KmftAJz6G1doaLlV019sLvoA6vGoxrZGeSgVzwRB0VUUiDQNcvn6WWibOhRrD8 19hA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=mgRXkAju; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q3si11965308iob.0.2021.07.06.08.40.46; Tue, 06 Jul 2021 08:40:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=mgRXkAju; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232414AbhGFPl5 (ORCPT + 99 others); Tue, 6 Jul 2021 11:41:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:54102 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231689AbhGFPl4 (ORCPT ); Tue, 6 Jul 2021 11:41:56 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D213A61A46; Tue, 6 Jul 2021 15:39:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1625585956; bh=C5TxgHCUYQtTJww8peg9FcreqZqhtW6SRaHn8e3V6C4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=mgRXkAjuhq1sIVlATFBGyh4eVjNQp3T6DS7kumrou9plECr7EY38lMfhS8MQXeAHH Vuh2+69g5Id8P4HBnB+K5eTMb9Ef3wSr6W++W2J2OzdWdTIw6hekSIlYWsYKDrz/9A bfenmJkU0frmxzIyk0Ybbf/dCNgnVwiJohbU30+4= Date: Tue, 6 Jul 2021 17:39:13 +0200 From: Greg KH To: Dave Hansen Cc: Jarkko Sakkinen , Shuah Khan , linux-kselftest@vger.kernel.org, linux-sgx@vger.kernel.org, Reinette Chatre , Borislav Petkov , Dave Hansen , Thomas Gleixner , Ingo Molnar , x86@kernel.org, "H. Peter Anvin" , Jonathan Corbet , 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 Message-ID: References: <20210705143652.116125-1-jarkko@kernel.org> <20210705143652.116125-2-jarkko@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? > > 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. > > Second, how is this going to be used? > > Third, is this going to be the ABI forever? debugfs is never a stable abi. If it is being used as such, then the kernel code is wrong. This better just be debugging stuff only. thanks, greg k-h