Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp7794450rwn; Wed, 14 Sep 2022 04:45:19 -0700 (PDT) X-Google-Smtp-Source: AA6agR4ovhgvJzii8QCQW2iUX/sgh/172zrtHfvFu9LPahngzgpXqCcGYuzTvRHpy1m4XJJyiLET X-Received: by 2002:a17:907:6090:b0:734:be0c:e2e7 with SMTP id ht16-20020a170907609000b00734be0ce2e7mr25857663ejc.408.1663155919047; Wed, 14 Sep 2022 04:45:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663155919; cv=none; d=google.com; s=arc-20160816; b=MeFxgDUv6qz5sJFH4g4sOGoVgdQTjww7mD0RbGYUgOUWbcVzQlclRL56a7BQ4d0WlS +8UmJaYKndgn7a2c5/8SkOMIqvTvDbJuR7Vc5ysPQyIpAgSS1ihauSco0eZ0oiG5ppIj lj2oyqbrmULY88sYZkEOn0FjjhBpL6EMVtqMvks5KsuiUD8i2QXlbAO/9QNL1RyiJ9gq DEFMWRSRlsCpwLGZhycETpOCo2E891wUeudntudz953dLreWTrfyZ0Vcj+FFWF1hK0yG I68VU9iW2RQYIK4o+x9C0zxTGJEFFBzrnug+N6WPzPOjBlUQ7Y6S95CKeoujXGI8iwaM gEpA== 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=85b00U2CorGX056YGMnpBMbP6UdsS/4sJKRzqCKYAdY=; b=HBGNdOfI5cVMf9/463cOmJzwXZdu4W1aY5I4H1RWByQf7aTdRzwcEUMrWi0vVnKXk3 R30sYgNM2AKv2xhBMdB4HrtLo7+dDitnqP/hCXawq+sQ9e7xsAmi/aGKCb/jaF/D8gVa 577n4BLb7gFbsf9Qy7yB+WRPyd9zOW0tD2/7esPCnOGsuQgi2Se4fL3r4yp/ngCHyOEv POJ2n5cEIW5QpQMvlzRq4Cxx4By9j8SjqrgbaG3/utNFOyUZZTl1LIzQToT53HnwCa5V fqy9oUf7R9YCqCLcVDmuvQSUwOkjIpPrMStN6SonoxF0ZogdpyhJlBrJH6LeyO2obLgL yWCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Asx85HhU; 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 oz30-20020a1709077d9e00b0072af8809a85si13417350ejc.332.2022.09.14.04.44.53; Wed, 14 Sep 2022 04:45:19 -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=Asx85HhU; 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 S229797AbiINLgN (ORCPT + 99 others); Wed, 14 Sep 2022 07:36:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49502 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229627AbiINLgL (ORCPT ); Wed, 14 Sep 2022 07:36:11 -0400 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D9AC07C1A3; Wed, 14 Sep 2022 04:36:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663155370; x=1694691370; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=/UyNS1z5553flzYh+TOYHe0+TXBOSWmCkQFcTXHq+KU=; b=Asx85HhUSGiNp8TarWw2oAUHa1WpfTULFz/rezyFT+ZCHij8Wx0RXsbk +DZRHSnZrgPrV/zZLMhPukPqHeQPoi78LWpgbmSr07rKOsmxfXAuY+/IX noqlNoGveEOwy7Q8iQwpWJGZ+zAwEHNby0d55fU7uKiY67c3NkNdWphn9 078GSi8yeebA/GozuCr0NTT1VJIc6SVxUCjzJ0TdHNb7Zhr5XhCDobvU/ aXxt3rROrlYp64T8/MjM5lCsFZOgcFENkQ4/zxjo/EnyEgKOn7e0onkvU qkS5VOjl35P2C+v5YpRXCCWmA+shvyxm/UYr57cTq/yD7nrii8ijpeHXp Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10469"; a="278133852" X-IronPort-AV: E=Sophos;i="5.93,315,1654585200"; d="scan'208";a="278133852" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Sep 2022 04:36:10 -0700 X-IronPort-AV: E=Sophos;i="5.93,315,1654585200"; d="scan'208";a="567978194" Received: from rwathan-mobl1.ger.corp.intel.com (HELO [10.213.220.95]) ([10.213.220.95]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Sep 2022 04:36:04 -0700 Message-ID: <7c3cc265-869b-b2fc-43f2-d2cbd0bc142c@intel.com> Date: Wed, 14 Sep 2022 04:36:02 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH v13 1/3] x86/tdx: Add TDX Guest attestation interface driver Content-Language: en-US To: Kuppuswamy Sathyanarayanan , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, Shuah Khan Cc: "H . Peter Anvin" , Greg Kroah-Hartman , "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, linux-kselftest@vger.kernel.org, linux-doc@vger.kernel.org References: <20220909192708.1113126-1-sathyanarayanan.kuppuswamy@linux.intel.com> <20220909192708.1113126-2-sathyanarayanan.kuppuswamy@linux.intel.com> From: Dave Hansen In-Reply-To: <20220909192708.1113126-2-sathyanarayanan.kuppuswamy@linux.intel.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_PASS,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/9/22 12:27, Kuppuswamy Sathyanarayanan wrote: > > arch/x86/coco/tdx/tdx.c | 115 ++++++++++++++++++++++++++++++++ > arch/x86/include/uapi/asm/tdx.h | 56 ++++++++++++++++ > 2 files changed, 171 insertions(+) > create mode 100644 arch/x86/include/uapi/asm/tdx.h The SEV equivalent of this in in: drivers/virt/coco/sev-guest/sev-guest.c right? Why did you choose a different location? Also, can you please study the SEV implementation a bit? It might help you find problems like the ioctl() return code issue. The SEV driver appears to have gotten that right.