Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp112780lqo; Thu, 16 May 2024 00:20:48 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVqLhHlhxSfMiQ5W6r2Mpq32ZB3B2SwWaWDeGKsW7jAqRST8/8xS07/9/5bMjA4z1hKgqadyp23m0gpr3bBZVw+7kSz+Zudx2XrQ/Sg+g== X-Google-Smtp-Source: AGHT+IF5ZSBftYSyh2XxN55/vJIOv8+J16HZYI3ydCz2rj5/DXnRP7jCzg95AMaZJhF6nLDlfexJ X-Received: by 2002:a05:6a20:3c8b:b0:1b0:1ce1:e7b1 with SMTP id adf61e73a8af0-1b01ce1e8c5mr4651308637.20.1715844048088; Thu, 16 May 2024 00:20:48 -0700 (PDT) Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d2e1a72fcca58-6f4d2b1df48si15795946b3a.262.2024.05.16.00.20.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 May 2024 00:20:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-180692-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=QlyLlWbC; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-180692-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-180692-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id AF1A92827FA for ; Thu, 16 May 2024 07:20:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 851802C85D; Thu, 16 May 2024 07:20:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="QlyLlWbC" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.10]) (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 A0BC0C8D1; Thu, 16 May 2024 07:20:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=192.198.163.10 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715844035; cv=fail; b=gndbr/htR6GTua47bLmrlnLYhu9PzCdOYQxy1yuZHqsCLkHLtixXGNTmoLZRvRNR6vsdH7FhOuaVc+TYynZxquLsPWJZLlez3rB37qhvT6DE2AEBdNVLSQ9NVnKhbb5v51LKnuPiW6FOr687wuz9qaIjFE9jETmDX+0rxi/Tclk= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715844035; c=relaxed/simple; bh=NBuu10wr8hvN20auJJBZ9Tj3JATzDwfYXPd8n6+pEWU=; h=Message-ID:Date:Subject:From:To:CC:References:In-Reply-To: Content-Type:MIME-Version; b=NIjQ0tPSGoA6JJFHOp2bzX0X5NONX3yPh5NSLYyWxGVAsEu+RwWtNTD5Pbu24gc9a4mb1LpSVDRdDoA94v3zNvcRC9kjoFBILp5cGZ+AAEXo0jeAfSf7HXWTkTZ2BJW8nJKJYVdKriIR9zHPp1IB3vD25yl46YyV779irGdoj1M= 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=QlyLlWbC; arc=fail smtp.client-ip=192.198.163.10 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=1715844034; x=1747380034; h=message-id:date:subject:from:to:cc:references: in-reply-to:content-transfer-encoding:mime-version; bh=NBuu10wr8hvN20auJJBZ9Tj3JATzDwfYXPd8n6+pEWU=; b=QlyLlWbCLZ11GUpim4zkaQkrvXmtzF+GabztsscX8f5i2s8jnUzmxUbr E7TZy7iX2ZGEpyd6clIeafFdxayz4yRQ7QbFQFMX6byWgWicjmQisUJXm vi2nZP093VFZeRd3mzz8hhAYu/FxczrivdEmle/aV+Kl97Zq7XY0HK1QJ LXPOOKBcTeL9qYOPyaQ8gcRPGf9rp2Xj5fenEd2IeKnnQkuLVxhngatFa fskBia2nO5OqeD3XKIyaUHJ4M/j4d5g1qcOYk5oZuH+PNWo27PxvPjs83 7g7zd4VNkh9qS209EYjF82cCu+gJv+g94xwL4E5E501ZbxA7VUfwTwJ7l Q==; X-CSE-ConnectionGUID: gNkPSClgT1aEL8CbOAYTlQ== X-CSE-MsgGUID: 1myqTodJSG6geQm/i5daSQ== X-IronPort-AV: E=McAfee;i="6600,9927,11074"; a="23338157" X-IronPort-AV: E=Sophos;i="6.08,163,1712646000"; d="scan'208";a="23338157" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 May 2024 00:20:33 -0700 X-CSE-ConnectionGUID: KnwJPInmTl2t5JQii5Yj1g== X-CSE-MsgGUID: LrVGqNnxQES52+0Cn02iUQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,163,1712646000"; d="scan'208";a="31898767" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orviesa007.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 16 May 2024 00:20:32 -0700 Received: from fmsmsx601.amr.corp.intel.com (10.18.126.81) by fmsmsx601.amr.corp.intel.com (10.18.126.81) 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:20:32 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx601.amr.corp.intel.com (10.18.126.81) 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:20:32 -0700 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (104.47.57.41) 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:20:32 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jHHcHSX2pM+I9Pi3QtH/qkkRSHOiQuzBpe2Z8TXpS/MJlpyIf3GTE3/j0ZeFXISUwjt8qCBda6cnbTWt+MpQb6Vp2zyht8U0MxZaCOHY/zBJQgZwz56BA6cJlAis/qPP2mKtzHb97vx5D9Ik3IKqjrbAg+x48efTHT/CHXfsjK7lsmIjft+nNpqRlqd0cSk6l5B0/QJ8zEwC6vauF4irtFGi3ZA9XO8VrfJ2gOK0eYJY8U0IXdjGJ8WFv9HAS6Z+bCI/7E7wuVuX+cMp5sICNrzrS3rRTN8LI/BeMMhAd7Ghd2XARPz04J5ypHB7ArcioooEDGRwNcMJC5u2p5NoUQ== 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=NBuu10wr8hvN20auJJBZ9Tj3JATzDwfYXPd8n6+pEWU=; b=ALEz9e47EG9+FrYkKNAEEMFDy86WqX6uZf8cJ1p4jFrbvsl2bNkeHTnSKR2pMjDu+PdK2lrWPqgd8uwuzQnKRyeYa7M9+GksO+51Dmjhy//TPHrjYeiosAAFOJjV/cYzl3uWXSCZ41jqXeQ8grUI+Bt3P5xQ1JCh4K4FIrpjNE4PbMr8UQr/MQ+12SAF2PtMseH0cpHxJoE8l41XO3tmKVp7F9xRnSb5o2JeIqcLH7go/Sgdnd7WUCIxifjSS0Y1EDR4Mg0mJdTewrcgD70ZCxk8dU2aBZiAHwvNFlwKxqCBVZirBV1NvvQDNd+6mDl+xuqHAp0PUwRvW7c2qaSyPw== 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:20:30 +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:20:30 +0000 Message-ID: Date: Thu, 16 May 2024 15:20:21 +0800 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v10 24/27] KVM: x86: Enable CET virtualization for VMX and advertise to userspace From: "Yang, Weijiang" To: Sean Christopherson CC: , , , , , , , , , References: <20240219074733.122080-1-weijiang.yang@intel.com> <20240219074733.122080-25-weijiang.yang@intel.com> <83bb5f3f-a374-4b0e-a26d-9a9d88561bbe@intel.com> Content-Language: en-US In-Reply-To: <83bb5f3f-a374-4b0e-a26d-9a9d88561bbe@intel.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: KL1PR01CA0130.apcprd01.prod.exchangelabs.com (2603:1096:820:4::22) 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: 5b7bae0e-f1fb-4aed-c093-08dc7578aaa0 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?VnZaakVpYndtVXhOVyt1elNXY2FKckxpYlM4anhMUkpaQ3VyWnYrdC8vMEVl?= =?utf-8?B?Z2xMSkU3Z2laSzA3T083bXZGMzJLOWdaKzVqVXZkd3lZUWlYOEVBZSt4RVdm?= =?utf-8?B?Vmx6TVZxd1FUQm1jRWhsTXZHQTViNmhyNEpDZU1GT0hOOUQ4N0N2dXNSOWVC?= =?utf-8?B?VTNJUE4wUE1nVnBFRHJTOHg0anVTcHRHc1NmQXBRbjU0QmM0UmtiRkV5aVUw?= =?utf-8?B?WDBYSVgrU2FCaG44a3QxZXhqc3RnNVRNOWVXRnZTbkxkYXNBV2xJOEJqOHBZ?= =?utf-8?B?cG5WaGllN2c2bEZyenVVYWhicTQ2MjhZMkR3TmY4ZjVUSVRPZGxTNGR3MUJr?= =?utf-8?B?RS9YS1ZKUlExdmVPK1JJcWFDYkJyU0JYenNhLzNkeDN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K04wd3A5c0t4YnYwQ3FzL01XdVJ0?= =?utf-8?B?aWhzQmtEM3VvNm9EUmdaQTFNSFlOWlV1VTgyc1NyTmJ1UllyT0RiT2NHdU1w?= =?utf-8?B?dUlvQ0RFcDJ3SHVRRFpGMmdUaGlJTG1FQ1FKaWFtS1JhUmhHM0RZZGRrQ3Ri?= =?utf-8?B?YjlzaytaRHAzL0laTDFSTUtwQUcrK25KYWpQaGZqWFZtak5UNkJvVmtjNk92?= =?utf-8?B?S2RxcVhneWViSHpuRElxVzRFM3VwQlFJZllYRE85T1BLbXk0aUppVkFwb0N1?= =?utf-8?B?TEh5cDV2QkJYVU9jem80dkdNVmNUMnYrOXRXenVGaFJ3T3EyQjNsQ3pwY2w4?= =?utf-8?B?T2I0U0xDakRjampYQ00vSXV6eUJCV3huSUFkRVBiZTMxTE11blg1ZzhmazFI?= =?utf-8?B?a1l4WFMyNGxLZVJZamZVcjBBWXdlS082c2VsSVRGcURJejg3UTJLdUtBPT0=?= 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?U0Y1TG93YlljNlFuaUorVG44OFNVS0l5TjFtTkVRUDFUdEdTOEE5MVVJTy84?= =?utf-8?B?VGRLa2g0NW84L1dEdmJpQld0Mk5RR3BHQlJERHB5WmxGTkVwN1NmNjdWRGdL?= =?utf-8?B?eDFyWlowTEdBUW5DRys1dUpaaDRJOU1iQ2FVajZSY0FENnovcVRaTnNBczE2?= =?utf-8?B?M3VtUDh1VW1pbWtndW5jYzcxWlNEMkMycTZRSjU4MHowNnUvak83ZlovbGVM?= =?utf-8?B?UzErTGQ4RXJKNCtka04xMFcrNGRiZEVWZWR3dmx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YmZDcGRjczViQjJYdVJtTzQrNml2QnN3cTRnc2MzZytDalRXRjI2M2xl?= =?utf-8?B?MzNoZ1JTT1FuYXd1MWJoclZYZzJ4bS84MXNqWEd3THVJQnZ0UXo3Y1hZVkVY?= =?utf-8?B?U2c9PQ==?= X-MS-Exchange-CrossTenant-Network-Message-Id: 5b7bae0e-f1fb-4aed-c093-08dc7578aaa0 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:20:30.1880 (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: NHp9QTqCak5GuQb4qmnyDDSDRoTd0NJzyz8/UAGMBQk3BFzC10T/7km8tNoCZf+YYUks6UOMi4k+YV/yVO91nA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB4805 X-OriginatorOrg: intel.com On 5/6/2024 5:41 PM, Yang, Weijiang wrote: > On 5/2/2024 7:34 AM, Sean Christopherson wrote: >> On Sun, Feb 18, 2024, Yang Weijiang wrote: >>> @@ -665,7 +665,7 @@ void kvm_set_cpu_caps(void) >>>           F(AVX512_VPOPCNTDQ) | F(UMIP) | F(AVX512_VBMI2) | F(GFNI) | >>>           F(VAES) | F(VPCLMULQDQ) | F(AVX512_VNNI) | F(AVX512_BITALG) | >>>           F(CLDEMOTE) | F(MOVDIRI) | F(MOVDIR64B) | 0 /*WAITPKG*/ | >>> -        F(SGX_LC) | F(BUS_LOCK_DETECT) >>> +        F(SGX_LC) | F(BUS_LOCK_DETECT) | F(SHSTK) >>>       ); >>>       /* Set LA57 based on hardware capability. */ >>>       if (cpuid_ecx(7) & F(LA57)) >>> @@ -683,7 +683,8 @@ void kvm_set_cpu_caps(void) >>>           F(SPEC_CTRL_SSBD) | F(ARCH_CAPABILITIES) | F(INTEL_STIBP) | >>>           F(MD_CLEAR) | F(AVX512_VP2INTERSECT) | F(FSRM) | >>>           F(SERIALIZE) | F(TSXLDTRK) | F(AVX512_FP16) | >>> -        F(AMX_TILE) | F(AMX_INT8) | F(AMX_BF16) | F(FLUSH_L1D) >>> +        F(AMX_TILE) | F(AMX_INT8) | F(AMX_BF16) | F(FLUSH_L1D) | >>> +        F(IBT) >>>       ); >> ... >> >>> @@ -7977,6 +7993,18 @@ static __init void vmx_set_cpu_caps(void) >>>         if (cpu_has_vmx_waitpkg()) >>>           kvm_cpu_cap_check_and_set(X86_FEATURE_WAITPKG); >>> + >>> +    /* >>> +     * Disable CET if unrestricted_guest is unsupported as KVM doesn't >>> +     * enforce CET HW behaviors in emulator. On platforms with >>> +     * VMX_BASIC[bit56] == 0, inject #CP at VMX entry with error code >>> +     * fails, so disable CET in this case too. >>> +     */ >>> +    if (!cpu_has_load_cet_ctrl() || !enable_unrestricted_guest || >>> +        !cpu_has_vmx_basic_no_hw_errcode()) { >>> +        kvm_cpu_cap_clear(X86_FEATURE_SHSTK); >>> +        kvm_cpu_cap_clear(X86_FEATURE_IBT); >>> +    } >> Oh!  Almost missed it.  This patch should explicitly kvm_cpu_cap_clear() >> X86_FEATURE_SHSTK and X86_FEATURE_IBT.  We *know* there are upcoming AMD CPUs >> that support at least SHSTK, so enumerating support for common code would yield >> a version of KVM that incorrectly advertises support for SHSTK. >> >> I hope to land both Intel and AMD virtualization in the same kernel release, but >> there are no guarantees that will happen.  And explicitly clearing both SHSTK and >> IBT would guard against IBT showing up in some future AMD CPU in advance of KVM >> gaining full support. > > Let me be clear on this, you want me to disable SHSTK/IBT with kvm_cpu_cap_clear() unconditionally > for now in this patch, and wait until both AMD's SVM patches and this series are ready for guest CET, > then remove the disabling code in this patch for final merge, am I right? Hi, Sean, I haven't got your reply on above question. Would like to get your confirmation. Thanks! > >