lkml.org 
[lkml]   [2020]   [Mar]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 10/10] KVM: VMX: Convert vcpu_vmx.exit_reason to a union
From
Date
On 17/03/20 06:28, Sean Christopherson wrote:
>>>
>>> +union vmx_exit_reason {
>>> + struct {
>>> + u32 basic : 16;
>>> + u32 reserved16 : 1;
>>> + u32 reserved17 : 1;
>>> + u32 reserved18 : 1;
>>> + u32 reserved19 : 1;
>>> + u32 reserved20 : 1;
>>> + u32 reserved21 : 1;
>>> + u32 reserved22 : 1;
>>> + u32 reserved23 : 1;
>>> + u32 reserved24 : 1;
>>> + u32 reserved25 : 1;
>>> + u32 reserved26 : 1;
>>> + u32 enclave_mode : 1;
>>> + u32 smi_pending_mtf : 1;
>>> + u32 smi_from_vmx_root : 1;
>>> + u32 reserved30 : 1;
>>> + u32 failed_vmentry : 1;
>> Just wondering, is there any particular benefit in using 'u32' instead
>> of 'u16' here?
> Not that I know of. Paranoia that the compiler will do something weird?

Since we have an "u32 full" it makes sense to have u32 here too, it
documents that we're matching an u32 field in the other side of the union.

Paolo

\
 
 \ /
  Last update: 2020-03-17 18:51    [W:0.044 / U:1.276 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site