Re: [PATCH v6] x86/mm: Don't disable INVLPG if "incomplete Global INVLPG flushes" is fixed by microcode or the kernel is running in a hypervisor
From: Dave Hansen
Date: Thu Apr 11 2024 - 13:16:55 EST
On 4/11/24 08:18, Dave Hansen wrote:
>
>> I'm not a native English speaker, so could you give some hint about how
>> to write this comment clearly?
> Something like this would be fine:
>
> /* Only bare-metal is affected. PCIDs in guests are OK. */
One more thing... Instead if cluttering up the main PCID setup path
that everybody has to read, you can put this in the macro:
#define INTEL_MATCH(_model) \
{ \
.vendor = X86_VENDOR_INTEL, \
.feature = X86_FEATURE_HYPERVISOR \
.family = 6, \
.model = _model, \
}
Then you can supplement the "INVLPG may not properly flush Global
entries..." comment.
/*
* INVLPG may not properly flush Global entries. But
* it only misbehaves when PCIDs are in use on bare
* metal on specific CPU models. It is completely
* fixed with updated microcode.
*/