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