Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3008788imw; Wed, 6 Jul 2022 15:52:21 -0700 (PDT) X-Google-Smtp-Source: AGRyM1s19UuzXGsexaR5KF6VigjccR1/JGBjRISK7tMAnt4MxiVG47hGEGfvPTPwRs8Fuy1/qnRN X-Received: by 2002:a17:907:970d:b0:72a:a771:1b5 with SMTP id jg13-20020a170907970d00b0072aa77101b5mr24831535ejc.420.1657147941085; Wed, 06 Jul 2022 15:52:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657147941; cv=none; d=google.com; s=arc-20160816; b=DfUvgWXGUzw7ijrq2ZGW5sa0eITvKUFhfWL935o+dAghDtNHewumndCm564EdlvCsA dpDpD7pwtv/Hn1cZOs7uybSHlWo3qSJPITXx4e8RAGsicAlSCOBZO1qK/OCq9LN0GMef OtZVoqWFpoAn5Ij9CXqFp9H2NuYVX6OPiRQYPI8s7EgGpCvBkX0uJzt6e2+S4OMWnyj2 F9rGEhueix5wcyvLWhD4VL52nmnUzCjnZ3BMjwV64fvtKLo/Kft7OlS/cKvwfHW1J2l8 7tnCrEF7j8A6xMXTTSChHOZqKEVGPQqdFpiPpmY9mFIXrSulcuK47Ur+MrC7W+PycxFx 25PQ== 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=W9DMWoGHQBtWcRpXAwOxE3RxDXx9PIqwEq3pC3C18Tk=; b=kozdkBFbcl4fpm/334EqTQnhYL6lq7rdy208EDST2wIsz4Iay+gv8lwAQ4Nn9KQpCJ IXevjddcP7mxSQqWSPwSO7r3Voi0bZQEzxOMs8M6GJ/Alm8NkcPkZvQvr9U7cy3dTgr4 0jIQFr6hID2FxHzBuiJk6nF/vzaEf9hlsyIufVMeWXshlJYwaYtyJq0CMJgXZXZFmHeO Oqiaa0p9nLSU9JwmCNGn4hfPBZ7ffan7Qa0EI5wDYC+xM0ViNAMu6GDlc9hAiC5rLLhp pP06UGkgFj52f/DC7WJKudVO/JnIdf/iNAmuoagxWa8xfEC3zegOfhyG/mqDSyg7MSi4 N0DQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=FjI7s9B7; 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 hb12-20020a170907160c00b0072a5f0d0b27si34670951ejc.668.2022.07.06.15.51.37; Wed, 06 Jul 2022 15:52:21 -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=FjI7s9B7; 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 S233962AbiGFW1n (ORCPT + 99 others); Wed, 6 Jul 2022 18:27:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33854 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233419AbiGFW1l (ORCPT ); Wed, 6 Jul 2022 18:27:41 -0400 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C825B2B1B4 for ; Wed, 6 Jul 2022 15:27:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1657146460; x=1688682460; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=RVLT8rJ9x5ZWWb04/HzX/gD4RqrjVQt6kKfYwghXiqs=; b=FjI7s9B7dtHaO23GCNJhMRFlu6lxitZ4ybhraff3bgfezLeMBR5Xf1YN VSq7QYocysGL3WGYVxh9zA/cq7x2xttfZOLb8vW7uWlUHv4VKz76tUZwp mdQN7m8SXCrnd95cc+u7h3o8msOcGfPJafL8pe5pRNvVp29E3baOMACbT 8FQubxHATqKlUs8CDS0X2WPE2k0N8OdNAIwGhby0oIcqfczAfdSg7BxGs zV4BIcjgHJkSlNHjqfZbtFUJ/f14GCT6D87JGGtGJgYIRWHv0gDaLRzpa 0P+2FhejOedgPt5ZuVFPc1xrjPUyq+OrC8UNAjGoHd0JT2dLN/IeasBQe g==; X-IronPort-AV: E=McAfee;i="6400,9594,10400"; a="281430224" X-IronPort-AV: E=Sophos;i="5.92,251,1650956400"; d="scan'208";a="281430224" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jul 2022 15:27:40 -0700 X-IronPort-AV: E=Sophos;i="5.92,251,1650956400"; d="scan'208";a="920351252" Received: from leejust1-mobl.amr.corp.intel.com (HELO [10.212.160.225]) ([10.212.160.225]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jul 2022 15:27:39 -0700 Message-ID: Date: Wed, 6 Jul 2022 15:27:39 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0 Thunderbird/91.9.1 Subject: Re: [PATCH v8 1/5] x86/tdx: Add TDX Guest attestation interface driver Content-Language: en-US To: Kai Huang , Dave Hansen , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org Cc: "H . Peter Anvin" , "Kirill A . Shutemov" , Tony Luck , Andi Kleen , 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: <20220609025220.2615197-1-sathyanarayanan.kuppuswamy@linux.intel.com> <20220609025220.2615197-2-sathyanarayanan.kuppuswamy@linux.intel.com> <0f6bedbb-14cc-bf93-5d9f-bfd2c49dc7b2@intel.com> <48b9d807-2d9e-016f-bada-906911d6ecb0@linux.intel.com> <331abea18e728061979301772a9d0d61543f59fb.camel@intel.com> <0b5884b8-9240-63b2-ca4c-20c86fd2e8c1@linux.intel.com> <8b6f3f9f-71c8-2b6f-20a3-5e9c259a1b9a@intel.com> <74383158-460e-0cd1-94bc-faca5b8175ea@linux.intel.com> <932869b757b384426ada376cd9791697353c2247.camel@intel.com> From: Sathyanarayanan Kuppuswamy In-Reply-To: <932869b757b384426ada376cd9791697353c2247.camel@intel.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_HI, 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 7/5/22 3:31 PM, Kai Huang wrote: > On Tue, 2022-07-05 at 14:21 -0700, Sathyanarayanan Kuppuswamy wrote: >> SGX is a related feature. It also uses IOCTL approach for enclave provisioning. >> >> arch/x86/kernel/cpu/sgx/ioctl.c > > SGX isn't a good example here. The IOCTLs are used to create enclaves, but not > for attestation. SGX attestation relies on enclave itself to get/verify the > report, etc, so has no interaction with the kernel. If you are looking for an attestation specific example, you can only check the AMD code. https://patchwork.kernel.org/project/linux-mm/patch/20220307213356.2797205-44-brijesh.singh@amd.com/ Also, sev_get_attestation_report() in arch/x86/kvm/svm/sev.c also implements attestation IOCTL specific to KVM. -- Sathyanarayanan Kuppuswamy Linux Kernel Developer