From: Adrian Bunk <[EMAIL PROTECTED]> The following part of commit 9ef621d3be56e1188300476a8102ff54f7b6793f (KVM: Support mixed endian machines) changed on the size of a struct that is exported to userspace:
include/linux/kvm.h: @@ -318,14 +318,14 @@ struct kvm_trace_rec { __u32 vcpu_id; union { struct { - __u32 cycle_lo, cycle_hi; + __u64 cycle_u64; __u32 extra_u32[KVM_TRC_EXTRA_MAX]; } cycle; struct { __u32 extra_u32[KVM_TRC_EXTRA_MAX]; } nocycle; } u; -}; +} __attribute__((packed)); Packing a struct was the correct idea, but it packed the wrong struct. Signed-off-by: Adrian Bunk <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> diff --git a/include/linux/kvm.h b/include/linux/kvm.h index d9ef7d3..ef4bc6f 100644 --- a/include/linux/kvm.h +++ b/include/linux/kvm.h @@ -324,12 +324,12 @@ struct kvm_trace_rec { struct { __u64 timestamp; __u32 extra_u32[KVM_TRC_EXTRA_MAX]; - } timestamp; + } __attribute__((packed)) timestamp; struct { __u32 extra_u32[KVM_TRC_EXTRA_MAX]; } notimestamp; } u; -} __attribute__((packed)); +}; #define TRACE_REC_EVENT_ID(val) \ (0x0fffffff & (val)) -- To unsubscribe from this list: send the line "unsubscribe kvm-commits" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html