On 2/25/20 5:11 AM, Vitaly Kuznetsov wrote:
Krish Sadhukhan <krish.sadhukhan@xxxxxxxxxx> writes:
We have a macro for bit 31,
VMX_EXIT_REASONS_FAILED_VMENTRY 0x80000000
Does it make sense to define a macro like that instead ? Say,
VMX_BASIC_EXIT_REASON 0x0000ffff
0xffffU ?
and then we do,
u32 exit_reason = vmx->exit_reason;
u16 basic_exit_reason = exit_reason & VMX_BASIC_EXIT_REASON;
Just a naming suggestion: if we decide to go down this road, let's name
it e.g. VMX_BASIC_EXIT_REASON_MASK to make it clear this is *not* an
exit reason.
VMX_BASIC_EXIT_REASON_MASK works.