Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2578772lqp; Mon, 25 Mar 2024 03:20:35 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV+bv3guguqxGscd9VvI2tRth2vdlJdZ1746ICJehj+B9g5SmSuqFJDypTnKC4MRL3Iobv7gbWBHDIoocMtCjuao09lAjK58PRkaVQiTg== X-Google-Smtp-Source: AGHT+IEeiTcZRjrq2kkClfukieUqfn+egXZ5xk4WQo0GuyjKQJxeEcPzVmz3OKEWdMxYCjbjcV4q X-Received: by 2002:a17:902:ccc6:b0:1db:3a22:1fd6 with SMTP id z6-20020a170902ccc600b001db3a221fd6mr8340266ple.66.1711362035328; Mon, 25 Mar 2024 03:20:35 -0700 (PDT) Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id i18-20020a170902cf1200b001e0d0c9ed83si413279plg.279.2024.03.25.03.20.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 03:20:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-116357-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Y8t0sFqV; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-116357-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-116357-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 91971B2178F for ; Mon, 25 Mar 2024 09:01:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 51E7D6F083; Mon, 25 Mar 2024 04:08:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Y8t0sFqV" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C9B946F076; Mon, 25 Mar 2024 00:25:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=198.175.65.19 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711326320; cv=fail; b=sUx19wtOzKYXIv0jN6O8FR0ABtHCaBHpuI7TEm6h3Xx/6X6bivzooul23kO7G8OafGi+F6GfLz7KHtR3doS4MpPpWd73/yur5sAQMAOOswXaX1Hl/fHG9g22wtUnTd5fZtbLLi7BqS4sdx3LQP/QYdGRU+oUo9dSYCM0F+f3SkM= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711326320; c=relaxed/simple; bh=+5S01g9AnXXNBXtOxPBH9Vqfd5svTlFvQh9Mk2dNiWQ=; h=Message-ID:Date:Subject:To:CC:References:From:In-Reply-To: Content-Type:MIME-Version; b=D8lyyoquyeDCICZ+dx9htZxFvx05taWavaimEPEyrYYSwJR1gysZgxjLscbDAsltyI5RuH9ZoHziBr9djmOItQOQg1IMNnVPdFVDOtwQ+yzF6uBe8eHwaSJjzmf6um6bw0sRgPQteAs/pv5AO4Yg6DALQl8lzyqnO+PD0fgMVFU= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=Y8t0sFqV; arc=fail smtp.client-ip=198.175.65.19 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1711326319; x=1742862319; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=+5S01g9AnXXNBXtOxPBH9Vqfd5svTlFvQh9Mk2dNiWQ=; b=Y8t0sFqVDyWYt1m3oo299JfRyoa5nky3jV/LlQZzn33Z9GFSsZp2Zn2x SYEXeROaY6ZZcf6PeB7NcbYFxFYjR6jO1NTxhn8Pu6Lf/7vcUWAtDxaQk hz8dZ4CT2d8/ax3rfqnhU2bf9VVduiFgVbsKbGbK5ooK0y648S/Kr8heP FU2zlkOEiY6vnlgT1HvFFuvYqbk2mcq6sNhNWq6yiI9vKpDEEMHsnGXzJ x27n8HXJkEJoAFE+GBH2XYLU76u3Pa0Ps+IZ/4966ifj23Zj5h/hseSOa sMPwLtJgX3VW0P7IU4/+Q1/xhsTGrIpH3PNAADR1y9FiZxydvleZav8PP A==; X-IronPort-AV: E=McAfee;i="6600,9927,11023"; a="6167317" X-IronPort-AV: E=Sophos;i="6.07,152,1708416000"; d="scan'208";a="6167317" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by orvoesa111.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Mar 2024 17:25:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,152,1708416000"; d="scan'208";a="46440496" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orviesa002.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 24 Mar 2024 17:25:18 -0700 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Sun, 24 Mar 2024 17:25:17 -0700 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Sun, 24 Mar 2024 17:25:17 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Sun, 24 Mar 2024 17:25:17 -0700 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (104.47.57.41) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Sun, 24 Mar 2024 17:25:17 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FLOtuWXY5J+vNDjUUiWVBDR6TBtvK8aGjMAQYn45k/whVEnjo15JVNuSbOeBipyo4mRLMCN2Irglu8fOLcCODr5ntLdJ8tu65skbr8qSwTgWhhkFBHGqb2ZhOcPuttdYbzz824jL6LTFdYDeOUKdcQGD7+5dZgzBSDMELK690v2rWEbMClf2XaBVrguT143vtD3oZ1pR+elSUh7PBOGszPx5f94xDGsT0R+wXucs+A8aHMeXW3g67NEKTAfWbpEG2R960rIST8a6FO1QWn2vc89ygc0lqyxUSXGE3CBbXyxGdpvj1adIohMGwzCZGUiuxKNq+UTLgRttoVAZl3BI4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Xg2g1P+vNRTUF98h4MNdEAYbD+MmZ6hX5il5pGJuiLQ=; b=awGL/J81phZdyqUbWWetsBmWNo6lni1edsjl4rLo3Z5uBc3RE178nPo9mE3wwXdjaeUI+3sjKo0eNx5eSLvitAPjx7ZchAoGEKAA908RqOO1xV/xZZlSu7Xr2qh5IvS0msmOg38iWnM6s3E8g3QH1LYVeXpB/+WgBv9MTD6rdIcGZBlRisnodKVqSyhTcAd5gjcXmw3tieRE+WrbwN1t+INTvmxI/DOvSeNz5f9AfTKARMkAaZ1FobhTV3TdGWZWkiUeNYWHbdKnnJf+HLu/owmamwHEpd4gIvDvg6LBImdLYkzHdMYr2e8fe/6hj3mezv1R1GVikBhdN0v8QRaSVQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from BL1PR11MB5978.namprd11.prod.outlook.com (2603:10b6:208:385::18) by SN7PR11MB8067.namprd11.prod.outlook.com (2603:10b6:806:2e8::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.31; Mon, 25 Mar 2024 00:25:14 +0000 Received: from BL1PR11MB5978.namprd11.prod.outlook.com ([fe80::ef2c:d500:3461:9b92]) by BL1PR11MB5978.namprd11.prod.outlook.com ([fe80::ef2c:d500:3461:9b92%4]) with mapi id 15.20.7409.028; Mon, 25 Mar 2024 00:25:14 +0000 Message-ID: Date: Mon, 25 Mar 2024 13:25:03 +1300 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v19 036/130] KVM: TDX: x86: Add ioctl to get TDX systemwide parameters To: "Yamahata, Isaku" CC: "kvm@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "isaku.yamahata@gmail.com" , Paolo Bonzini , "Aktas, Erdem" , "Sean Christopherson" , Sagi Shahar , "Chen, Bo2" , "Yuan, Hang" , "Zhang, Tina" , Sean Christopherson , "isaku.yamahata@linux.intel.com" References: <167f8f7e9b19154d30c7fe8f733f947592eb244c.1708933498.git.isaku.yamahata@intel.com> <838fe705-4ebe-43f1-9193-4696baa05aad@intel.com> <20240323002847.GB2357401@ls.amr.corp.intel.com> Content-Language: en-US From: "Huang, Kai" In-Reply-To: <20240323002847.GB2357401@ls.amr.corp.intel.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: MW4PR04CA0133.namprd04.prod.outlook.com (2603:10b6:303:84::18) To BL1PR11MB5978.namprd11.prod.outlook.com (2603:10b6:208:385::18) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL1PR11MB5978:EE_|SN7PR11MB8067:EE_ X-MS-Office365-Filtering-Correlation-Id: 5c73b071-5bfe-4713-5fc4-08dc4c620a19 X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 46hdAu3Qy6lDSDveUS4nmwu39dHx7l7qc6MkktN8wvJAJPVfH78sQM7QB4lZDAv5Qz20D37++MIJbcRb71PnDsHdRtGx/9XbSy4TwHyU/j4QeXFmiP+lrKXWF8+QIj8jTLB4ByUPZBxTRPHZjygtlwod2aLDYpaOnos0cET8fPmCsaluEwnT/xa+aq2AFCA4gThB2hEnVwfFzP1mKi0JWROgOL0zmv//Tow6OO5kgksPCiNeRIiHt49tCz4iYeVoRqV1tJz5mYgF3HCqg+9+PMWhfujnoeBKJiEmAWS/O4muiDBKPIzqo64q/YILNLjbkqmd3z5CmpCve1Lp/kcNYwxv0qWMZB0QdNVAAnZKVdwGT8FUpzIrkdbvSBmBW/fVu5ufyKnp7zI8kB5aJ1Z4MYDDMWahrRVMUyOoOt5h7pLoJruOgyDKFB6OzsYRSVM3T1My6mnybRNiMs3BUtMM/9W4qVg/DqPm7HFpjCX1C0sLsChTUw/qI7y++M/7w+0419pqFatK3qWxygmN0qKMzf1J1ML1N+KhADwbqvr6auKWQp7MAj3KIw9KaA+45DIhUhnTaGIpgYS2TgivYZDPmJQZ5q4mXXWydfWrqJ+Ad6mdstyz82xjFbNB0spFHtW7/OhDzDhv0/9arDZZsZa6mmuCu0WngUr+dBF4oZCJCSc= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BL1PR11MB5978.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376005)(1800799015)(366007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?aDN0cjBBU3l6UkhEa2V5Sy9GMjg1ODFLMmJOM2tna0JEMzNFVC9SNWkzTlND?= =?utf-8?B?ZFMzK0labzc4M0RZRmEzZWU1SG9zT29iWkw5MUJub1YrY3JQZXBTaVNFZXRu?= =?utf-8?B?aUNZNXNmMi93SVBWQUs5cXBubU1iRHRPM0wxbXVWM3Y1YXZsTU5EdFdRRVRi?= =?utf-8?B?ak5MckczSVhoV05SSXVGb3A3RnJsbkJVWGZmRkVtdDN2SUcyVk9Bc29NdVQ0?= =?utf-8?B?M3FXZVZFRm1Qbm05d2xlWnRFQjRrbm14bCtaMFB1OXQyM0paQzhlMWVPL0ty?= =?utf-8?B?OXdpUmlWdm0zWEV2ZXhuRjZ1Um1oejNuZUlnZHlVWW5IUXdoUEVRWlVJUTNW?= =?utf-8?B?Q3RYY01zazk5K3BjY2xLOWlla1NuV2FZR0g4NjBFTHBYWDlENEQ5Qjg0ek5L?= =?utf-8?B?K3pZdG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MB5978.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Mar 2024 00:25:14.1592 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: JHB8iGamAZ+i86a+g6V39Z/c8sS53a6d+6BVbH+bLi4HMoK6XDq0JDg7IvgydkL2TQpLmus9DB+Web1KYXjGHA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR11MB8067 X-OriginatorOrg: intel.com On 23/03/2024 1:28 pm, Yamahata, Isaku wrote: >>> + if (copy_to_user(user_caps->cpuid_configs, &tdx_info->cpuid_configs, >>> + tdx_info->num_cpuid_config * >>> + sizeof(tdx_info->cpuid_configs[0]))) { >>> + ret = -EFAULT; >>> + } >> I think the '{ }' is needed here. > Unnecessary? Will remove braces. Right. Sorry I didn't finish the 'isn't'.