On 26.01.2026 18:53, Andrew Cooper wrote:
> This hypercall is an addition of mine from commit 67528a3f0649 ("x86/cpu:
> Sysctl and common infrastructure for levelling context switching", 2016), but
> it never got wired into any toolstacks. In the meantime, how we handle CPUID
> for guests has evolved substantially.
>
> In order to reuse the AMD levelling infrasturcture for boot time quirks,
> levelling_caps is going to have to change. While it's probably safe to expose
> this difference, it's safer still to make it an internal detail.
>
> When re-plummbing the LCAP_* constants, turn them all into single bits.
>
> Signed-off-by: Andrew Cooper <[email protected]>
Reviewed-by: Jan Beulich <[email protected]> # hypervisor & ~xsm
> --- a/xen/arch/x86/include/asm/cpuid.h
> +++ b/xen/arch/x86/include/asm/cpuid.h
>[...]
> extern unsigned int expected_levelling_cap, levelling_caps;
Observation while doing the review: Why are both _probe_mask_msr()'s
2nd parameters uint64_t, when the variables here are unsigned int?
> @@ -1270,7 +1251,7 @@ struct xen_sysctl {
> #define XEN_SYSCTL_pcitopoinfo 22
> #define XEN_SYSCTL_psr_alloc 23
> /* #define XEN_SYSCTL_tmem_op 24 */
> -#define XEN_SYSCTL_get_cpu_levelling_caps 25
> +/* #define XEN_SYSCTL_get_cpu_levelling_caps 25 */
I realize this it to match the earlier line, yet would you mind rather ...
> #define XEN_SYSCTL_get_cpu_featureset 26
> #define XEN_SYSCTL_livepatch_op 27
> /* #define XEN_SYSCTL_set_parameter 28 */
... following this style? (I wouldn't mind if you also touched the malformed
tmem line at the same time.)
Jan