Re: [PATCH v2 1/3] KVM: VMX: Support the secondary VM-exit controls

From: Sohil Mehta

Date: Thu Dec 03 2026 - 15:42:42 EST



>> Check the secondary controls through their own entry/exit pair table.
>> Avoid using a shared table because a failed check would clear the
>> activation bit and turn off every secondary control, not just the
>> inconsistent one. The new table stays empty until the first feature adds
>> a pair.
>
> This only matters with error_on_inconsistent_vmcs_config=0, because
> kvm_intel refuses to load on a failed check by default. Sean's reason
> in [1] is the stronger one:
>

Good point.


> "two tables provides better separation, which makes it easier
> to follow what's going on, and avoids "polluting" every entry
> with empty fields."
>

The "polluting" part is hard to decipher without going through the link.
I am thinking of rewording the above paragraph as:

Check the secondary controls through their own entry/exit pair table,
which stays empty until the first feature adds a pair. A shared table
would need both a primary and a secondary exit control in every row,
leaving most rows with an empty field. Two tables keep the rows simple
and easier to follow [1].

> I would use it here instead and add a link to that discussion.
>
> [1]: https://lore.kernel.org/all/Z739wdGmk4ZuWJ8v@xxxxxxxxxx/