|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v10 16/16] microcode/intel: writeback and invalidate cache conditionally
On 12.09.2019 09:22, Chao Gao wrote:
> --- a/xen/arch/x86/microcode_intel.c
> +++ b/xen/arch/x86/microcode_intel.c
> @@ -305,6 +305,31 @@ static bool is_blacklisted(void)
> return false;
> }
>
> +static void microcode_quirk(void)
> +{
> + struct cpuinfo_x86 *c;
const
> + uint64_t llc_size;
> +
> + /*
> + * Don't refer to current_cpu_data, which isn't fully initialized
> + * before this stage.
> + */
> + if ( system_state < SYS_STATE_smp_boot )
> + return;
If the workaround is needed, why would it not be needed for the BSP?
> + c = ¤t_cpu_data;
> + llc_size = c->x86_cache_size * 1024ULL;
> + do_div(llc_size, c->x86_max_cores);
Instead of the local variable, ...
> +
> + /*
> + * To mitigate some issues on this specific Broadwell CPU, writeback and
> + * invalidate cache regardless of ucode revision.
> + */
> + if ( c->x86 == 6 && c->x86_model == 0x4F && c->x86_mask == 0x1 &&
> + llc_size > 2621440 )
... why don't you compare c->x86_cache_size / c->x86_max_cores
against 2560 here? Is there any risk of truncating relevant low
bits?
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |