aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorTan, Li <li.tan@intel.com>2008-05-23 02:54:09 -0400
committerAvi Kivity <avi@qumranet.com>2008-07-20 05:42:32 -0400
commit9ef621d3be56e1188300476a8102ff54f7b6793f (patch)
treef5576d1365e726823c3eb4f772481cf5e4d1d0c7 /include/linux
parent25be46080f1a446cb2bda3daadbd22a5682b955e (diff)
KVM: Support mixed endian machines
Currently kvmtrace is not portable. This will prevent from copying a trace file from big-endian target to little-endian workstation for analysis. In the patch, kernel outputs metadata containing a magic number to trace log, and changes 64-bit words to be u64 instead of a pair of u32s. Signed-off-by: Tan Li <li.tan@intel.com> Acked-by: Jerone Young <jyoung5@us.ibm.com> Acked-by: Hollis Blanchard <hollisb@us.ibm.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/kvm.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/kvm.h b/include/linux/kvm.h
index 1c908ac29c6c..0ea064cbfbc8 100644
--- a/include/linux/kvm.h
+++ b/include/linux/kvm.h
@@ -318,14 +318,14 @@ struct kvm_trace_rec {
318 __u32 vcpu_id; 318 __u32 vcpu_id;
319 union { 319 union {
320 struct { 320 struct {
321 __u32 cycle_lo, cycle_hi; 321 __u64 cycle_u64;
322 __u32 extra_u32[KVM_TRC_EXTRA_MAX]; 322 __u32 extra_u32[KVM_TRC_EXTRA_MAX];
323 } cycle; 323 } cycle;
324 struct { 324 struct {
325 __u32 extra_u32[KVM_TRC_EXTRA_MAX]; 325 __u32 extra_u32[KVM_TRC_EXTRA_MAX];
326 } nocycle; 326 } nocycle;
327 } u; 327 } u;
328}; 328} __attribute__((packed));
329 329
330#define KVMIO 0xAE 330#define KVMIO 0xAE
331 331