Re: [PATCH 2/3] KVM: VMX: Treat partial support of an entry/exit pair as inconsistent
From: Chang S. Bae
Date: Wed Dec 02 2026 - 13:13:18 EST
On 11/25/2026 6:27 PM, Sohil Mehta wrote:
+/*...
+ * A pair may consist of one entry control and several exit controls. It
+ * is consistent only if all of its controls are supported, or none of them
+ * are.
+ */
#define vmx_check_entry_exit_pairs(pairs, entry_controls, exit_controls) \
({ \
- if (!(entry_controls & n_ctrl) == !(exit_controls & x_ctrl)) \
+ if ((exit_controls & x_ctrl) == \
+ ((entry_controls & n_ctrl) ? x_ctrl : 0)) \
continue; \
Nit: Since this condition is a little difficult to follow without explanation nearby, perhaps better to move the comment down right there.
Thanks,
Chang