Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp6177036rdb; Mon, 18 Sep 2023 06:30:45 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHngl5M0jX8XJbrlr40K8Ezhm01vOaBT8qhg8xSbVI2njrOWH4aAix6JBHLPmubaZmhPNsY X-Received: by 2002:a05:6a00:3014:b0:68f:cdb8:ae33 with SMTP id ay20-20020a056a00301400b0068fcdb8ae33mr18177613pfb.10.1695043845392; Mon, 18 Sep 2023 06:30:45 -0700 (PDT) Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id u69-20020a638548000000b00569161a1884si7860890pgd.194.2023.09.18.06.30.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Sep 2023 06:30:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=SaQ2kkeu; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 0075880779B4; Mon, 18 Sep 2023 00:17:51 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238405AbjIRHRZ (ORCPT + 99 others); Mon, 18 Sep 2023 03:17:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39854 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236754AbjIRHRL (ORCPT ); Mon, 18 Sep 2023 03:17:11 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A1EA2A8; Mon, 18 Sep 2023 00:17:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1695021425; x=1726557425; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=WudwTdJWgMId2gb+WYdeD6IceQKY4AoHNVJkE2gntwQ=; b=SaQ2kkeu5+JN44X7hhb+JkSsfFAPPuPGchF7uWQP9GaBDDKz+5pvpu8h CvgBSSYc9lO7l/krtquthikXbi0GoEHeWamzG8MMGF+Xk/GvvNunmThWZ 5a7Ox54bFbkmr6v/a6KGnjW9vH7u8prKOP4pqGz6U4NMiLrdUfCeehz9b mFifPlV6RZoyvmZJ00m96CTCh0p0CMk8oyOEOBrpTDHRYafjb6TfP5Mlz ysKmjj2LXhTpJIGbSc19qZR9j0SUhl8L2b1bsXRp3V2xYLK7eHBsJpkcX azkWJX70ijdiB9AdZTFxEd/SMh9TEy4VKEUn9GqmVivByfrFbO7zoKq9e w==; X-IronPort-AV: E=McAfee;i="6600,9927,10836"; a="382328358" X-IronPort-AV: E=Sophos;i="6.02,156,1688454000"; d="scan'208";a="382328358" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Sep 2023 00:17:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10836"; a="888926722" X-IronPort-AV: E=Sophos;i="6.02,156,1688454000"; d="scan'208";a="888926722" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmsmga001.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 18 Sep 2023 00:16:21 -0700 Received: from orsmsx603.amr.corp.intel.com (10.22.229.16) 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.32; Mon, 18 Sep 2023 00:17:03 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) 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.32 via Frontend Transport; Mon, 18 Sep 2023 00:17:03 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.173) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.32; Mon, 18 Sep 2023 00:17:03 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DWiI2HS9lyjwQ8Df80Fhsg0/sLFcUckKVeK54LZyMX0UQ0uZ+fcyXFpoOsK60KDTwvQl4j+JtWiNu5a24DC3SBdFkqGhk6gGeidosOZDDcH7iRIm+HEbXsBNvTw8mnFSUijvWN04b2mn+nljjYG6/yzyHPki79pXtvIO/M87661dDH/haDluWGbk36xnqJBQTLPCvjHxOIR5h/FKR00ObpyieUN43i9ZzLaRBgUjCgvBuexWRuO9rMwfDH2G9GaJrTnlDsq2feFMkRlvT7v6aC+ehnQo6tiqCiNNjZXzaAKLroDOc49BxY3kykI95qhL4Yg9GijQHniYXf6CLRV5EQ== 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=WudwTdJWgMId2gb+WYdeD6IceQKY4AoHNVJkE2gntwQ=; b=TGmxbC+KvqZyftZ5Bpd5wG27HpSFDfvjsFqHjd0GSsYKSHK8l7gSV5kbFojH6cvFgrSdEEJ0G13NQUzoQugXczcEN3QmUyjPfwptn7t2fvjxphPPA0gnbDONofF6ufJQ/0MmvMm+hQWzmCypRO90X/amvBrZrfoEsKbknFgjNMGo5Ro6uqWycudY/ZCkf3YTM7T80wxDHMDFKZ4v/LwBlYKZCo2PSi10j4Gl71lzOCDttJdEocJC+7hRvpqkxhLNXzfLEYRRP9SJfWsaZFMRK6XiZ1uzK1bDkNkJpmWS9CBpm5D+D92KaUC19N8QXQ+LsYxGFhTE8xz2l7aS17RIwA== 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 LV3PR11MB8508.namprd11.prod.outlook.com (2603:10b6:408:1b4::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.24; Mon, 18 Sep 2023 07:17:00 +0000 Received: from PH0PR11MB4965.namprd11.prod.outlook.com ([fe80::a64d:9793:1235:dd90]) by PH0PR11MB4965.namprd11.prod.outlook.com ([fe80::a64d:9793:1235:dd90%7]) with mapi id 15.20.6792.024; Mon, 18 Sep 2023 07:17:00 +0000 Message-ID: <7d783993-1ef5-e1ed-591c-c87a9d879782@intel.com> Date: Mon, 18 Sep 2023 15:16:48 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [PATCH v6 01/25] x86/fpu/xstate: Manually check and add XFEATURE_CET_USER xstate bit To: "Edgecombe, Rick P" , "kvm@vger.kernel.org" , "pbonzini@redhat.com" , "Christopherson,, Sean" , "linux-kernel@vger.kernel.org" CC: "peterz@infradead.org" , "Hansen, Dave" , "Gao, Chao" , "john.allen@amd.com" References: <20230914063325.85503-1-weijiang.yang@intel.com> <20230914063325.85503-2-weijiang.yang@intel.com> <868ea527d82f8b9ab7360663db0ef42e6900dc87.camel@intel.com> <8307c089-cff5-db41-5248-7e0f2801143f@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: SGBP274CA0015.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b0::27) To PH0PR11MB4965.namprd11.prod.outlook.com (2603:10b6:510:34::7) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH0PR11MB4965:EE_|LV3PR11MB8508:EE_ X-MS-Office365-Filtering-Correlation-Id: f37c4eaf-a4bf-4545-95aa-08dbb8173ff7 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: atAVCWWRfRHhHohz3By+HXzhopMrNaZg0yn8fagsHLQ8rB8IP7G2YGZQT68Dgak4Uqfmjc+WuTWy9uq62LXv2z8dyIQehxuxphONiHHx3X4rCKeC8Qtnebj3J7xVZNWGNSMjAp7MM7FDD9ddla0RcJUl0aIlyh1bEhaohxChkEYMOuRaAVKDPpfl7RasE/fmPQHm5mrxOout/rdSLpXn35jS5/P0Sgh8cHRGPBPAKvfoj0gK0fdWC5kCFYfTG6R8YYu65UYVSiN9JFrvggXWyjFdgpZk+m7VyZA5f7qdgWYUkbpKAdy8rx+lxzhf8WD2yeKS5UEivsRBjl77mW4Zzq+FkaoFjfSz3tMoOf3Io2/LklLXxTZ9UQmIfIWoyJxZ0OyiUU37+y8J34UpQ1PochA07u+6YyYPoxflfK8n9KgJ7veXJ0yhpmIum6b4SuMtONWVHVUC0WoIO6CmYtuHDRQ2JR2ZmYoy/BrtrF+KJL9iy8iTTW4Z28JZCDDCSdmfIXEaL6THEQc9AiWoVTG8tCdQMH6jn1xhJZLebmu9fdD+vIeHj+5+BC4x1m7671qNLoU9yk2OC0024YxmGwY0tYfSJxeHpSlICUuOPMu3N1nDLq3ctiy3z1ocWEa0U92w5Xox6BDHs8VkjjXfK5R8gQ== 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)(136003)(39860400002)(396003)(366004)(376002)(346002)(186009)(451199024)(1800799009)(54906003)(66556008)(36756003)(31686004)(26005)(2616005)(2906002)(82960400001)(4744005)(38100700002)(5660300002)(31696002)(86362001)(8936002)(8676002)(4326008)(316002)(41300700001)(66946007)(66476007)(478600001)(110136005)(53546011)(6486002)(6666004)(6506007)(6512007)(43740500002)(45980500001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?SEVjWExTNzZqVFlrVnRwd2k3dW9CZVk4OTBWSy82bE9SVlhiQTFjYWEwREhn?= =?utf-8?B?VmpickhRTForSWVRa1NlelJqbVMvWlo2V0tyTHlKMENRNW02eG1sakwyaWti?= =?utf-8?B?M0hybWdLSjNRVFFwMVZlQmJMMndORG4wdEVpRVFmN2JNMlZPbXRxS0lZRG9H?= =?utf-8?B?blJxQVBSUGkrRkpqN3lxVDRjMDh3N0ljSFdqUXUraUs0N0twZURUMFJtcUp4?= =?utf-8?B?ZGh2VFgxc3lJcmlSRHB4eDNXUWVzMEgxemRlUTBlZDE4YkRhNmFrODZnVlpt?= =?utf-8?B?UVNXemxZTTdVNlVRakpIOGUrbkJhK0o2dmNyTkpYM0RXbU5kaGZpRGJDTlNT?= =?utf-8?B?ZkJMSU5wWEhtV3pheHpncStZVHQzMEJhZWlZeWprZ3EvcFpGQWdIbnZvK1pt?= =?utf-8?B?VHQxdGFp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b8173ff7 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB4965.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Sep 2023 07:17:00.2046 (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: VU6+ZevLyLJDToWuVzvUOLwN8AkTYAMYYqkDPDKDA43s/1WqnLFWhueEsjsk0qJlJPpLKWtJl1FM4j1oS/YaEw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV3PR11MB8508 X-OriginatorOrg: intel.com X-Spam-Status: No, score=-3.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_NONE 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 18 Sep 2023 00:17:52 -0700 (PDT) On 9/16/2023 12:35 AM, Edgecombe, Rick P wrote: > On Fri, 2023-09-15 at 10:32 +0800, Yang, Weijiang wrote: >>> Also, this doesn't discuss the real main reason for this patch, and >>> that is that KVM will soon use the xfeature for user ibt, and so >>> there >>> will now be a reason to have XFEATURE_CET_USER depend on IBT. >> This is one justification for Linux OS, another reason is there's >> non-Linux >> OS which is using the user IBT feature.  I should make the reasons >> clearer >> in changelog, thanks for pointing it out! > The point I was trying to make was today (before this series) nothing > on the system can use user IBT. Not the host, and not in any guest > because KVM doesn't support it. So the added xfeature dependency on IBT > was not previously needed. It is being added only for KVM CET support > (which, yes, may run on guests with non-standard CPUID). Agree, I'll highlight this in changelog, thanks!