RE: [PATCH v2 04/25] KVM: x86: Mark CR4.FRED as not reserved

From: Li, Xin3
Date: Wed Jun 12 2024 - 23:28:12 EST



> On Wed, Feb 07, 2024, Xin Li wrote:
> > The CR4.FRED bit, i.e., CR4[32], is no longer a reserved bit when a guest
> > enumerates FRED, otherwise it is still a reserved bit.
>
> This isn't quite correct, as __cr4_reserved_bits() is used with kvm_cpu_caps too,
> i.e. to compute CR4 bits that are reserved from the host's perspective. And that
> matters, because if this check was done _only_ on guest CPUID, then KVM would
> allow CR4.FRED=1 before all of KVM support is in place.

Ah, that means I didn't dig deep enough.

Thanks!
Xin