Re: [PATCH v3 10/21] KVM:x86: Add #CP support in guest exception classification

From: Yang, Weijiang
Date: Fri Jun 30 2023 - 21:59:14 EST



On 6/30/2023 11:15 PM, Sean Christopherson wrote:
On Fri, Jun 30, 2023, Gil Neiger wrote:
Intel will not produce any CPU with CET that does not enumerate IA32_VMX_BASIC[56] as 1.

One can check that bit before injecting a #CP with error code, but it should
not be necessary if CET is enumerated.

Of course, if the KVM may run as a guest of another VMM/hypervisor, it may be
that the virtual CPU in which KVM operates may enumerate CET but clear the
bit in IA32_VMX_BASIC.
Yeah, I think KVM should be paranoid and expose CET to the guest if and only if
IA32_VMX_BASIC[56] is 1. That'll also help validate nested support, e.g. will
make it more obvious if userspace+KVM provides a "bad" model to L1.

OK, will do it, thanks you two!