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.
> --- 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?
> --- 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;
?
Jan