Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp1064338rdb; Tue, 30 Jan 2024 07:02:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IGz/1UJXnTWKVUfxikO6cDXm+82yCPm3GQ9gnm1MxNBniFIpNma3DDc+dYuSZvNzmyZWcP8 X-Received: by 2002:a17:906:4a11:b0:a31:54f:4fa6 with SMTP id w17-20020a1709064a1100b00a31054f4fa6mr7601677eju.29.1706626957610; Tue, 30 Jan 2024 07:02:37 -0800 (PST) Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id d25-20020a170906175900b00a35a5da4ae4si2291151eje.173.2024.01.30.07.02.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 07:02:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-44790-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=AfD3zule; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-44790-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-44790-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 am.mirrors.kernel.org (Postfix) with ESMTPS id CD96A1F22FFE for ; Tue, 30 Jan 2024 15:01:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F0F2882D76; Tue, 30 Jan 2024 15:00:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="AfD3zule" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) (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 E67637CF1B; Tue, 30 Jan 2024 15:00:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=192.198.163.7 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706626850; cv=fail; b=XTWfrHnMgo1uCAVPLZuKSCc4tDZKqECFLor1H30GOkhcigYffMdZMkRDhUtvqUMDU/RukRlAfZUql+Ypq9pJSSzPJLTmOj4oP3ZcHHLSW2Za7cAAk+oxycThHVs6e3qM31lLDUradMG6Lxl0obaW8cPU67AaKrudXYpZ0ml5ATg= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706626850; c=relaxed/simple; bh=EGRWv9x0FpRqIKd9H46FZBkPHDQUBBBaKBApjMDPMHQ=; h=Message-ID:Date:Subject:To:CC:References:From:In-Reply-To: Content-Type:MIME-Version; b=RpmUC0rL0ozxnIOJc9cRLXqn+IuUfjKsdaycfBzkgLn2MUFyJtg848+6i21DsW1Mo8Otgzy4FKZ1ogbeFMQz5rAT/HvP/icV8shaSE57U82+TXazKB2BzhEIJ9G4yGshgw6kIFC3GhUXoIWUf0Ua7gwZzD+XfPdoOwWulgtkB2Y= 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=AfD3zule; arc=fail smtp.client-ip=192.198.163.7 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=1706626849; x=1738162849; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=EGRWv9x0FpRqIKd9H46FZBkPHDQUBBBaKBApjMDPMHQ=; b=AfD3zuleOApQP/T9RDiCR5AsIChO7m+yVwK3j2hYNiq+6en3qrcrLrLS rvGc22If//rubfU4hPHI5xtAaNDLaLIQEjFe7qKdGR3wOkEtJueidDipp xR7ZF7pE4MaFJNNumqtDAYewzvS/0reYFxqjPTZz3Dmnc4Ft+lBHRVZa7 Q6Wiy/CNLFGW1q+8RxNTRlQNuz54QIMhGs3GQ/xo6HMrfiLn/3wibRuhj sm/2Pp1YvyT2O4/tuwxFn+YiS7KHSVlK8ZFCqf/9IzdN46Zswjs8GVMxy s3iPtjnUWwDsKezOhERNLNVFMUfYnWrjxzyxfjZnvuctQI43XtD7SbHRK A==; X-IronPort-AV: E=McAfee;i="6600,9927,10968"; a="24773960" X-IronPort-AV: E=Sophos;i="6.05,707,1701158400"; d="scan'208";a="24773960" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jan 2024 07:00:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,707,1701158400"; d="scan'208";a="29933386" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by orviesa002.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 30 Jan 2024 07:00:47 -0800 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Tue, 30 Jan 2024 07:00:47 -0800 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Tue, 30 Jan 2024 07:00:47 -0800 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Tue, 30 Jan 2024 07:00:47 -0800 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.168) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Tue, 30 Jan 2024 07:00:46 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fw5ynTvGBmqf67Tn0FQbSRFshb1AO3LfIKbkQYsxPPKozF2slG/tTnES8RglcVvIBdwpUaBQe36dbS7xxTKoCb6AK7/ihNePGWGnXhCFMPJutE8l00xwG/NKuzhE+/KnI46Fph7tZ6onrqWt1/CgSPqjgdyAcwbhMRJgLHXzfUtAQBIbXR6KLomZVxlO910Bt2I6hmf84D4ZG7QlDJ5F7KDznO3a7fG8Vwvo+nytXz+BkWiQPSgQXBR4Rc4zxyXW5AcxcGxIuZdXQzz+GUWhrjp3PR3IRjE4hyFs7tyBid7j0oWr5dlkA8pUkLZAoDHkYx48rVgr2MEZIkuFOdIPPg== 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=EGRWv9x0FpRqIKd9H46FZBkPHDQUBBBaKBApjMDPMHQ=; b=EOdM+CdpmbUv8amAu9svdYvb136BG2sUybozSNowGRKKiB2w2+zkOQksC4T4p+iSTx1M3GoNIwc7OeJh+T6D2oHZNdR116bVFYPPOV6Daqc2Kv+lcz4K3YsUm2U9q8n7vXnhAoZcbsFbwFPtEn99wmwsh/PQlE3nVPkSqp3SwZvnmZvbJv9DXOMv9Ypw/YXecMJ+mkk9+k7T36fn8lu+d3N9OYH+iuP+gqQsH3JOW/fZ6sM86NwYSM540wjd1iD9DBByzu971gHL2dhtZojaKKMzzthvbXuysp0WcVU6G7g4IndcW2uei2zp1sNGcVpIo50EhnFd4ENTdxv6HWYjFg== 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 DM8PR11MB5623.namprd11.prod.outlook.com (2603:10b6:8:25::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7228.32; Tue, 30 Jan 2024 15:00:44 +0000 Received: from PH0PR11MB4965.namprd11.prod.outlook.com ([fe80::5d67:24d8:8c3d:acba]) by PH0PR11MB4965.namprd11.prod.outlook.com ([fe80::5d67:24d8:8c3d:acba%5]) with mapi id 15.20.7228.029; Tue, 30 Jan 2024 15:00:44 +0000 Message-ID: Date: Tue, 30 Jan 2024 23:00:31 +0800 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v9 05/27] x86/fpu/xstate: Introduce fpu_guest_cfg for guest FPU configuration Content-Language: en-US To: "Edgecombe, Rick P" CC: "Hansen, Dave" , "seanjc@google.com" , "x86@kernel.org" , "linux-kernel@vger.kernel.org" , "kvm@vger.kernel.org" , "pbonzini@redhat.com" , "yuan.yao@linux.intel.com" , "john.allen@amd.com" , "peterz@infradead.org" , "Gao, Chao" , "mlevitsk@redhat.com" References: <20240124024200.102792-1-weijiang.yang@intel.com> <20240124024200.102792-6-weijiang.yang@intel.com> <0221fdbd07cd35f954faa466a851cb063db57d03.camel@intel.com> From: "Yang, Weijiang" In-Reply-To: <0221fdbd07cd35f954faa466a851cb063db57d03.camel@intel.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: SI2P153CA0002.APCP153.PROD.OUTLOOK.COM (2603:1096:4:140::16) 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_|DM8PR11MB5623:EE_ X-MS-Office365-Filtering-Correlation-Id: b5c23a9d-cec9-4af4-3669-08dc21a43bd5 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: FmsmSMk2pYUVs2yde/V4sFQgX7S6Gnd7YRqKlUA3WOjYgDFHiN/TLB+k5KuM/+xUdZnKSDUQuN857z9KR6J7LEyzJeCJLXKiG0skeO3QnTI2+ng2lUInRVLbKPZhu4404Sew4VNjDWEHhsFqziVJ4/4qFwXMoLUdXWELqrABY97y2C05oE7155hacQG4NM5qNWon39J8CFq7f0p0aGXt3j2sFSH13SPDIlCSp9FOFIDdenOVK37dppQLYNShs4NtpGOzcvgWGiCPjihu400YEwj1pXBRDDXphN6fw7llS5A9MqqBbUGgOdhmUn6NE8AACNiacU/tdILomzYPnPd/j7F8bHrvNivaMx2BI/lLahXUfkZmTjrgqGOkbPIk8yWQ2V0rNN/S6nOfTZtSMzWkYWuL1fPpTCQhh57/hSdILhMujcSraIv2/QVMYbcupnVcspg2CxtEsC8zllWdYHuAVezZ+umdL6Hy6/c3kRtoT5FKfaMUmnc4g+w7g3FedgNj4haWSPNlK8j2Yp9BNxTr2607M4j1Z/Boqwz7Rev1DWTe49Emf7AR8UirECkVBwzUFn57RhFqPFGopp5JXAvMtR34I9BBzegrp880C8fTsZArKLvjPQgNcia7TEbAmoUCcBbEdXLZcaB+y8u4kHVWsQ== 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)(396003)(39860400002)(366004)(376002)(346002)(230922051799003)(64100799003)(186009)(451199024)(1800799012)(26005)(31686004)(6512007)(6506007)(6666004)(53546011)(2616005)(82960400001)(38100700002)(86362001)(36756003)(31696002)(4744005)(6486002)(4326008)(478600001)(2906002)(83380400001)(5660300002)(54906003)(6862004)(66476007)(66556008)(6636002)(316002)(41300700001)(8936002)(66946007)(8676002)(37006003)(43740500002)(45980500001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?YXNNWUZMSC9tRTJsZ2MyQzJkTUV0SG9HVmprWHFBK2E2VjZucm9lcmdITEIw?= =?utf-8?B?SDhmdkE2bUFHUDJDeGs1V3BmcjV6WFJtS001U2hOOE9aYmJnWGVyek1JTkxE?= =?utf-8?B?bmVzMUdaYmhhNE0rSDVtcWQraGZKb3pFMjV5c2lTT3YxbERwQ2hEdHRtbGhW?= =?utf-8?B?TUhOK0pZb2RRNStzdC9YK2ZWalRFOHQ4N1lyblQvQTFoVFVjTmN0c1Y3emw1?= =?utf-8?B?VGZ5THM1Q1RVbjNCK0xQamY1SGlxcmRZckdjODMzNXgzTkZEdjMrVWRuRXJq?= =?utf-8?B?SW05Uld5eER2Vk9ISEV6c2l1cWljamYzSEdxWjBCSnhBS1hXWll3VnJrR1d2?= =?utf-8?B?UU9HYVlyS1ozNkRVOXN4WmlVY1cwRXBRaGNqWTErY2k3ZmxRZ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23a9d-cec9-4af4-3669-08dc21a43bd5 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB4965.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jan 2024 15:00:44.4879 (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: 5jaj/WEAlGcofVjwq657KXp5Euu1cl2SQmz92wFkibBzmES1fjYxosv02O5beT8Wl1808xTAQ/bjdMqK9346aQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM8PR11MB5623 X-OriginatorOrg: intel.com On 1/30/2024 9:29 AM, Edgecombe, Rick P wrote: > On Tue, 2024-01-23 at 18:41 -0800, Yang Weijiang wrote: >> Define new fpu_guest_cfg to hold all guest FPU settings so that it >> can >> differ from generic kernel FPU settings, e.g., enabling CET >> supervisor >> xstate by default for guest fpstate while it's remained disabled in >> kernel FPU config. >> >> The kernel dynamic xfeatures are specifically used by guest fpstate >> now, >> add the mask for guest fpstate so that guest_perm.__state_permit == > I think you mean 'guest_perm.__state_perm'. Yes, will change it, thanks! > > Otherwise: > Reviewed-by: Rick Edgecombe > >