Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp2100527rwo; Thu, 3 Aug 2023 04:52:50 -0700 (PDT) X-Google-Smtp-Source: APBJJlHuFYMFIOwSe6LqVx78uc0Yn37kF+QWa0VtBjNYxLWI0lD2b7574F0iQ5jEmRyl/tsR00rb X-Received: by 2002:a2e:b0fb:0:b0:2b9:eb0f:c733 with SMTP id h27-20020a2eb0fb000000b002b9eb0fc733mr8137432ljl.35.1691063570598; Thu, 03 Aug 2023 04:52:50 -0700 (PDT) Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u22-20020a170906951600b00992e0e54464si12185276ejx.254.2023.08.03.04.52.26; Thu, 03 Aug 2023 04:52:50 -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=ZpADdwOR; arc=fail (signature failed); 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 S234973AbjHCJHi (ORCPT + 99 others); Thu, 3 Aug 2023 05:07:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48378 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234961AbjHCJHf (ORCPT ); Thu, 3 Aug 2023 05:07:35 -0400 Received: from mgamail.intel.com (unknown [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A51E8E53; Thu, 3 Aug 2023 02:07:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1691053653; x=1722589653; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=JePaTM/2T9+vi/NL7kZ8Jns0c6ylYA7WR+mapvf8j+w=; b=ZpADdwORwKfwZcrcSX2tFmE7Gy/gEIKbH7PsfOz4koE++jC5/2IzkcUC ZCwREswIAFsq3mCYVaRN7h07qdIgDm3PVdTMqNMiSJOgyaBmxR+xJYUjV 8vGsNxPrq8BP/iIZqRpGkves5cNz+hn0nfJPWQjQthr8aXUZPLyQsjPaL JjUrsmF2wQrRODLslyVIKTwqyQCwtm+ldF2l/NEKU6X+IPYyZCrWJUpeL t54kJ+7ksLuZd3gNUFdfLBhLI4O2lcRI7qrr88HSprlQVAWqIyO0KJTCs KNk0Ou6HsypVadW9/HWb+nsivkpKFJS4rOqI6koMmx8A9lW9sRgegxWJG Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10790"; a="456197516" X-IronPort-AV: E=Sophos;i="6.01,251,1684825200"; d="scan'208";a="456197516" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Aug 2023 02:07:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10790"; a="799476223" X-IronPort-AV: E=Sophos;i="6.01,251,1684825200"; d="scan'208";a="799476223" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by fmsmga004.fm.intel.com with ESMTP; 03 Aug 2023 02:07:32 -0700 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Thu, 3 Aug 2023 02:07:32 -0700 Received: from orsmsx603.amr.corp.intel.com (10.22.229.16) by ORSMSX612.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Thu, 3 Aug 2023 02:07:32 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27 via Frontend Transport; Thu, 3 Aug 2023 02:07:31 -0700 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.102) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.27; Thu, 3 Aug 2023 02:07:31 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=R5UHP+Nu6YWp3z+SqQEDjBM0IIXa2aHGNrV9rb267675fsgduIqJ66UVnIkkapBhyqC2iV2gjbBXhMZv7gKtH8VGUwrVSR9OWscVymCDioOibIdf+BVRyoVpzLvsNwhVCGeW8ZyF1oUttI9b1FL4c7CE/s5ote/U2y3iorbIzrfNEMkWtPBgXCqQDP/8CWqAsZkO1WOxlFkYRCbOpXtT34BdLWTHgXTlZ7hjMav6gxaNgqxGSZcMVjGbhU/b/OIBYQnIZ3FZMWDZ+mPU2MWqVxaYiXCRhAjzhzVnAIgqjEOJhURLpNRq1tBfT3fWJk3Rfzey9EDnyxTS72dBwL2DqQ== 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=JePaTM/2T9+vi/NL7kZ8Jns0c6ylYA7WR+mapvf8j+w=; b=BPX1iKydao0tgsR+LXWj4DGmrzPOjiO7qpTfyPJwm/eHeRMOKwjfzi4DSqbf4ykqlFSdFVL2jnao/Ep+Z/GW3MdLwvKcYZXogCSBHgKwLEIoJ61x4EwmUvD5XBIqOOHuB6fFm87JGL3An9iX0WdzOWOWFKRCQ4zEv5i4xilMQk5hZXfRq+wJesVfg/hqXr7ieBGq3ykow7FTcbl7MElm0vWYC5Cd4pmxRIElMeaIstmcboPctM26h4z17ZIix1WyCU/lfOkXrBXlAyvMPQjDeZFKuCH7vZu2eAxuSrWgYhLiFe90krtcnal4q48+sXN8uDS2sYLdT9XXUtqUEhSfVg== 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 PH8PR11MB6780.namprd11.prod.outlook.com (2603:10b6:510:1cb::11) by CY8PR11MB7847.namprd11.prod.outlook.com (2603:10b6:930:7c::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.47; Thu, 3 Aug 2023 09:07:30 +0000 Received: from PH8PR11MB6780.namprd11.prod.outlook.com ([fe80::146e:30d4:7f1e:7f4b]) by PH8PR11MB6780.namprd11.prod.outlook.com ([fe80::146e:30d4:7f1e:7f4b%3]) with mapi id 15.20.6631.046; Thu, 3 Aug 2023 09:07:29 +0000 Date: Thu, 3 Aug 2023 17:07:19 +0800 From: Chao Gao To: Yang Weijiang CC: , , , , , , , Subject: Re: [PATCH v5 07/19] KVM:x86: Add fault checks for guest CR4.CET setting Message-ID: References: <20230803042732.88515-1-weijiang.yang@intel.com> <20230803042732.88515-8-weijiang.yang@intel.com> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20230803042732.88515-8-weijiang.yang@intel.com> X-ClientProxiedBy: SG2PR03CA0117.apcprd03.prod.outlook.com (2603:1096:4:91::21) To PH8PR11MB6780.namprd11.prod.outlook.com (2603:10b6:510:1cb::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH8PR11MB6780:EE_|CY8PR11MB7847:EE_ X-MS-Office365-Filtering-Correlation-Id: abbd5c84-54a2-4224-9da3-08db94011082 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: k5pHgSV+1iaDMrSDtzdjs2ekDkJSbzYZ7z5Fe7IR5os1zQJuJ06QzdDf6DSeVG6fYndyoU1nZxJaf5Bmo38Y3HExwmoZWmhAMT6t3GcSzHZGOXSIDCcvsSQp7CcuxcisrKglzxjDvzaHfyAsTUCk6ImP8NikjU1WOX6CndTzj0cN8wJjoCmcKx3DieT6VF99wOhIyW+6RYktD5EkagYi+Je2/mLi2vp6szNVDO9waPEQnverSgjuNV/6SIQXT518U2yV9FtR3matN651UEI6AWIbBuOShfAWQ1vjftZw+sHUa0aK9bNxL8rA7rKVrgrGFZ+3FKtCCaVhHzZdE8gzFXAx0QeNc0Kmt18sL3R/hQDDjLZ6z0xAZ/91FX5WqVkXynSOIs1D64dxsFNhYLZ+cTcKaEtTnsQ2r89Ho3nxXQt4pd4YEL3aXcA6TfXr3QJy44xlPKSu9qZ8fWGb9wUwICTn8moKXuzwqI9XdayscssvzdzMv5Qtp/lcqahUvaxFy1DT/vTy3sDVsTGDdil2Grh2L/3Zy7dozuBSbciiSGj3LPYYlccNP/Xg7IaJqLzJTZ/bw4hBGG2VgVPHBOKKs83x3EqEbIFH8bBtBpo8H8g= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH8PR11MB6780.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(7916004)(376002)(396003)(366004)(136003)(39860400002)(346002)(451199021)(6506007)(26005)(186003)(41300700001)(4744005)(2906002)(66946007)(4326008)(66476007)(66556008)(6636002)(5660300002)(316002)(44832011)(8676002)(8936002)(6666004)(6486002)(6862004)(6512007)(9686003)(478600001)(38100700002)(82960400001)(33716001)(86362001)(67856001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?iyz9DeWBPdrbthT4BDHME7c4pfiB9b9OdkKQvjxo6FrenxM7XEyhFMF2XjO8?= =?us-ascii?Q?LTCUlR6jdc3IWPerqda0s/0qlp0+RHIwP+TVqvVxM/zU+wudLXgJm4T0FTQ6?= =?us-ascii?Q?LuoY43Aaapl4Bdp3WmT4K4MOsHhQe9vjmlgFpHqCzQjfsbnvQKwo9P+M7De9?= =?us-ascii?Q?/vXsA7xB3ESnav/pWgga5TYJQegu20bt06aa+7TMLOgQ+LwGv5j7dYS3TX0T?= =?us-ascii?Q?LHNk8A+AL39NwnqnG67H0H3NYMA8CIu3FW0kBdo71ti30JW0aammNVRpU1K1?= =?us-ascii?Q?gQFs0IebWr8dmyTbx+fSRNgc8P/m4mQDnUl8kA6H38BbpyjGsgURI4gDVqyn?= =?us-ascii?Q?Bs8siuLObxWLNeFmPZM701d48c8Vd8VOmaZYwKc2JmePuwSo8Ig+7iVkdF7E?= =?us-ascii?Q?Ep3PTWdU8FP43q7dKwW43Hna3a4eolq2B8GW0t5/wJ5NbgWzvBzEAMBP0493?= =?us-ascii?Q?BrqCIOo9nLXA+ka9i81YuIGH0J29ZKFbVe1GcQ40D0E2DkrUV0IC1yMDqFU+?= =?us-ascii?Q?YpWMjep9ABLEn4WwYrlAfto6qqiER/0hfKilJYNvkE48I4clIve7+wCXj6Ve?= =?us-ascii?Q?nRijMvg/OGQRJisN8/z8uWYecxnkWsLUC4SoUiKpn969cXVqYVmdt7dcwwIb?= =?us-ascii?Q?zWphwQG0Zm7BHa2jhKdpjJMYCjyTCrDKwBm4js7u9QJore99fevM1KgO+YaF?= =?us-ascii?Q?SPI7HL1SIHGreOlavgkm3cuaH3AF3NYtC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bd5c84-54a2-4224-9da3-08db94011082 X-MS-Exchange-CrossTenant-AuthSource: PH8PR11MB6780.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Aug 2023 09:07:29.7077 (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: D3N8aaYrW+3/ms0rh7/J4dlg6+yzy6lLawvmBqEbAJ0cyjemquQUW0CV5cXxJtLLJZYg1upwF7NlWgwF4k4O/A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR11MB7847 X-OriginatorOrg: intel.com X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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 nit: add a space betwen "KVM:" and "x86:" in the short changelog. On Thu, Aug 03, 2023 at 12:27:20AM -0400, Yang Weijiang wrote: >Check potential faults for CR4.CET setting per Intel SDM. >CET can be enabled if and only if CR0.WP==1, i.e. setting >CR4.CET=1 faults if CR0.WP==0 and setting CR0.WP=0 fails >if CR4.CET==1. > >Co-developed-by: Sean Christopherson >Signed-off-by: Sean Christopherson >Signed-off-by: Yang Weijiang Reviewed-by: Chao Gao