From: Sean Christopherson Date: Wed, 10 Feb 2021 18:26:09 +0000 (-0800) Subject: KVM: x86/xen: Explicitly pad struct compat_vcpu_info to 64 bytes X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=7137b7ae6f20076a1e05546db61f9fb3d3f9e97d;p=linux.git KVM: x86/xen: Explicitly pad struct compat_vcpu_info to 64 bytes Add a 2 byte pad to struct compat_vcpu_info so that the sum size of its fields is actually 64 bytes. The effective size without the padding is also 64 bytes due to the compiler aligning evtchn_pending_sel to a 4-byte boundary, but depending on compiler alignment is subtle and unnecessary. Opportunistically replace spaces with tables in the other fields. Cc: David Woodhouse Signed-off-by: Sean Christopherson Message-Id: <20210210182609.435200-6-seanjc@google.com> Reviewed-by: David Woodhouse Signed-off-by: Paolo Bonzini --- diff --git a/arch/x86/kvm/xen.h b/arch/x86/kvm/xen.h index 4b32489c0cecd..b66a921776f43 100644 --- a/arch/x86/kvm/xen.h +++ b/arch/x86/kvm/xen.h @@ -49,11 +49,12 @@ struct compat_arch_vcpu_info { }; struct compat_vcpu_info { - uint8_t evtchn_upcall_pending; - uint8_t evtchn_upcall_mask; - uint32_t evtchn_pending_sel; - struct compat_arch_vcpu_info arch; - struct pvclock_vcpu_time_info time; + uint8_t evtchn_upcall_pending; + uint8_t evtchn_upcall_mask; + uint16_t pad; + uint32_t evtchn_pending_sel; + struct compat_arch_vcpu_info arch; + struct pvclock_vcpu_time_info time; }; /* 64 bytes (x86) */ struct compat_arch_shared_info {