Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp6045247rwn; Mon, 12 Sep 2022 20:02:03 -0700 (PDT) X-Google-Smtp-Source: AA6agR5hWKDOURXw2tU5c8iZg3QbuCS3XCGagnEEELKN0eHjTZbfmH79bO4DMkqwn4fpEHbFXBg7 X-Received: by 2002:a17:90b:4c4e:b0:202:fd53:7acd with SMTP id np14-20020a17090b4c4e00b00202fd537acdmr174736pjb.98.1663038123528; Mon, 12 Sep 2022 20:02:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663038123; cv=none; d=google.com; s=arc-20160816; b=mPB+08P8fLN0rdX1kgim31ghheuOdRw37EsOEvXzN8Mqw2Ck1wxznk6hZMAQsRFcle yV5r9mGUI7sG5qFksvzKCxA/ioeC44c1cdJ9TO9hRdEq/jBIfWYt+ILGRsNkfCDZr4lA em9l7GVc8Ftynp+unrvXWMkRAYmG79UtU30BrWXU5D1iMK9bdIfTO25ep8J5kgvIU7OU 93wtKXmLMG+s/RIm7bZ0u13FPaJlhPGF2v1+UzVpKvh52/UMuQx4RoxocqaJ6KW+Jk5F IfrOA/kTL6qwVNUFLlCh3/g+KdI+TE2D0TLP6eQOSqoYcS0X3XgSX6/TuHRpKWa0CboO gc6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=/zJm7sLu4fHgl74KBylWzRhgAgtaqivXCU65YfZ9wkI=; b=a1OXzWVxyjTWFQUEPGV0GL9o6hIhWyCvQf/sAFIt33AVZXpz4I6QEzYDL4aeu9M6KN BUzKG4J8nE+XoTQwhzHWoEdhqVr+ojzzAFJmbaGe/ARdz9VkvjAeOzBnFjJ59j0COC7i 9ml2hurB5syHkydNi1+QGJojWekbXyVTFr+/og+D4Zn+W3jyTUX8IlDK1z6P817po9/0 ak1Pklz5ihusHyzPQLAQchduOpiLAyH6VG9Rac6kQ2EET+JmEJifzJse4v0z501vAnBo vSQzYSB/nHY6LY+Im56H+rJAHo4FQaDB41roSC1doP8zVe55fFCJrk5nUPJTPB4JIOD2 ZOHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Kc1V5lSi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n5-20020a170903110500b00176e16b0c58si677161plh.21.2022.09.12.20.01.51; Mon, 12 Sep 2022 20:02:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Kc1V5lSi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229909AbiIMCod (ORCPT + 99 others); Mon, 12 Sep 2022 22:44:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57194 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230136AbiIMCoK (ORCPT ); Mon, 12 Sep 2022 22:44:10 -0400 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A958C5300C; Mon, 12 Sep 2022 19:44:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663037049; x=1694573049; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=Vqfi05Z4Z8Qp9L70ig4iz7+6GxG0pFYgY4ZoQ6Q11gU=; b=Kc1V5lSixuFAf1ri10Syf7qJOTUbqMjc6Oi8Sb6N3FhdR93FzNxwDxPu zSdmHOe2yOKZgU5PcSKJVwzVjYYe6ijz0gRZhlTjk0qShyAUqdcnng6pr lGDK5nIC5Li2CZZBIcCe/Nqm4Fd3C6HQYI+bXjbiwNegr8rq0YiOQO08r m4fotT3qfIbG4rMW4HzwJj0T6qqmfwEd6OqcTPYUWgDOQ7InBAgW+YVg/ mtJqPyad8aX4dH82gRJd+zxDwLb3AJ/Oa5tL+9jbT8zM5tIfGu1tRSU5z gyidq2vlTW5FKm8YCXFxmsPGxhRuv/wKHmvw0/zXD1uFT/IZA/QrDJhwA A==; X-IronPort-AV: E=McAfee;i="6500,9779,10468"; a="384316195" X-IronPort-AV: E=Sophos;i="5.93,311,1654585200"; d="scan'208";a="384316195" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Sep 2022 19:44:09 -0700 X-IronPort-AV: E=Sophos;i="5.93,311,1654585200"; d="scan'208";a="646733909" Received: from liweian-mobl.amr.corp.intel.com (HELO [10.209.26.112]) ([10.209.26.112]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Sep 2022 19:44:08 -0700 Message-ID: Date: Mon, 12 Sep 2022 19:44:08 -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 v13 1/3] x86/tdx: Add TDX Guest attestation interface driver Content-Language: en-US To: "Huang, Kai" , "tglx@linutronix.de" , "mingo@redhat.com" , "shuah@kernel.org" , "x86@kernel.org" , "bp@alien8.de" , "dave.hansen@linux.intel.com" Cc: "linux-kernel@vger.kernel.org" , "ak@linux.intel.com" , "gregkh@linuxfoundation.org" , "wander@redhat.com" , "tim.gardner@canonical.com" , "hpa@zytor.com" , "isaku.yamahata@gmail.com" , "kirill.shutemov@linux.intel.com" , "Luck, Tony" , "khalid.elmously@canonical.com" , "marcelo.cerri@canonical.com" , "Cox, Philip" , "linux-doc@vger.kernel.org" , "linux-kselftest@vger.kernel.org" References: <20220909192708.1113126-1-sathyanarayanan.kuppuswamy@linux.intel.com> <20220909192708.1113126-2-sathyanarayanan.kuppuswamy@linux.intel.com> From: Sathyanarayanan Kuppuswamy In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-6.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,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 9/12/22 6:25 PM, Huang, Kai wrote: >> diff --git a/arch/x86/coco/tdx/tdx.c b/arch/x86/coco/tdx/tdx.c >> index 928dcf7a20d9..8b5c59110321 100644 >> --- a/arch/x86/coco/tdx/tdx.c >> +++ b/arch/x86/coco/tdx/tdx.c >> @@ -5,16 +5,21 @@ >>  #define pr_fmt(fmt)     "tdx: " fmt >>   >>  #include >> +#include >> +#include >> +#include > Sorry perhaps I am missing something, but what is the reason to include > ? It is included for kmalloc/kfree, file related structs and copy_{from|to}_user(). > > is for virt_to_phys()? Yes > > And should we explicitly include for copy_{from|to}_user(), mm.h covers it. So I don't think we should explicitly include it. > and include the header ( ?) for memchr_inv()? One of the previous headers includes linux/string.h (I am not sure which one). So why include it explicitly? -- Sathyanarayanan Kuppuswamy Linux Kernel Developer