Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4610963rdh; Wed, 29 Nov 2023 06:19:21 -0800 (PST) X-Google-Smtp-Source: AGHT+IGc2JWluF/aQRWHTIzPegmaDenv0TtyS/R7CDqOLAVsRwa0I+B8AkV+5lxK/xaBcig/oNzY X-Received: by 2002:a05:6a00:8ca:b0:6c4:d12c:adf0 with SMTP id s10-20020a056a0008ca00b006c4d12cadf0mr18615416pfu.33.1701267561108; Wed, 29 Nov 2023 06:19:21 -0800 (PST) Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id k17-20020a056a00135100b006cdd47d2ac8si1144968pfu.79.2023.11.29.06.19.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 06:19:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Gf465kev; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (Postfix) with ESMTP id BEE108043C3A; Wed, 29 Nov 2023 06:19:17 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234170AbjK2OTD (ORCPT + 99 others); Wed, 29 Nov 2023 09:19:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52978 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233659AbjK2OTC (ORCPT ); Wed, 29 Nov 2023 09:19:02 -0500 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 30C39D1; Wed, 29 Nov 2023 06:19:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1701267548; x=1732803548; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=MWjGys52u4MoGvdW4gb+qAj1USHN8dazCJ1YQIsgtdk=; b=Gf465kevZ25zaODXr9SMEG1yPwLqMZn+LafMvEaHmJcqoZnmwxQV42Dx lppKmKgIRUiUvNaS/rKWUA7YzJ93Bkimeo0w4H7ujxXYmQig5rgnpFew3 LLeVSE8enjt2n4FWzPbZC6RQfKavl9qWyPqjGxYAZs4OOUqzu+EMn6ZIZ uXpNmfLE2u+2oeuDyhOFiHt7ZWWmj6dKuBWPv+vkRolA+Dwht3zL9V1qh 7C+EYS0e17oh3MZv65uAjwnfFx5da+UKpFThcooCCxnGzwwTFaBPjLrMQ /9iw+7aH6c7dYfGlGoXUmkaxPCKTxzTCfLnXlQ6Qr4D62aw2LJ+JvsS7a A==; X-IronPort-AV: E=McAfee;i="6600,9927,10909"; a="68114" X-IronPort-AV: E=Sophos;i="6.04,235,1695711600"; d="scan'208";a="68114" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmvoesa103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Nov 2023 06:19:08 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10909"; a="768930722" X-IronPort-AV: E=Sophos;i="6.04,235,1695711600"; d="scan'208";a="768930722" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orsmga002.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 29 Nov 2023 06:19:07 -0800 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Wed, 29 Nov 2023 06:19:06 -0800 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Wed, 29 Nov 2023 06:19:06 -0800 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) 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.34 via Frontend Transport; Wed, 29 Nov 2023 06:19:06 -0800 Received: from NAM02-DM3-obe.outbound.protection.outlook.com (104.47.56.40) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.34; Wed, 29 Nov 2023 06:19:05 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gWDgChhJ5SDb9/t/S1cbw8XWYfLjPJRvKiyr1rdemsz4o8VYa/t/LvHoyu7lMHj54hzlqwBxq0rSPC+CXFfQmjoTD7Wzck5TXDTvOPU3edi6XlY1lfijPGghGqDwPBl7OTpZZl4zN8BoEGZXnfNDeHml2gxusl0ngGhEV1Fi3OqXZCfsFNyloNwPnBrvmT4DJaauzo6Kmvd5BoV7in/BJW4H7400ty12J329X//X/8mobTsWU+yHI6dLmQ9iZdOzmn4OJTSHzNff56woSY+XfeZRfYE5vz0pPUZ7PwEXtfd45MJ8gEHtZMlF1Z3+P+qavjGpaYxLofJJgE+XyBKuLA== 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=niulWFI4oRY1JBwO4F2cDpitEIkHfYrnFeJ4pqg1frM=; b=C1NbrjmqP7pyY2NVFxGWmkMtpUalstrNOXQhKPuTVdIaYt+JKTiC0yDUswGztl5mSEqUNaN8tVe65QchyPF+u0zLhL1Upu1pmFIpbKn14GyO3z13MraBO0fSH3Wi3aDbIcRjwSFJ+EYwjepqRsULIXkEWVObSJrRL0PUze03pa/3Sc73gQ0NKc8JhQLVP18j3m60acBxHO4n3BAixze7xWEO1VjtoxnXJMq/fEgHRGQCkcJWVtVt7mjagV25ih60nyh1NI10MsVY3TPJiGJrq1F05iu9frhWMneH1xY6NT1N3pCDhpyG6GulX1Ob16md2E1Xe4oFyXAO8FIWjIv9Mg== 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 MW3PR11MB4618.namprd11.prod.outlook.com (2603:10b6:303:5f::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7025.29; Wed, 29 Nov 2023 14:19:04 +0000 Received: from PH0PR11MB4965.namprd11.prod.outlook.com ([fe80::ea04:122f:f20c:94e8]) by PH0PR11MB4965.namprd11.prod.outlook.com ([fe80::ea04:122f:f20c:94e8%2]) with mapi id 15.20.7046.015; Wed, 29 Nov 2023 14:19:03 +0000 Message-ID: Date: Wed, 29 Nov 2023 22:18:53 +0800 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v7 07/26] x86/fpu/xstate: Warn if kernel dynamic xfeatures detected in normal fpstate Content-Language: en-US To: "Edgecombe, Rick P" CC: "Hansen, Dave" , "kvm@vger.kernel.org" , "seanjc@google.com" , "pbonzini@redhat.com" , "linux-kernel@vger.kernel.org" , "john.allen@amd.com" , "peterz@infradead.org" , "Gao, Chao" , "mlevitsk@redhat.com" References: <20231124055330.138870-1-weijiang.yang@intel.com> <20231124055330.138870-8-weijiang.yang@intel.com> <8dafb9cb4cb7054ae2a0c1bd19062937148d668b.camel@intel.com> From: "Yang, Weijiang" In-Reply-To: <8dafb9cb4cb7054ae2a0c1bd19062937148d668b.camel@intel.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: SGAP274CA0011.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b6::23) To PH0PR11MB4965.namprd11.prod.outlook.com (2603:10b6:510:34::7) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH0PR11MB4965:EE_|MW3PR11MB4618:EE_ X-MS-Office365-Filtering-Correlation-Id: 8e2c0b1a-089e-4cd6-3651-08dbf0e622b1 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: UBrcvyUxt+3Vn1rpwrtw0O1UZ8b3dlqqM4UzlWPl1dF4/Slr999Zs+cI+0Du97ZL/y3USFQCsKbp7LhD/ECMV98i5sMAWSA2f8tbIDnCBlw2s+DAcJ0R2m17YGyd5OPqE7ggOLh2jmEMJD3yIsCKVE+DZutzIllZVa+qofwbOBAf5BoM8NUeehO/jNaYQ/9+z4gvPmjOHDtC+hY3K2pDKfnMS4pyd9KN1NQw4AMQM8sLJLQuU82wQEdVz2LZ7zJ9HrJTe+Ni8uFXGCqz7gNwIok3bRLoWdKS60TdgdcbO3iWw2b8v4i4ya1OIIyh6QZQQ8AqCXr4ID7HURT5Anz7braPaBwNjXHggF1WiM7d12FghSzMwjCgu/KMM/xQ5vvrzKlkLvLpNc4SDp3ghvE4B7WSrDbT4Svdj6Yw923Rr7EtRlmAQlI/No6stqOMp2Qg4/i3FlF5F3Rz03KdpuQCv96T5PIViyp1YGT86eAhLHI7yq5CgXa2lJIs/+EEA5SxQYyVlS/HqNuL+52/HHJlzzQyvLZQwcxXZcL07HaZJYnA0POjijDAUoxV3pun+qLvsp5NbSBsEoI1jzHpVX9fcL+mrgGaKoUQaoNhfFR/YGVkrqrrM+XHuCKYlBAQ0u4o+zhbzSVXWk8PWr4OvKg3Lg== 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)(366004)(396003)(136003)(39860400002)(376002)(346002)(230922051799003)(1800799012)(451199024)(64100799003)(186009)(83380400001)(38100700002)(31686004)(53546011)(82960400001)(6862004)(8936002)(5660300002)(31696002)(37006003)(6506007)(6512007)(8676002)(478600001)(316002)(66476007)(4744005)(54906003)(6636002)(66946007)(86362001)(4326008)(66556008)(6486002)(2906002)(36756003)(41300700001)(4001150100001)(6666004)(2616005)(26005)(43740500002)(45980500001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?RlE2d1JuZFZ5UXVyWU8rN085N0Q4Wis0b2pWdWVzamtySG1xclI5RDdpT1BL?= =?utf-8?B?U1FXWlc2ZU5Hc0Zydyt2ZmQ2bFRjLzVUK1N5ZExGNzhidVhBdlVtRmgzMU9G?= =?utf-8?B?YW5aQldkUTJnYk9OeFdTaG1XdDFuNjhUNldHRHRkdUk0Mm8rSUoxQ0lmT1d6?= =?utf-8?B?UlZzZHNKZEZSZStPN3IvbjBQZzhKeDY3OXhZYmQ5MWNYc09GQkdodmlYRTNn?= =?utf-8?B?WXNNL1NpNld2M1Jxd01NbjVZWENEMDJFZUJpZE56NENjMjNRMG84UXFPcVRU?= =?utf-8?B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jFkUGowSUNJeTdm?= =?utf-8?B?ZDZZTU13SWwvNVpNbGhPeEpOSmRKc25QeC9MeGtvN3RGTllUYmlFSnVPN0Ns?= =?utf-8?B?cXc9PQ==?= X-MS-Exchange-CrossTenant-Network-Message-Id: 8e2c0b1a-089e-4cd6-3651-08dbf0e622b1 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB4965.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Nov 2023 14:19:02.6801 (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: 4d+edmFvX0OrVtqoSohrWXnfoAda83gh+wrzK3z5mjaxKZA36zo5TjbeYMGz2t35DVzrV/8w0DUpXFvYIIZhQw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW3PR11MB4618 X-OriginatorOrg: intel.com X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email 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 (groat.vger.email [0.0.0.0]); Wed, 29 Nov 2023 06:19:17 -0800 (PST) On 11/28/2023 11:25 PM, Edgecombe, Rick P wrote: > On Fri, 2023-11-24 at 00:53 -0500, Yang Weijiang wrote: >> Kernel dynamic xfeatures now are __ONLY__ enabled for guest fpstate, >> i.e., >> none for normal kernel fpstate. The bits are added when guest FPU > ^never? Sure, will change it, thank you! >> config >> is initialized. Guest fpstate is allocated with fpstate->is_guest set >> to >> %true. >> >> For normal fpstate, the bits should have been removed when >> initializes >> kernel FPU config settings, WARN_ONCE() if kernel detects normal >> fpstate >> xfeatures contains kernel dynamic xfeatures before executes xsaves. >> >> Signed-off-by: Yang Weijiang > Otherwise... > > Reviewed-by: Rick Edgecombe