Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1847495pxb; Wed, 9 Feb 2022 05:53:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJxBll/9IJ4lb7oO45MnULP6UDV5MTqtVwPSg/EAdyLOE1CyLIKxTn6MGUEvfEqPko7hR98f X-Received: by 2002:a05:6402:206e:: with SMTP id bd14mr2539750edb.296.1644414820074; Wed, 09 Feb 2022 05:53:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644414820; cv=none; d=google.com; s=arc-20160816; b=DMr3IwZ+b/uZ0EWRV7mZEuVR28nOmIZFyYD/WYlrQZW44xeEPD41KzqvHUIjoUvKxt ZkVg/cmyFfl8wHkzHlV5IZhrVC0qYYGrKmIRQEJdxIhVqEfMiZt1YUvz/DrNei/VtqJI WM3Ac8+JQhNfxIJFdQDPICYcJxdhf7/v+1umvgAnPRSg/7Lr/e/D9oIzZoxCXw1eOhJk VnopbD+k0AZYC1/sDM0bqKYvCw+N1bxLSMcBNaRkCqcsgW7rbnVDGLJ3tlUDaZnmLEWW zu3vlUB+xeOFgiT4eITZtz0luQ8gAh5cprHOcpPoIny+buaoB0UW0V9zDS8Y3zfUQbkX hqbg== 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=pVcoJQ/L7RiOQPedz5rtS/XCcY9bKSouDnzYyJVnx+g=; b=PQzURRkjAi2+XeotRp/P1tgOW0WhxwwujE3qr33RatcZRmxWzgF5DYMp9Uf16q61Ot 3ZXc7a5C0PkfFl/TT+4okDgSIhu4xqQyaneOd87Za3hTz5hG+n8sS7hBrURoaSYwH4/o VgmQNcPy6QvRf8tU0TN9XWAPJMpM3mdFLZxEtEh0XmvUcmYgXzf/SToqpSmse13PKzaO Iw5G6Sds5c788gDlCuPbe64Grn1WxIWW9VaGIVOC3FHePppd7BOihtZsDWzr+i7VKbhf /c29o7rp/hLzKyrsnfLOu/oP3OLCDL9ITlG34zuX03cWhRbmHJ2zUAd4tfjRWHDg97Oj TU6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=KakI3FTH; 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=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ew6si1077103ejc.341.2022.02.09.05.53.14; Wed, 09 Feb 2022 05:53:40 -0800 (PST) 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=@alien8.de header.s=dkim header.b=KakI3FTH; 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=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232153AbiBIMKe (ORCPT + 99 others); Wed, 9 Feb 2022 07:10:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48270 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232600AbiBIMIu (ORCPT ); Wed, 9 Feb 2022 07:08:50 -0500 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA08AC1038F9 for ; Wed, 9 Feb 2022 03:08:28 -0800 (PST) Received: from zn.tnic (dslb-088-067-221-104.088.067.pools.vodafone-ip.de [88.67.221.104]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 642871EC054C; Wed, 9 Feb 2022 12:08:23 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1644404903; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=pVcoJQ/L7RiOQPedz5rtS/XCcY9bKSouDnzYyJVnx+g=; b=KakI3FTHRBi2wWdT4ywv0hUY8EiMiVB6Y8Z44UN5uLAKa2ObPNrrX4+GOEQLtxUVxC2Pqc eoVf447+EME7R4flp+4zN6lXlRJWUHY6DWd1RzJECk4bm1XTLakHIJIUPZA3l6AHTwwoBP r8dle9NOW6IMap175a8HVjm2/gU1TgQ= Date: Wed, 9 Feb 2022 12:08:18 +0100 From: Borislav Petkov To: Kai Huang Cc: "Kirill A. Shutemov" , tglx@linutronix.de, mingo@redhat.com, dave.hansen@intel.com, luto@kernel.org, peterz@infradead.org, sathyanarayanan.kuppuswamy@linux.intel.com, aarcange@redhat.com, ak@linux.intel.com, dan.j.williams@intel.com, david@redhat.com, hpa@zytor.com, jgross@suse.com, jmattson@google.com, joro@8bytes.org, jpoimboe@redhat.com, knsathya@kernel.org, pbonzini@redhat.com, sdeep@vmware.com, seanjc@google.com, tony.luck@intel.com, vkuznets@redhat.com, wanpengli@tencent.com, x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCHv2 00/29] TDX Guest: TDX core support Message-ID: References: <20220124150215.36893-1-kirill.shutemov@linux.intel.com> <20220209235613.652f5720cd196331d7a220ec@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20220209235613.652f5720cd196331d7a220ec@intel.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham 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 Wed, Feb 09, 2022 at 11:56:13PM +1300, Kai Huang wrote: > TDX host support basically does detection of SEAM, TDX KeyIDs, P-SEAMLDR and > initialize the TDX module, so likely TDX host support will introduce couple of > new files to do above things respectively, Why a couple of new files? How much code is that? > and the majority of the code could be self-contained under some > directory (currently under arch/x86/kernel/cpu/tdx/, but can be > changed of course). Could we have some suggestions on how to organize? So we slowly try to move stuff away from arch/x86/kernel/ as that is a dumping ground for everything and everything there is "kernel" so that part of the path is kinda redundant. That's why, for example, we stuck the entry code under arch/x86/entry/. I'm thinking long term we probably should stick all confidentail computing stuff under its own folder: arch/x86/coco/ for example. The "coco" being COnfidential COmputing, for lack of a better idea. And there you'll have arch/x86/coco/tdx and arch/x86/coco/sev where to we'll start migrating the AMD stuff eventually too. Methinks. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette