Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp110364lqo; Thu, 16 May 2024 00:13:31 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXWhi88fqPdx/thAeZ62e72ZP+zByA0yjaEO3KYsadfDBFY0WcIjRvtT6s932It/zFTwU1BWNsKPy9aMoyZFZFQiXDpvqNAoH/7/dQCmw== X-Google-Smtp-Source: AGHT+IFZYXpMipJP0wiSxUOxNZe8661MIclJVDUuJes5ni6Td6QjA9Yyo9IWOOrFtLsVg4MZ2XV7 X-Received: by 2002:a05:622a:1a94:b0:43b:174:a15 with SMTP id d75a77b69052e-43dfdd0b333mr182136381cf.57.1715843611717; Thu, 16 May 2024 00:13:31 -0700 (PDT) Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id d75a77b69052e-43df56ddd85si6401031cf.743.2024.05.16.00.13.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 May 2024 00:13:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-180690-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="OfxqUy/o"; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-180690-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-180690-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 4A8291C212AA for ; Thu, 16 May 2024 07:13:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C1E9F2C85D; Thu, 16 May 2024 07:13:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="OfxqUy/o" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) (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 D96CC25765; Thu, 16 May 2024 07:13:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=198.175.65.11 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715843598; cv=fail; b=LVp3bxzosCMyKyA+uzubH2EfQmePJcDNR7haUH4vbc0yNG1fVcDRpfIc6JueanI1GsuFreqi2owDMeo4Voz4DudXSb8aGL5GWW93RcLstFY12hW0eU6XVlLl33qFeKK3iQQQwVlbWzlyLJ6sf0EiXXBYOL53NGFG26QEuT+8ROI= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715843598; c=relaxed/simple; bh=R36CZniN0wmC3lGrYM9EqgGifZ3LYd3NCI2OIrWKb6I=; h=Message-ID:Date:Subject:To:CC:References:From:In-Reply-To: Content-Type:MIME-Version; b=KoJCYtQIWbhWC1maFZDjFZsWNq8usfV+STAKMyGMMHb8nC19/G8WftKX3jtINO5ogk8SeTkplxExVLAjQ1Qzl4sApLYkjS/PWGfGHJqNxT20JNBf4hfLomtU4fCmdGCeymjkMjHKipNLD4Y9XDCxDD8TClhdvfuUaexQy1uo1hM= 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=OfxqUy/o; arc=fail smtp.client-ip=198.175.65.11 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=1715843596; x=1747379596; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=R36CZniN0wmC3lGrYM9EqgGifZ3LYd3NCI2OIrWKb6I=; b=OfxqUy/ogrBLKdBQ+qiQV1ePGxmT4KoHcD98HgVRyHdTnwwGEopTMA4d 1rxNnJL7O6GyMFmY+n9atJMtMNJCRViJXitenPNWlWbjMvqIbHmM9x0Yo RKEE76GewzRZPf9s/4U5IfFBhCTOO7Fk4xTvUKcGjQ/n20tqcjadqDxcN 9gT3LRrr6n0JBwwV92ldMEWDCR7gcqmPsBuT3C0nbwy1QpZxJahhkZhiP Bx4nlNqPfD+0tGNMt4yiq+QzKqkjqb6KBegiazxzfFkU9NcA4y9MxCDFb fwimb8VIk7qq90jM0nxCpwXq+rAoBDsM8wn475Kq154e0if3kzQ3WTFk4 A==; X-CSE-ConnectionGUID: 34ODoqroSJuKvdtAIHvZ/Q== X-CSE-MsgGUID: 6fFTaCSLSNK5jgtBPbcSNA== X-IronPort-AV: E=McAfee;i="6600,9927,11074"; a="22512663" X-IronPort-AV: E=Sophos;i="6.08,163,1712646000"; d="scan'208";a="22512663" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 May 2024 00:13:14 -0700 X-CSE-ConnectionGUID: slqkkNfdSTGMiDT39s7hWQ== X-CSE-MsgGUID: pzLCMoYgSFetc5e1Y0VYSw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,163,1712646000"; d="scan'208";a="54531449" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by fmviesa002.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 16 May 2024 00:13:13 -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.35; Thu, 16 May 2024 00:13:13 -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; Thu, 16 May 2024 00:13:12 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) 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; Thu, 16 May 2024 00:13:12 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.169) 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.35; Thu, 16 May 2024 00:13:12 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FR4XOeIZUzWrE/mNutkLt9haLlCVpmmE1efRLAt3wlLprFEMlNPdpADVCEE59xtmbweGHq8w5pIfcMFVD5TBLXQ+fabCK2dK8BuGIADSEoHGrADZOOrS0sc68rFV6WKleGmZDQmA8RdlW/tVYhv9bpG4cok8ugqttwHfijsjgKy/VdGg9mZFwdfg/Ykfpjw6Z7igSIUAWpRWeNCkGfhjiD/mfOFf/iergfR6jPyeH7Wcfb55uQ3ADCFhXgcLCOgKX/PbPwfs8/OR5AdaYWclMxtp0WghnAZwiEP6J9QMDNy0xJsSNHWwnCPT80jD0Lgzvq3tRFpD6F368AfQwEZQmQ== 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=TPi4mX5huI4X8iGAC7OBNNyGvsJX6gAEm9qB8UcI1j4=; b=BtfNSPpGL3o+9N8gDOco0pn+kPwNakS60zgNXrbvT8MH0ESEHWOloSN6rNwL5xSHkBtFfOZipa90A7rNRxOVOQrtuJDnDue15ppFfhe2XwQwpY48+SbjH7CbpUgCyg8/hFxtKQBqbLe/OFK5XMZSGkHWN2+aFN1LejUXL9rk4Zt6H0ItYsOsW7No64SVfXz1Upm/tT/0gK+ch+R94FdWSGDMwomOQCSwi8jmB3OGHcjWv8cZS4ldPvpriNeV4CxwxCGQKXq46rgMXkSRR/TTxlnqP7gabaPaWBv5s2wTXmwTUsi3fEawHPqYKV1lxOutCBSxI2GinY5UEOYsWRWnoQ== 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 PH0PR11MB4965.namprd11.prod.outlook.com (2603:10b6:510:34::7) by PH0PR11MB4805.namprd11.prod.outlook.com (2603:10b6:510:32::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.55; Thu, 16 May 2024 07:13:11 +0000 Received: from PH0PR11MB4965.namprd11.prod.outlook.com ([fe80::36c3:f638:9d28:2cd4]) by PH0PR11MB4965.namprd11.prod.outlook.com ([fe80::36c3:f638:9d28:2cd4%7]) with mapi id 15.20.7587.028; Thu, 16 May 2024 07:13:11 +0000 Message-ID: <39b95ac6-f163-4461-93f3-eaa653ab1355@intel.com> Date: Thu, 16 May 2024 15:13:01 +0800 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v10 24/27] KVM: x86: Enable CET virtualization for VMX and advertise to userspace To: Sean Christopherson , CC: , , , , , , , , References: <20240219074733.122080-1-weijiang.yang@intel.com> <20240219074733.122080-25-weijiang.yang@intel.com> Content-Language: en-US From: "Yang, Weijiang" In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SI2PR02CA0009.apcprd02.prod.outlook.com (2603:1096:4:194::11) To PH0PR11MB4965.namprd11.prod.outlook.com (2603:10b6:510:34::7) 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: PH0PR11MB4965:EE_|PH0PR11MB4805:EE_ X-MS-Office365-Filtering-Correlation-Id: be5b2fa4-f7fa-449e-e4ae-08dc7577a4dc 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|366007; X-Microsoft-Antispam-Message-Info: =?utf-8?B?dm5CTmRBNzJwM3lXOWwxY3NlZllkbG9rNk1pdDkyMTFQQitDc2ZJYzdVNGpH?= =?utf-8?B?clh6eG5xSTNBT2ZPRG85eE01WkE1V2ZsL1grblhkMWxuVVJrZ1ZnRCtCNFNw?= =?utf-8?B?RS9ZSzcrWnlNUTYyWUpQRUdPQlM5YzZ0c0RlRGVwSCtucU1MNXMvemN6M2hI?= =?utf-8?B?OTFZcHFFbmk0NHdhdzBiR0FQb1M2Q2dLTFlYdzRwZnFiK0dLLzNpaURrd29j?= =?utf-8?B?Q0NDMU5BYlNWZk5VZThPaVV5ZDc4YjJmUC9VRnRrWDFUaW15ek1XMjNHMS8x?= =?utf-8?B?bUo2S1NzSXgvaS9MNEptSlRXbzRYdSs0aHJzUENzSmlOZ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UkwZng2SEowRzJjcEg2TEw1NWNiMkFm?= =?utf-8?B?ME96bnlGUHJHbmE3Yk5DYmdGcFRJdDVTZWdsb1o3cUo1NnZPcDlOWElRZEJY?= =?utf-8?B?MDcwWTJuOWFRSjFRTTFncnZJVERWVC9YdndIMU5HNXRFK3ZGNThKWE9BdzM5?= =?utf-8?B?RkRxc1hHekNkZFhTWFlIVFh3b0t4SkdRZWt1SWh1WVE4dWhqMmVqRXJLVjN3?= =?utf-8?B?TkZxZFFSZk16S2NENGIrZlJCNzN4eUxHZy9iMmF5YUUwbCttWE42Sy9ZM1JZ?= =?utf-8?B?QnJBM2FGdHp6dzBhK2I1S0xuV1R6dUxSM3k5NW1zNDJHYjEwdWtSSHp1Y1dN?= =?utf-8?B?V1U1dVBvdTZkblVzY3FzZFhhb0NGREhMSytpL0QwNThHZ0YxcklEVHRWT0N1?= =?utf-8?B?dDB6U0U4K3ZDdkRJdWxRTFhVNWpNdWF2RDFDYWNBQjhFakd3Y3gzY2J5a2x2?= =?utf-8?B?SC9PZDE3SnpMRTJGdGpkQlVXR2N0VSsyQnpXVUFVMW5HeUJFL3pVclp3PT0=?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR11MB4965.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(1800799015)(376005)(366007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?NUVKQnhVaUY4TVhrMnlFUGVJRG9JTTloTTZtZ1lVM3VnRnJpU1M1azZTYnhZ?= =?utf-8?B?NUNTeWtuc1ZoTkVnS0U2Sjlub2F0ZDlzdXFvMkVLV09kRkI2OG9uaDVqRExP?= =?utf-8?B?aXZlTW03ZFg2Yi9MYnVxMGdPZjVoVXJGenc0L1VsSVU4eWkxYzBqTHBwNFBs?= =?utf-8?B?UDdUT1RwRWR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utf-8?B?Nm1wL084elV3M29FZ0RjUGh2ZENxRlRYRnpwRVRYNHdnWjZGTUlwaUhWMm5I?= =?utf-8?B?aERaRUREVndHU0ErVmJjSGl1R1JCVXJGN2RhMnBFVFpTTWg0MUZMcmdtZkRt?= =?utf-8?B?dHl3dVpwMHFlekgra0JMK0xYVFlNVmhrSVZjUENwOGk5OE1CbmcvZ0N1a1lE?= =?utf-8?B?SEE9PQ==?= X-MS-Exchange-CrossTenant-Network-Message-Id: be5b2fa4-f7fa-449e-e4ae-08dc7577a4dc X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB4965.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 May 2024 07:13:11.0742 (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: kLuBivF5aYUCQcQ4tPtpxQWqgCK1DJAUXiAHvgQsGaJFWvWXFbk8HAdxb/B6vIvgdd2RuUKI0DZndtRGiPMtOQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB4805 X-OriginatorOrg: intel.com On 5/2/2024 7:15 AM, Sean Christopherson wrote: > On Sun, Feb 18, 2024, Yang Weijiang wrote: >> @@ -696,6 +697,20 @@ void kvm_set_cpu_caps(void) >> kvm_cpu_cap_set(X86_FEATURE_INTEL_STIBP); >> if (boot_cpu_has(X86_FEATURE_AMD_SSBD)) >> kvm_cpu_cap_set(X86_FEATURE_SPEC_CTRL_SSBD); >> + /* >> + * Don't use boot_cpu_has() to check availability of IBT because the >> + * feature bit is cleared in boot_cpu_data when ibt=off is applied >> + * in host cmdline. > I'm not convinced this is a good reason to diverge from the host kernel. E.g. > PCID and many other features honor the host setup, I don't see what makes IBT > special. > > Hi, Sean, We synced the issue internally, and got conclusion that KVM should honor host IBT config. In this case IBT bit in boot_cpu_data should be honored.  With this policy, it can avoid CPUID confusion to guest side due to host ibt=off config. Host side xstate support couldn't be an issue because we already have below check in this patch: + if ((kvm_caps.supported_xss & (XFEATURE_MASK_CET_USER | + XFEATURE_MASK_CET_KERNEL)) != + (XFEATURE_MASK_CET_USER | XFEATURE_MASK_CET_KERNEL)) { + kvm_cpu_cap_clear(X86_FEATURE_SHSTK); + kvm_cpu_cap_clear(X86_FEATURE_IBT); + kvm_caps.supported_xss &= ~(XFEATURE_MASK_CET_USER | + XFEATURE_MASK_CET_KERNEL); + } What's your thoughts? Should I just remove the quirk here and keep everything normal and peaceful?