|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v2 3/3] x86: Add support for CpuidUserDis
On 09.05.2023 18:43, Alejandro Vallejo wrote:
> Because CpuIdUserDis is reported in CPUID itself, the extended leaf
> containing that bit must be retrieved before calling c_early_init()
>
> Signed-off-by: Alejandro Vallejo <alejandro.vallejo@xxxxxxxxx>
Looks largely okay when taken together with patch 2, but ...
> --- a/xen/arch/x86/cpu/amd.c
> +++ b/xen/arch/x86/cpu/amd.c
> @@ -279,8 +279,12 @@ static void __init noinline amd_init_levelling(void)
> * that can only be present when Xen is itself virtualized (because
> * it can be emulated)
> */
> - if (cpu_has_hypervisor && probe_cpuid_faulting())
> + if ((cpu_has_hypervisor && probe_cpuid_faulting()) ||
> + boot_cpu_has(X86_FEATURE_CPUID_USER_DIS)) {
... imo the probe_cpuid_faulting() call would better be avoided when
the CPUID bit is set.
> + expected_levelling_cap |= LCAP_faulting;
> + levelling_caps |= LCAP_faulting;
Further the movement of these two lines from ...
> @@ -144,8 +145,6 @@ bool __init probe_cpuid_faulting(void)
> return false;
> }
>
> - expected_levelling_cap |= LCAP_faulting;
> - levelling_caps |= LCAP_faulting;
> setup_force_cpu_cap(X86_FEATURE_CPUID_FAULTING);
... here (and also to intel.c) should imo be part of patch 2. While
moving them, I think you also want to deal with the stray double
blank.
Jan
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |