On 10/04/18 11:29, Jan Beulich wrote:
On 10.04.18 at 09:58, wrote:
>> @@ -102,14 +104,34 @@ void switch_cr3_cr4(unsigned long cr3, unsigned long
>> cr4)
>> old_cr4 = read_cr4();
>> if ( old_cr4 & X86_CR4_PGE )
>> {
>> +/*
>> + * X86_CR4_PGE set means PCID is in
>>> On 10.04.18 at 09:58, wrote:
> @@ -102,14 +104,34 @@ void switch_cr3_cr4(unsigned long cr3, unsigned long
> cr4)
> old_cr4 = read_cr4();
> if ( old_cr4 & X86_CR4_PGE )
> {
> +/*
> + * X86_CR4_PGE set means PCID is inactive.
> + * We have to purge the TLB
Avoid flushing the complete TLB when switching %cr3 for mitigation of
Meltdown by using the PCID feature if available.
We are using 4 PCID values for a 64 bit pv domain subject to XPTI and
2 values for the non-XPTI case:
- guest active and in kernel mode
- guest active and in user mode
- hypervis