Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp694499pxp; Fri, 11 Mar 2022 12:35:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJwLiHzAt5NtDJmgl8RGf3JKgnme1kBKs110cmnJyAsKJSHgfP+Oj5+IKHZfSOfnkxyyJWe7 X-Received: by 2002:a17:902:bd86:b0:14d:8437:5113 with SMTP id q6-20020a170902bd8600b0014d84375113mr12027241pls.43.1647030949789; Fri, 11 Mar 2022 12:35:49 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1647030949; cv=pass; d=google.com; s=arc-20160816; b=TDnltdZ2jhUSOTEkHtk5BkzYDi4a9MshhUUBNbOnGWmqB0XmGVCZ6KedMHcDJFk+JW zPvTwIGb3+kEKk+YxGyA7Vz/EqW+nskVacuzRTE/DcAF6F1LdhpRHvMesgtp2rswnQEA /Sz3QHrzapUAzsNpwwfo/BCc0uzt03kGKY+9JlIYXr2pgi+2BIh7KSVIjJficB2kqRSZ xiVab7XKglqhk3AiPGFLEMOOKAPZKCjMmP90qKRhNjNlzBktRa4PNX9hpRYCcHBxY9Zq dreicfyLWfhwoVvtbAwD44hKzc0Vks/LNp6FU/BXOirIccT0MuGRiUqXyU6lwna/fY52 6u2Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:organization:from:references:cc:to:content-language :subject:user-agent:date:message-id:dkim-signature:dkim-signature; bh=2y5a/vllTVToZ8tYdmKF2k1bKH7kC4Iq36Dxz5Vsp9Q=; b=PG4jYdrsJ/AcCF/uOBy+cElIMS2uwHaLRhYNW7Na2XiDjI4hBR33YYAB3UiUrHkgCB K80bgdDRzz56SsD5iVfvieM1B1tLG8E7BnfKWXu8XI9hlxyd3j45hioVLLHQDdyFb6SY t4Fci5DpQH1k3Ee6aDTA9DVwmR0VgIcV39A1CQrcf0GN7DOlnH9oyXfZcJnfVzxc/rTD mEeKSTTzKBfdvFRM9wG3acFPqoZJCpbMSajCEp1KspvPkQ5MLzNRRjQBEYoourLz9rre 03LmMatM8s0Tc2o/8MzsGDe/i4GxVqeD5mm/ODCvtuUbZVl2qIyRN/LaxsqL2JXwDWcX +3EA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2021-07-09 header.b=b+xcXJq4; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=y5Vlk37C; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id lp10-20020a17090b4a8a00b001bfbba3bce9si8988213pjb.66.2022.03.11.12.35.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Mar 2022 12:35:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2021-07-09 header.b=b+xcXJq4; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=y5Vlk37C; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D0F231CD7F2; Fri, 11 Mar 2022 12:34:47 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245171AbiCJSJY (ORCPT + 99 others); Thu, 10 Mar 2022 13:09:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58792 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232971AbiCJSJW (ORCPT ); Thu, 10 Mar 2022 13:09:22 -0500 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B3D894B855 for ; Thu, 10 Mar 2022 10:08:20 -0800 (PST) Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 22AHrlNF019295; Thu, 10 Mar 2022 18:07:42 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=message-id : date : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2021-07-09; bh=2y5a/vllTVToZ8tYdmKF2k1bKH7kC4Iq36Dxz5Vsp9Q=; b=b+xcXJq4EW/TEZ4m1dJRAFsQ+CFlUaz+g2XdTj2wbVuxPXfa/84uJtwv1IqO4DAPrEaR QukD8HwBl9Zw54GOcWEeyepO6xioT2r/KOmYi9BrumfCuYkTqvnJBrwvDstI5CZLnmRE XNfsEGERg4MdexhGKeamb5UM3eluY8Uo708HJ08nPvHHIirTRbi0TjjpYjXPxVXhTuJf xkXL/+udLpSy+YO3N16qCSxa5cUEpKho7gE+aUiP4pkSKG/Kx9jztWPIsvIULi2Cm30a /Ts+2XtUxlEfzy9uOHIVXzcGe1E5XyuKFSj3HHWzSipoH8hk+O4QpsNAAs20iuVZSYNN Fg== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by mx0b-00069f02.pphosted.com with ESMTP id 3ekx9cnw9x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 10 Mar 2022 18:07:41 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.1.2/8.16.1.2) with SMTP id 22AI6cgf087709; Thu, 10 Mar 2022 18:07:40 GMT Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2170.outbound.protection.outlook.com [104.47.55.170]) by userp3030.oracle.com with ESMTP id 3ekvywwgsf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 10 Mar 2022 18:07:40 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=C5vWoRJsVJKySTmzDgItJmkNoQOoSzPAGuKJdODG2ZZ/erOwVqBN2oqpb0RE/AxYqeYtYY+z3f5cl5OQKbebFZXOsH8SPA/wcy/1iTlCRi4kVg1GJGE9CRxH8nnaWLqeSz+nyRac5HP9wl7UOR0vXsg1AQCaox+gVCzzIXLb/vCQVEcCOQ/mHLl2ifeG7a2YwhEmpi8WYLuk2FF39pFoyeA05KAXS7n0ZeFehMTYxDYvOV9id9uunvV3eXITpyu0+3IIbSEm9a5WsPjB0417eCYv7cvDwhb+OwKNMFs/3EuTH4hJ7cOMEsIqY2GxLzzMYAX5FGQgYvowjRExRJft3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=2y5a/vllTVToZ8tYdmKF2k1bKH7kC4Iq36Dxz5Vsp9Q=; b=W3JZdeJHOtKA6Ff8cBrhkUihd8n2SxSaTAYOLp9GVa65x3jg3hsWw/v5WgP8rjIRTkt668VBwaLbBMpde36s7pGGvvQlkC9XlZfzgcU/Uu4+6F68Vos5AaSXZ3EMZNkkjBe8+M1QC+W7HU4giOwlo0Ag5P0T8Kwyz3N2lEgD9JKY/eMfsJEazC1tjGKrWROiu9igFounri0sP2lCDyK0b7y/ytZlrGNuq9dzS9z8stQtPu5G7+dD/l4L5O61oAYIUIWvVxebjG3pbeyPBnYHVFpxpj4QNdffsvBqQOJK9nSfFxd5U63+OYvAwtcL48Ace8QiDoYg4Xq3VXqZCFwghw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2y5a/vllTVToZ8tYdmKF2k1bKH7kC4Iq36Dxz5Vsp9Q=; b=y5Vlk37C59lkwKIiCjQZhFrJRJYqExX/mzOEeN2Ka5LTQt4xjl67wmUQ1aObfWnQC2PPf69H7rc9lsZvSx1XUUT1pqtthN3fYSyfL0NQzBe1uFJaMtGnjA0AdW7ZMw5WdB4ZcTW67z46FOTZX4LKt5b48wOctxJwzHs8RBlrZvM= Received: from SA1PR10MB5866.namprd10.prod.outlook.com (2603:10b6:806:22b::19) by BN7PR10MB2755.namprd10.prod.outlook.com (2603:10b6:406:cb::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5061.22; Thu, 10 Mar 2022 18:07:37 +0000 Received: from SA1PR10MB5866.namprd10.prod.outlook.com ([fe80::e82a:9be1:793c:1702]) by SA1PR10MB5866.namprd10.prod.outlook.com ([fe80::e82a:9be1:793c:1702%4]) with mapi id 15.20.5061.021; Thu, 10 Mar 2022 18:07:37 +0000 Message-ID: <746497ff-992d-4659-aa32-a54c68ae83bf@oracle.com> Date: Thu, 10 Mar 2022 13:07:33 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.2 Subject: Re: [RFC 0/3] Expose Confidential Computing capabilities on sysfs Content-Language: en-US To: Dave Hansen , tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, luto@kernel.org, peterz@infradead.org, x86@kernel.org, linux-kernel@vger.kernel.org Cc: thomas.lendacky@amd.com, brijesh.singh@amd.com, kirill.shutemov@linux.intel.com, hpa@zytor.com, pbonzini@redhat.com, seanjc@google.com, srutherford@google.com, ashish.kalra@amd.com, darren.kenny@oracle.com, venu.busireddy@oracle.com, boris.ostrovsky@oracle.com References: <20220309220608.16844-1-alejandro.j.jimenez@oracle.com> <8498cff4-3c31-f596-04fe-62013b94d7a4@intel.com> From: Alejandro Jimenez Organization: Oracle Corporation In-Reply-To: <8498cff4-3c31-f596-04fe-62013b94d7a4@intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SN4PR0201CA0029.namprd02.prod.outlook.com (2603:10b6:803:2e::15) To SA1PR10MB5866.namprd10.prod.outlook.com (2603:10b6:806:22b::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 264bf79d-4d44-4fb6-6247-08da02c0dbf3 X-MS-TrafficTypeDiagnostic: BN7PR10MB2755:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 7+pDopktk1KDn1HycM0FJ8/yZNRd7CB5rF2SE0Hp41s9TQuH9PX39UgJ7RaK+Tl6WwIL/VgdQCz4jiLkNAewTafUoIRy1nu7dwxF6T329SJM8FS1Xb/vYSxYFGmqeg4HEgROWIOPHnIl0v6aiGJIYildtumvIXJGGvPx65AObMWreeKs6+GlGgtsSIzg/MMMTM8DtTFHzf5jZZjDsrXbRSwZBqcHh7asct0Yzx51PxJRZNw7GqqtDHAjsKUHVO4SUX8Xt4PcCwUOhpCFhTE4jF213xIA35cozp+5mBi5fUAf3S5yAMmUtkT0/cUfGiO6pPWjWjQG9NIxbG1w9r6tBnoVw64uFLtl1wX/6zM1qN6GgWFgzU13YciAcsAtca9H58ClApOgkOVRsNK1Ma9osCb0Q4YxJH/ec5aCsED424aJ4QSpsJ3DnkHEUM68KQ2MdrnIdC2KjILKMjtZxXaPvkqt/qK6mrg/yZuiKNl/mx5+5Sho/O9azNIFVbPK7HzIkC87KHEUQxbYcQ+G+LulSq+Qdzgh5OlCmWpBOlOPvvwgtCRIvJVLibRy/4IUIdqiW8GIs6o2DpUOzcUnj6VMqC2PhTVDGCR6dg8kS0PcWp93IqQKU4SFpXOVNtJ9KLeQxF0G32gKTj2N6pLOnIzP00u+DZZVMUSvkgC/psC9loAbKwCRhwsVgytaJq9DR6qsFElcXlJ8hVMIJHzFQ9pqiBrOTHrZXcR+g1DUeQVsnnYYRW/JoXFxCNEKQfHyJSuJMhkITfN0rQwNSE/nQlJB1JsALNo+X+RUsQbXhfVRZu2sluYug0gAkzO4IABAm7ZO X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SA1PR10MB5866.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(366004)(6512007)(2906002)(6506007)(36916002)(7416002)(5660300002)(31686004)(6666004)(2616005)(8936002)(107886003)(508600001)(36756003)(53546011)(83380400001)(6486002)(8676002)(4326008)(26005)(186003)(966005)(86362001)(31696002)(38100700002)(66946007)(66476007)(66556008)(316002)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?NTVLMm1FakkzbC80cUdnbWttVWhoUCtBaEYwMFltYjMwMXp1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FoUWIvbEZIdEhYWVhmRUw4SkxjZm02SU9OeHVqNm0wWHBFRHJh?= =?utf-8?B?bm1oNUNDY3NjMldPeVQ3clBTcWN4ZDdFR01EOGJlZisrQWo3WXpML2pUWE0y?= =?utf-8?B?aG8vTkJ1RU1CWWVweThSVjNDR293QVh6alpHKzhXUWw4eWtyVi8wb2lGc2pF?= =?utf-8?Q?cawz7gBm250mFCWqTpSZZPmIFsbDmY=3D?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 264bf79d-4d44-4fb6-6247-08da02c0dbf3 X-MS-Exchange-CrossTenant-AuthSource: SA1PR10MB5866.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Mar 2022 18:07:37.5358 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 4AtTKLxUEb4ylhgsDiPOsbtyAe9kCxucUftC56oHYMVE7LRpTe4Gu8LG2cO99WurdV3VPhDIqI/AoHrBtxEqTkXVmRWZVDc+Vc8xvAzdHgA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN7PR10MB2755 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10282 signatures=692556 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 mlxscore=0 suspectscore=0 bulkscore=0 mlxlogscore=999 adultscore=0 spamscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2203100095 X-Proofpoint-ORIG-GUID: Z-C7-Q9ACB4nis1L-uEVYYyCwImRK0PY X-Proofpoint-GUID: Z-C7-Q9ACB4nis1L-uEVYYyCwImRK0PY X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/9/2022 5:40 PM, Dave Hansen wrote: > On 3/9/22 14:06, Alejandro Jimenez wrote:> >> On EPYC Milan host: >> >> $ grep -r . /sys/kernel/mm/mem_encrypt/* >> /sys/kernel/mm/mem_encrypt/c_bit_position:51 > Why on earth would we want to expose this to userspace? > >> /sys/kernel/mm/mem_encrypt/sev/nr_sev_asid:509 >> /sys/kernel/mm/mem_encrypt/sev/status:enabled >> /sys/kernel/mm/mem_encrypt/sev/nr_asid_available:509 >> /sys/kernel/mm/mem_encrypt/sev_es/nr_sev_es_asid:0 >> /sys/kernel/mm/mem_encrypt/sev_es/status:enabled >> /sys/kernel/mm/mem_encrypt/sev_es/nr_asid_available:509 >> /sys/kernel/mm/mem_encrypt/sme/status:active > For all of this... What will userspace *do* with it? In my case, this information was useful to know for debugging failures when testing the various features (e.g. need to specify cbitpos property on QEMU sev-guest object). It helps get an account of what is currently supported/enabled/active on the host/guest, given that some of these capabilities will interact with other components and cause boot hangs or errors (e.g. AVIC+SME or AVIC+SEV hangs at boot, SEV guests with some configurations need to increase SWIOTLB limit). The sysfs entry basically answers the questions in https://github.com/AMDESE/AMDSEV#faq without needing to run virsh/qmp-shell/rdmsr. I am aware than having a new sysfs entry mostly to facilitate debugging might not be warranted, so I have tagged this as an RFC to ask if others working in this space have found additional use cases, or just want the convenience of having the data for current and future CoCo features in a single location. > > For nr_asid_available, I get it. It tells you how many guests you can > still run. But, TDX will need the same logical thing. Should TDX hosts > go looking for this in: > > /sys/kernel/mm/mem_encrypt/tdx/available_guest_key_ids > > ? > > If it's something that's common, it needs to be somewhere common. I think it makes sense to have common attributes for all CoCo providers under /sys/kernel/mm/mem_encrypt/. The various CoCo providers can create entries under mem_encrypt/ exposing the information relevant to their specific features like these patches implement for the AMD case, and populate or link the attribute with the appropriate value. Then we can have: /sys/kernel/mm/mem_encrypt/ -- common_attr -- sme/ -- sev/ -- sev_es/ or: /sys/kernel/mm/mem_encrypt/ -- common_attr -- tdx/ Note that at any single time, we are only creating entries that are applicable to the hardware we are running on, so there is not a mix of tdx and sme/sev subdirs. I suspect it will be difficult to agree on what is "common" or even a descriptive name. Lets say this common attribute will be:         /sys/kernel/mm/mem_encrypt/common_key Where common_key can represent AMD SEV ASIDs/AMD SEV-{ES,SNP} ASIDs, or Intel TDX KeyIDs (private/shared), or s390x SEID (Secure Execution IDs), or . We can have a (probably long) discussion to agree on the above; this patchset just attempts to provide a framework for registering different providers, and implements the AMD current capabilities. Thank you, Alejandro