]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: fix userspace ABI breakage
authorAdrian Bunk <bunk@kernel.org>
Tue, 5 Aug 2008 22:36:09 +0000 (01:36 +0300)
committerAvi Kivity <avi@qumranet.com>
Mon, 25 Aug 2008 14:28:25 +0000 (17:28 +0300)
commita84349aea35fd7bfae35bd96f6ab2a91b3199230
tree64ed2619cae4f2768b43f541ca5b73999d241646
parent85677961768cd5a8c9936adb9384f0fe16cd2eab
KVM: fix userspace ABI breakage

The following part of commit c8ca6c7951d7d8c70b046876f54c1a48fa95ac97
(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 <bunk@kernel.org>
Signed-off-by: Avi Kivity <avi@qumranet.com>
include/linux/kvm.h