Re: [PATCH v2 2/3] KVM: VMX: Treat partial support of an entry/exit pair as inconsistent

From: Binbin Wu

Date: Thu Dec 03 2026 - 09:23:29 EST


On 12/3/2026 2:51 PM, Sohil Mehta wrote:

Make the VM-entry/VM-exit pair check require all of a pair's controls to
be supported, or none of them. The existing pairs are unaffected.

Currently, the check only requires one of a pair's exit controls to be
supported along with the entry control. That is fine while every pair
has a single exit control.

However, a feature can have multiple exit controls paired with a single
entry control. For example, PAT and EFER each have two exit controls,
but KVM doesn't use their save controls. In future, FRED will use both:
its state is loaded on VM-entry, and both saved and restored on VM-exit.

Nit:

I feel this sentence is a bit loose.
If there is a new version,  how about:
In the future, FRED will use both exit controls: VM-entry loads the guest
FRED state, and VM-exit saves the guest state and loads the host state.



If hardware supports only one of those exit controls, the existing check
passes and the feature would be enabled with part of its state left
unswitched. Check the entry side the same way, which also covers a pair
with several entry controls, although no such pair exists today.

Signed-off-by: Sohil Mehta <sohil.mehta@xxxxxxxxx>

Reviewed-by: Binbin Wu <binbin.wu@xxxxxxxxxxxxxxx>