Re: [PATCH] KVM: nVMX: Store vmcs.EXIT_QUALIFICATION as an unsigned long, not u32

From: Sean Christopherson
Date: Fri Apr 24 2020 - 10:16:51 EST


On Fri, Apr 24, 2020 at 01:44:00PM +0200, Vitaly Kuznetsov wrote:
> I also did 'git grep -W 'u32.*exit_qual' kvm/queue' and I can see a few
> more places where 'exit_qual' is u32:
> nested_vmx_check_guest_state()
> nested_vmx_enter_non_root_mode()
> vmx_set_nested_state()
>
> Being too lazy to check an even if there are no immediate issues with
> that, should we just use 'unsigned long' everywhere?

Yes, absolutely, I'll send a patch.

The existing cases are benign, they're all related to setting the exit_qual
for a nested VM-Enter failure, which could fit in a u8. But still worth
fixing.