[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [XEN PATCH v4] x86/intel: optional build of PSR support
- To: Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
- From: Sergiy Kibrik <sergiy_kibrik@xxxxxxxx>
- Date: Thu, 12 Sep 2024 12:37:23 +0300
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=zLSJSBbk3LHc5LzO3HLIMGsfI5HpRnxDIDqvhIFRJ90=; b=R5mvYXmnII8kqKcKUwwg5L3neMYP87+3obSYe81Vo9zfFmsfLoSchm5GC6G8tE0J56zGoO4LtSZitS8NALfGxMOk3jBBIrj0FtGIX3qqivGUdW+0Fw8ZKm0CdiTreAPW1xx7IweexLWnLB4oS/EItJnemp4Jw6y65hwgAU3VN3hf/yHdnlenPEqTPTEV2pmaEPR0Mt4N0joA/XI98miaVktM/aPuxL6dKT94ozS6Z8oYpzmPqXPA9F/rEllzIs9Xkovl1SUDXDl3mdR+Ua0cnnwY2b6TcnP2m6Hyd6+2sHGH0TM52U0k3GiaH2Aa+dMm4AdPzLe7hKvHOirBBizheg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=e7ZliciYKv7Cae9WaqKMCPXboyCcAndHiEn3xnCL2AQ8uxfWDMW+ouqrFe0qL04n27TctjuNVMgsHyILZRhkHjSCaoHPjY5Wemka+59Iu7R+fsJ6b8bLmqVPfdNlANHVNl9Ogc5YEc2uV12BwRvMZgfNydp11mIR31sUV0lZ56S+tk+lEAvNTrHpJNuaSjSz0zB2pWEcT1/p73G6Zx+nLJZ8Z+uPzwtDA4Ioxxs1Eh76M272JK3x9W8SvJw/s0Mkj0KJnplWemHiAPXzHoPZumPLGaKjk25LxyEfpyUigacEFUxY1/xgm9EggRR2aZoRC9jc7ox1aNza8VCpR0FElA==
- Cc: Roger Pau Monné <roger.pau@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- Delivery-date: Thu, 12 Sep 2024 09:37:49 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
09.09.24 17:24, Jan Beulich:
On 03.09.2024 09:26, Sergiy Kibrik wrote:
--- a/xen/arch/x86/Kconfig
+++ b/xen/arch/x86/Kconfig
@@ -284,6 +284,9 @@ endchoice
config GUEST
bool
+config PSR
+ bool
+
config XEN_GUEST
bool "Xen Guest"
select GUEST
Inserting in the middle of guest related setting is a little odd.
you're right, I'll try to find a nicer place
--- a/xen/arch/x86/Kconfig.cpu
+++ b/xen/arch/x86/Kconfig.cpu
@@ -13,6 +13,7 @@ config AMD
config INTEL
bool "Support Intel CPUs"
default y
+ select PSR
I realize Andrew suggested it like this, so the question goes to him as
much as to you: If already we can isolate this code, is there a reason
not to make this a user visible option (with a "depends on" rather than a
"select") right away?
The reason is I didn't want to complicate configuration without a
usecase -- would someone want to disable PSR while keeping the rest of
Intel support enabled ?
--- a/xen/arch/x86/include/asm/psr.h
+++ b/xen/arch/x86/include/asm/psr.h
@@ -69,12 +69,11 @@ extern struct psr_cmt *psr_cmt;
static inline bool psr_cmt_enabled(void)
{
- return !!psr_cmt;
+ return IS_ENABLED(CONFIG_PSR) ? !!psr_cmt : false;
Perhaps just
return IS_ENABLED(CONFIG_PSR) && psr_cmt;
?
sure, why not
-Sergiy
|