mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
25be46080f
commit
9ef621d3be
2 changed files with 14 additions and 8 deletions
|
@ -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));
|
||||
|
||||
#define KVMIO 0xAE
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue