From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A4392C32772 for ; Tue, 23 Aug 2022 20:15:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233482AbiHWUPD (ORCPT ); Tue, 23 Aug 2022 16:15:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49798 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233450AbiHWUOp (ORCPT ); Tue, 23 Aug 2022 16:14:45 -0400 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5770C6E2EB for ; Tue, 23 Aug 2022 12:36:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1661283404; x=1692819404; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=TRX0w6w6k4xHdGhnqgWb1WuGwu0FoTE1WVd+VrdE3AA=; b=gFJBy2sPIFOVgcXUw/SHIrvFaZvnbGT0D7WGLECIDL8UW/2VMLqbO9TB +jdZhS5wi6oPfP8RK8shw+XiFicCP7BtM0LauqotSdiqsKgHi80JA/b+0 xYkp7qdgNyunxM3gjs6LWvgOAi1Uoun92F9rdd8s1+h2jaiF0cfp10kiG 4WXnDXBDIFPiozGPFSSXC1aH8JzoC+MNdL4htN1RipZo1kgE6XxIM0Vh1 qS3HLapBeeni1TakVh7/yHBFtX1zpSj44WO4Mfjc4+PlHq4srurMSA6zu AZPEFJVukl0XOJE8L1Cp0U4BkvpqLPAzQmt7CJQy7/zDZRk/v5Qa0w8WR Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10448"; a="274168404" X-IronPort-AV: E=Sophos;i="5.93,258,1654585200"; d="scan'208";a="274168404" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Aug 2022 12:36:44 -0700 X-IronPort-AV: E=Sophos;i="5.93,258,1654585200"; d="scan'208";a="605770624" Received: from shyleshu-mobl.amr.corp.intel.com (HELO [10.209.104.113]) ([10.209.104.113]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Aug 2022 12:36:43 -0700 Message-ID: Date: Tue, 23 Aug 2022 12:36:43 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0 Thunderbird/91.11.0 Subject: Re: [PATCH v9 1/6] x86/tdx: Add TDX Guest attestation interface driver Content-Language: en-US To: Borislav Petkov Cc: Thomas Gleixner , Ingo Molnar , Dave Hansen , x86@kernel.org, "H . Peter Anvin" , "Kirill A . Shutemov" , Tony Luck , Andi Kleen , Kai Huang , Wander Lairson Costa , Isaku Yamahata , marcelo.cerri@canonical.com, tim.gardner@canonical.com, khalid.elmously@canonical.com, philip.cox@canonical.com, linux-kernel@vger.kernel.org References: <20220728034420.648314-1-sathyanarayanan.kuppuswamy@linux.intel.com> <20220728034420.648314-2-sathyanarayanan.kuppuswamy@linux.intel.com> From: Sathyanarayanan Kuppuswamy In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Boris, On 8/18/22 7:18 AM, Borislav Petkov wrote: >> diff --git a/arch/x86/coco/tdx/attest.c b/arch/x86/coco/tdx/attest.c >> new file mode 100644 >> index 000000000000..46a2f3612753 >> --- /dev/null >> +++ b/arch/x86/coco/tdx/attest.c >> @@ -0,0 +1,81 @@ >> +// SPDX-License-Identifier: GPL-2.0 >> +/* >> + * attest.c - TDX attestation feature support. > s/feature // > >> + * >> + * Implements attestation related IOCTL handlers. >> + * >> + * Copyright (C) 2022 Intel Corporation >> + * >> + */ >> + >> +#include >> +#include >> +#include >> + >> +#include "tdx.h" >> + >> +/* TDREPORT module call leaf ID */ >> +#define TDX_GET_REPORT 4 > All TDX leaf definitions go to arch/x86/include/asm/shared/tdx.h, for > example. > > Not spread around the tree. There are some in arch/x86/coco/tdx/tdx.c > too. > > In a pre-patch: please pick a fitting header, move them there and keep > them all there. > In v10 of this patch set, this code is moved to coco/tdx/tdx.c and the module call leaf IDs are grouped together in tdx.c. Regarding moving the leaf definition to asm/shared, the following patch from Kirill's unaccepted memory patch set is already doing it. Do you want to me to leave it to Kirill to handle the cleanup, or submit a new patch here? https://lore.kernel.org/linux-mm/20220614120231.48165-13-kirill.shutemov@linux.intel.com/ -- Sathyanarayanan Kuppuswamy Linux Kernel Developer