Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp2136921pxb; Wed, 9 Feb 2022 11:37:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJxETmdR+bnhYPjVZRpbFGnXlFvmqfdherdwY1yKOo/3Ztp7GCZV9Oh555qcDQvQTbOfCADc X-Received: by 2002:a17:90a:de10:: with SMTP id m16mr5064531pjv.157.1644435458383; Wed, 09 Feb 2022 11:37:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644435458; cv=none; d=google.com; s=arc-20160816; b=V1tygLAQTZ05VT8on4f5l44B7M3HB1/H3EVA2lWX7S/xkbNGjHL3hoKoj1w1W+xxST QQuURRSZEfv1maLdST3HUD7/LzA/unfC0OOeuzUopT/0Uo7Opfyfu8EQnc42YMH6nDxu Q99DnspGRvtSRzChFhzqZpT0TG/Xwok9xfOKSEC01SP+Exx1V10GyiQZl9tHp9kAkYG3 7hg9Zj9tTgxlSLjGhva377ZBn84to8Iq0O6Zes7Sx3seqpZa8JtyxJrNp9ntM75JA9vp Ci8H0t4G1ILz8fjGVyA8Z4/GWIBRSRnA7xsm6FdaPE72IyNvrkr+FsfY4cu7TdiGzcEA /AKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=J2UeZRIc/grH3y981JA1tO26NXcyLpm6kkAjdSVUWMs=; b=mr1i6dlxAzWJTm1XG6nWIATkgGRrOOxn/0JcCyBLVz2gVp3cTwLfIJrg609DfvlOm/ IR7qgcGTSmArd5HyHmPAKv0+YnhxeEMXN3tLs/rrMkPTs1giHOXzE37wxrsmQlG31ACB psQQoX2vr0JrIXgEfMKOUGRbpVHTnpYQALkNBRuFH3peuG6B4QYME/D0wKcoaALWMtL4 bIeGaG4+ygkARcPoGcwmWeYwZhpgKQ18c4tVBAjNgF0fi1cw93AQW2gC45fP85S7nIWk k2vJMSBJRo0+8I7+9t/mrh3iMsYxaYxDOZuBJi7AbYF5Z4f3QzU4sT3cWw8Wjrr7Ehf8 QJMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=fBFDjLuL; 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=intel.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id u11si9466540pfi.306.2022.02.09.11.37.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Feb 2022 11:37:38 -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=@intel.com header.s=Intel header.b=fBFDjLuL; 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=intel.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A4BBBDD5BD1A; Wed, 9 Feb 2022 11:37:09 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229588AbiBIMEP (ORCPT + 99 others); Wed, 9 Feb 2022 07:04:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39518 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232198AbiBIMDa (ORCPT ); Wed, 9 Feb 2022 07:03:30 -0500 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5F678C002146 for ; Wed, 9 Feb 2022 03:48:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1644407319; x=1675943319; h=date:from:to:cc:subject:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=KIul0VRH8+851bLTssNY2JClhDKRKqDCUngDw8TQE8Y=; b=fBFDjLuLOGfSMbAdOdqo5OxtMhogq67Wb4RZZhufn0Bgn1YctTeNjhCa x/5KuOu9sYLLl9jUxcjySA+ALTEhmTPBff+m4aaLz6qp6cOmEuIiWf8gm Wmp+kWDiZbikqahrzms/ACIukuzErSzxsTfRVJj4StBArd0ThnHma+SIs YaCPGDkXOWaS5eI/IYhvAX4FFrVbb08DIwmtt+JOizySWfX271WPfHl5r OGxG3n7kTJJLbuNSBiZqwOPJeBHGAGDT1fP8oTn8+FHtaDfsvDB5cxoRl VHnylqH7Kfu9dSvNkXcX/tgjEHQM+Ybzxmh6zX4vT3siuPaH1vKgpQPOx A==; X-IronPort-AV: E=McAfee;i="6200,9189,10252"; a="232752854" X-IronPort-AV: E=Sophos;i="5.88,355,1635231600"; d="scan'208";a="232752854" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Feb 2022 03:48:38 -0800 X-IronPort-AV: E=Sophos;i="5.88,355,1635231600"; d="scan'208";a="536905809" Received: from ravicha1-mobl.amr.corp.intel.com (HELO khuang2-desk.gar.corp.intel.com) ([10.255.88.114]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Feb 2022 03:48:33 -0800 Date: Thu, 10 Feb 2022 00:48:31 +1300 From: Kai Huang To: Borislav Petkov 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: <20220210004831.03dea501738bee060003d040@intel.com> In-Reply-To: References: <20220124150215.36893-1-kirill.shutemov@linux.intel.com> <20220209235613.652f5720cd196331d7a220ec@intel.com> <20220210003033.e57c2925b69bab5cfabf7292@intel.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, 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 Wed, 9 Feb 2022 12:40:17 +0100 Borislav Petkov wrote: > On Thu, Feb 10, 2022 at 12:30:33AM +1300, Kai Huang wrote: > > Because SEAM, P-SEAMLDR can logically be independent, so I feel it's better to > > have separate C files for them. > > Most of those look like small files. I don't see the point of having it > all in separate files - you can just as well put them in tdx.c and carve > out only then when the file becomes too unwieldy to handle. arch/x86/kernel/tdx.c is already taken by this series. This is the reason that I think perhaps it's better to rename it to reflect it is for TDX guest support. > > > Thanks for the information. However, for now does it make sense to also put > > TDX host files under arch/x86/kernel/, or maybe arch/x86/kernel/tdx_host/? > > Didn't you just read what I wrote about "kernel"? > > > As suggested by Thomas, host SEAMCALL can share TDX guest's __tdx_module_call() > > implementation. Kirill will have a arch/x86/kernel/tdxcall.S which implements > > the core body of __tdx_module_call() and is supposed to be included by the new > > assembly file to implement the host SEAMCALL function. From this perspective, > > it seems more reasonable to just put all TDX host files under arch/x86/kernel/? > > It would be a lot harder to move them to a different location later, > when they're upstream already. I'm talking from past experience here. Are you suggesting even for now we can start to put TDX host support to arch/x86/coco/tdx/ ? > > But let's see what the others think first. Sure thanks for comments. > > -- > Regards/Gruss, > Boris. > > https://people.kernel.org/tglx/notes-about-netiquette