On 2/25/2025 8:22 AM, Sean Christopherson wrote:
On Mon, Sep 30, 2024, Xin Li (Intel) wrote:
Add a prerequisite to existence of VMCS fields as some of them exist
only on processors that support certain CPU features.
This is required to fix KVM unit test VMX_VMCS_ENUM.MAX_INDEX.
If making the KVM-Unit-Test pass is the driving force for this code, then NAK.
We looked at this in detail a few years back, and came to the conclusion that
trying to precisely track which fields are/aren't supported would likely do more
harm than good.
I have to agree, it's no fun to track a VMCS field is added by which
feature(s), and worst part is that one VMCS field could depend on 2+
totally irrelevant features, e.g., the secondary VM exit controls field
exits on CPU that supports:
1) FRED
2) Prematurely busy shadow stack
Thanks for making the ground rule clear.
BTW, why don't we just remove this VMX_VMCS_ENUM.MAX_INDEX test?
Xin
https://lore.kernel.org/all/1629192673-9911-4-git-send-email-robert.hu@xxxxxxxxxxxxxxx