Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp221210lqb; Thu, 23 May 2024 16:29:20 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUpMiyTjc1ZoRmjh+R7UaFEeAhRTGt/VI+COzVW2aEjPYUlQvE56sB9Q0/DFFeFsaOH+hxprrhqMwCJ0+EvG0XSUsW59vI3z2MDfyXC5A== X-Google-Smtp-Source: AGHT+IE69untrpb75o+UkneVgG21mWgNrQhbNKtN/Od13u7A4vshV593InGtpTN8EPJhTxOI9nGu X-Received: by 2002:a05:6a20:734a:b0:1af:cb65:1407 with SMTP id adf61e73a8af0-1b212cc7385mr1174182637.6.1716506960169; Thu, 23 May 2024 16:29:20 -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 41be03b00d2f7-68221b73acbsi174027a12.25.2024.05.23.16.29.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 May 2024 16:29:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-188120-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=iq1Z1K4S; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-188120-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-188120-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 87376B229E3 for ; Thu, 23 May 2024 23:29:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4C7E3128829; Thu, 23 May 2024 23:29:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="iq1Z1K4S" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.14]) (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 E2482127E1F for ; Thu, 23 May 2024 23:29:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=192.198.163.14 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716506946; cv=fail; b=u5qg+UuytRWp0xWJes27MJAhJngsTbhoFcVbkBnkN/LNM360HznmYDyYWSz9TneNjed8hnVOabHr8wNwhvVEekrZK5WMWFyezJflDlD52CIkVrFLpBO8O5fN+Qjn0E7bxwON13qRLT+JCfF4NSWM1RINJtOFHk0Y/Z4XQ87Hh4Q= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716506946; c=relaxed/simple; bh=Qf7Mb0rXEUjscCrzEGDm4cVRljuaFRJiLFdkzYu8OPY=; h=Message-ID:Date:Subject:From:To:CC:References:In-Reply-To: Content-Type:MIME-Version; b=MnaY3Fi6kgSwRb2SkaS/unJSnGWwHD/yECoka+ToWoMRwAU5uNbv0RhNnzyayi8K6FIL6FM4Uoo1iiBNRfyj1Q11m9j3LotpPXGJutTG+p15FYyXs/6C5pceW93Ggc074A+9mvtBP4cvc/kf/4NqPsyw215oAlWolYwozfCtvTw= 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=iq1Z1K4S; arc=fail smtp.client-ip=192.198.163.14 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=1716506945; x=1748042945; h=message-id:date:subject:from:to:cc:references: in-reply-to:content-transfer-encoding:mime-version; bh=Qf7Mb0rXEUjscCrzEGDm4cVRljuaFRJiLFdkzYu8OPY=; b=iq1Z1K4SS0jRrtk1LD7uNu5XauuPeMGcgnw/mxpOs6fB1cUgt8EX8adK PidckAxIZRk0Hmv5hvDZQjZFL9/ELguwKwHNW1+/c6FMv99TLgx/xRaxM uUzhsAnHRyaz22nvCEJjNUIpL+QrQdBA2vD7kMYbNFDc5PufdYAk3/dkD ypRNkwt/MuKIj9nhzAlAtqiocCO1caa1cDKmmiytO3PBDYvO7LOPkWhhr Q/l0KALI8Isv4Ep4szCRUqzhbC50PV6gaqQiaPo8o1FujtHQKxgCTqQXi Y1EgyYyNoqTcvoDrh1gYeggU0UN7IZPXeSgzx65G6c9YNu5/FcOZVxZE4 Q==; X-CSE-ConnectionGUID: fshksUpiS9Wj+PpwKa/X4Q== X-CSE-MsgGUID: Wch9e3GKR1+ht5orWYjOPQ== X-IronPort-AV: E=McAfee;i="6600,9927,11081"; a="13094946" X-IronPort-AV: E=Sophos;i="6.08,183,1712646000"; d="scan'208";a="13094946" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by fmvoesa108.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 May 2024 16:29:04 -0700 X-CSE-ConnectionGUID: MJU5lSqKQmazsz7wI3UIlw== X-CSE-MsgGUID: 5O5RIWeFQHm+BiYgb6z80w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,183,1712646000"; d="scan'208";a="38685012" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by orviesa005.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 23 May 2024 16:29:03 -0700 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) 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.39; Thu, 23 May 2024 16:29:02 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) 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.39; Thu, 23 May 2024 16:29:02 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Thu, 23 May 2024 16:29:02 -0700 Received: from NAM04-BN8-obe.outbound.protection.outlook.com (104.47.74.40) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Thu, 23 May 2024 16:29:01 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=c7X/QCsaAu6hqHXE2qvwL8BiEh9N8OtGY5ZHcOKg6Ty92xSBYuD9ZXkrBG4cD/0QPxCmLosxn1+5/bg8LG8C2xc/4//834awt0+UuSFPiBYoniQ55MFKWFeYTQb80n/xLe+wFoE7kJ1Q+7JZTDGO8/l3Tn/Qympozl6lTz00hd5pJgKcpxUnYqD4z4T6LFLGlfZASm4+A6hHX/4pw/Xrwijjy8WW7EsUFpmYBKnyB7gYlyPl1GEvChcDpIVjb1HA/0Z3JvtoavQ2/gAi+KuH89cbOW/tip6cmjdu8HzGpGzFwDXv9o3N9cIzc4IDF3Pzixi+n2excO6zC3hOT+i9uQ== 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=XMZlCEdMfsfW9Ja4zOK6LXpfw3beIJ4zNZww0SMRrUw=; b=B7crQangZMm3fmK7uJsGna1UVWBiEli1fIXZVvSLZ69RTZGi0Btjs0vBKVX+4DCzNxeCut1lkADwHl6nVksUWyQovj7kxCh4iOqiqtM1bjeLjpMTZnaEjagSdOJdQ4dP5qJNE5OMVuXeu+qocdh9mrINzD0vJzGQ0zWW4+8h7uI5elDTqO+Rb8lyyunQ1rE0NlQRBI8OFj0gHyHF0oqbx271lE4ky0onIAUqxhhFdGBIX/cFPPukTM2Y3RnIGc08cX08l1+b6IjlhLg5/5gt8Th6uUbKgMDgCW3Lm+0zFXeFXtN9/w2Qa8O1B9wa3HHeMDHcNwbRijHsdroRgiZF2A== 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 DM4PR11MB8159.namprd11.prod.outlook.com (2603:10b6:8:17d::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7611.19; Thu, 23 May 2024 23:28:58 +0000 Received: from BL1PR11MB5978.namprd11.prod.outlook.com ([fe80::fdb:309:3df9:a06b]) by BL1PR11MB5978.namprd11.prod.outlook.com ([fe80::fdb:309:3df9:a06b%4]) with mapi id 15.20.7611.016; Thu, 23 May 2024 23:28:56 +0000 Message-ID: <62231ebd-9ed9-464c-a4db-f8c79fd3ce5e@intel.com> Date: Fri, 24 May 2024 11:28:46 +1200 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] x86/kvm/tdx: Save %rbp in TDX_MODULE_CALL From: "Huang, Kai" To: =?UTF-8?B?SsO8cmdlbiBHcm/Dnw==?= , "kirill.shutemov@linux.intel.com" , "Hansen, Dave" CC: "bp@alien8.de" , "dave.hansen@linux.intel.com" , "hpa@zytor.com" , "mingo@redhat.com" , "tglx@linutronix.de" , "x86@kernel.org" , "linux-kernel@vger.kernel.org" , "linux-coco@lists.linux.dev" References: <20240517121450.20420-1-jgross@suse.com> <2a2guben2ysyeb43rzg6zelzpa57o24ufai3mi6ocewwvgu63l@c7dle47q7hzw> <03d27b6a-be96-44d7-b4ea-aa00ccab4cc5@suse.com> <6df4fb48-9947-46ec-af5a-66fa06d6a83b@intel.com> <86ca805d-7ed7-47dd-8228-5e19fbade53f@suse.com> <4b3adb59-50ea-419e-ad02-e19e8ca20dee@intel.com> <2e07ebc774bf176ebfab40e6ba8bc14ae6a94e0c.camel@intel.com> Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: BY3PR05CA0018.namprd05.prod.outlook.com (2603:10b6:a03:254::23) 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_|DM4PR11MB8159:EE_ X-MS-Office365-Filtering-Correlation-Id: ef1de8aa-9e9b-49c9-20ad-08dc7b801d75 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;ARA:13230031|1800799015|376005|7416005|366007; X-Microsoft-Antispam-Message-Info: =?utf-8?B?OW5VWEx4N1Fyd3JsSV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0NLa3B5YlpFR1FLcE56ZWpxRlNJNG1pQXM3YWh4Y25JVWxB?= =?utf-8?B?TnMvOTJEcHlKZUZjYTlvakdFM0tudktJSWYva0RTbDRhK2dzanFlV2V1eTRk?= =?utf-8?B?R0tCSTlKQWo0RitmNnh0SG55Rk8yWjYzTTl0QXRiSDlCd2ZUQTZQZzdiUGVU?= =?utf-8?B?bGR3U0VnOUtEa0xPUkNXK3pzOHBEMERveHJOME5Td3I3SjljcGpEaG1iM0ho?= =?utf-8?B?bkhjZUJscWRqTWxlOUtYZXJIMk1rbCtVcExoQXZqZUMxZTVsTnNUaTlMY0ls?= =?utf-8?B?a1Nua3BLQW05YnQ1dkRnbXNieXVjSVdjNHVQWE4zODYxNlRuTExhbFFCeEFX?= =?utf-8?B?RUsvSkREYzJrTmpITHhsSUhoTVRLTVcyU2plcC82Q3VXS2JVQXB1S1AyYlRy?= =?utf-8?B?VFRQWGJlTUhPckdjNm9LSkIyOXg5UjFUZjVVc2Zoc0hRUjBwMHNuMjBuTkxi?= =?utf-8?B?V01maDQvMjNlTDBESnVtakt3VU9zOUNoRm1PTlJmRm9XSFljOUZhelZqYjVG?= =?utf-8?B?VVhOV1Y2WnFPczdTV2Y3djZDOGhNZTA1NmNoZVcyS2dWWEtUZDJqNkw5STlO?= =?utf-8?B?RXAyTjNtdWlZMHc0L2t4SnkvS0l6VmZpYldQMFhEVjk1MzRELzhZSWowRG4r?= =?utf-8?B?bHp5RWg4d2U0ckxqUUkwanZZckdXRDAzNTlvT1hvbXVqMXJGekNDVGJxVks4?= =?utf-8?Q?cX3ZMqwiv9i31LOSifAjQ5VfMG1sHuZlAU/gGZ3xWIS4=3D?= 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)(1800799015)(376005)(7416005)(366007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSp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ndsVkkwL0RYSURBNVQ3WXEr?= =?utf-8?B?S0NSRXd4SlZ4UStuVDRlVWxHRGxiR0E0c0NOKzczaTU0dHR6Z2ZsbU5JNXpy?= =?utf-8?B?d0IvVDhHekJia2IyQUJzSXJJWXF5ZzNmd3J6MGoycStyRUhCWnMvNmROT3hv?= =?utf-8?B?aFFxbmN3dVdMZ1F2OS81eENMeWFsUzlQVEZrZ2NqdkU5NVh3dHc2MzJCVHMy?= =?utf-8?B?RnhBbUJjMHZjS3ZRN2hNbE1TS01IL0JMV1NRam9ESHpZYVVJbTBhVk8yTEh0?= =?utf-8?B?UEVnNVkxamZJWDdzRWRacHZqS21TUExBVFRJbjQxVmUyeEtoYkl0OVZ4d2V4?= =?utf-8?B?UlBFZmRpTlNBL1dxdWpMcTh4UE5aQXR1dVVmczFIMTlKS1F0QjlMaGZpckRV?= =?utf-8?Q?8BXJmPDMhnkct4L5y8NUaEYua?= X-MS-Exchange-CrossTenant-Network-Message-Id: ef1de8aa-9e9b-49c9-20ad-08dc7b801d75 X-MS-Exchange-CrossTenant-AuthSource: BL1PR11MB5978.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 May 2024 23:28:56.2017 (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: Zu8wMYN+wC0rTgqEsWtfDtKc6/UDYLLphcGmWZyPx+74UvNtaAzyzf6NOx0uAFCJZVr0VDRuGj9J1zT3htSDww== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR11MB8159 X-OriginatorOrg: intel.com On 24/05/2024 10:34 am, Huang, Kai wrote: > > > On 24/05/2024 12:43 am, Jürgen Groß wrote: >> On 23.05.24 14:26, Huang, Kai wrote: >>> On Thu, 2024-05-23 at 10:30 +0000, Huang, Kai wrote: >>>> On Thu, 2024-05-23 at 07:56 +0200, Jürgen Groß wrote: >>>>> On 20.05.24 13:54, Huang, Kai wrote: >>>>>> On Fri, 2024-05-17 at 09:48 -0700, Dave Hansen wrote: >>>>>>> On 5/17/24 08:58, Juergen Gross wrote: >>>>>>>> On 17.05.24 17:52, Dave Hansen wrote: >>>>>>> .. >>>>>>>>> Once we have the specific TDX module version, we can go ask the >>>>>>>>> folks >>>>>>>>> who write it if there were any RBP clobbering bugs. >>>>>>>> >>>>>>>> Okay, how to get the TDX module version? >>>>>>> >>>>>>> You need something like this: >>>>>>> >>>>>>>> https://lore.kernel.org/all/20231012134136.1310650-1-yi.sun@intel.com/ >>>>>> >>>>>> This one prints TDX version info in the TDX guest, but not host. >>>>>> >>>>>> The attached diff prints the TDX version (something like below) >>>>>> during >>>>>> module initialization, and should meet Juergen's needs for >>>>>> temporary use: >>>>>> >>>>>> [  113.543538] virt/tdx: module verson: major 1, minor 5, internal 0 >>>>>> >>>>>>> >>>>>>> .. and yeah, this needs to be upstream. >>>>>>> >>>>>> >>>>>>   From this thread I think it makes sense to add code to the TDX >>>>>> host code >>>>>> to print the TDX version during module initialization.  I'll start >>>>>> to work >>>>>> on this. >>>>>> >>>>>> One thing is from the spec TDX has "4 versions": major, minor, >>>>>> update, >>>>>> internal.  They are all 16-bit, and the overall version can be >>>>>> written in: >>>>>> >>>>>>     ..., e.g., 1.5.05.01 >>>>>> >>>>>> (see TDX module 1.5 API spec, section 3.3.2 "TDX Module Version".) >>>>>> >>>>>> The attached diff only prints major, minor and internal, but >>>>>> leaves the >>>>>> update out because I believe it is for module runtime update (yet to >>>>>> confirm). >>>>>> >>>>>> Given there are 4 versions, I think it makes sense to implement >>>>>> reading >>>>>> them based on this patchset ... >>>>>> >>>>>> https://lore.kernel.org/kvm/6940c326-bfca-4c67-badf-ab5c086bf492@intel.com/T/ >>>>>> >>>>>> ... which extends the global metadata reading code to support any >>>>>> arbitrary struct and all element sizes (although all 4 versions >>>>>> are 16- >>>>>> bit)? >>>>> >>>>> With that I got: >>>>> >>>>> [   29.328484] virt/tdx: module verson: major 1, minor 5, internal 0 >>>>> >>>>> >>>> >>>> Let me check TDX module guys on this and get back to you. >>> >>> Hi Jurgen, >>> >>> I was told the module starting with "1.5.06." has NO_RBP_MOD support. >>> >>> And I think I was wrong about the part of the version, and we >>> need that to determine the third part of the module version. >>> >>> I was also told the 1.5.06 module hasn't been released to public yet, >>> so I >>> guess your module doesn't support it. >>> >>> I did another patch (attached) to check NO_RBP_MOD and reject module >>> initialization if it is not supported, and print out module version: >>> >>> [  146.566641] virt/tdx: NO_RBP_MOD feature is not supported >>> [  146.572797] virt/tdx: module verson: 1.5.0.0 >>> [  146.577731] virt/tdx: module initialization failed (-22) >>> >>> You can have another try to verify at your side, if that helps. >>> >> >> [   29.362806] virt/tdx: 4071192 KB allocated for PAMT >> [   29.362828] virt/tdx: module verson: 1.5.1.0 >> [   29.362830] virt/tdx: module initialized > > Seems your module supports NO_RBP_MOD. > > This feature is per-VM and also requires to be explicitly opt-in when > creating the guest.  Could you check in your code whether the > setup_tdparams() function has below code? > >     td_params->exec_controls = TDX_CONTROL_FLAG_NO_RBP_MOD; > Oh from another thread I saw you mentioned you have the above code enabled. So from host's perspective the TD should have enabled this feature. It's possible it is a TDX module bug if you are not able to see this flag in the guest using the way Kirill replied.