diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-21 00:13:26 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-21 00:13:26 -0400 |
commit | f076ab8d048f152b968bb1c6313fed88abb037fe (patch) | |
tree | fe9ff7bc40d04c5a12eb41a90cc0e1dbf8ae4e45 /virt/kvm/kvm_trace.c | |
parent | db6d8c7a4027b48d797b369a53f8470aaeed7063 (diff) | |
parent | 597a5f551ec4cd0aa0966e4fff4684ecc8c31c0d (diff) |
Merge branch 'kvm-updates-2.6.27' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm
* 'kvm-updates-2.6.27' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm: (70 commits)
KVM: Adjust smp_call_function_mask() callers to new requirements
KVM: MMU: Fix potential race setting upper shadow ptes on nonpae hosts
KVM: x86 emulator: emulate clflush
KVM: MMU: improve invalid shadow root page handling
KVM: MMU: nuke shadowed pgtable pages and ptes on memslot destruction
KVM: Prefix some x86 low level function with kvm_, to avoid namespace issues
KVM: check injected pic irq within valid pic irqs
KVM: x86 emulator: Fix HLT instruction
KVM: Apply the kernel sigmask to vcpus blocked due to being uninitialized
KVM: VMX: Add ept_sync_context in flush_tlb
KVM: mmu_shrink: kvm_mmu_zap_page requires slots_lock to be held
x86: KVM guest: make kvm_smp_prepare_boot_cpu() static
KVM: SVM: fix suspend/resume support
KVM: s390: rename private structures
KVM: s390: Set guest storage limit and offset to sane values
KVM: Fix memory leak on guest exit
KVM: s390: dont allocate dirty bitmap
KVM: move slots_lock acquision down to vapic_exit
KVM: VMX: Fake emulate Intel perfctr MSRs
KVM: VMX: Fix a wrong usage of vmcs_config
...
Diffstat (limited to 'virt/kvm/kvm_trace.c')
-rw-r--r-- | virt/kvm/kvm_trace.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/virt/kvm/kvm_trace.c b/virt/kvm/kvm_trace.c index 0e495470788d..58141f31ea8f 100644 --- a/virt/kvm/kvm_trace.c +++ b/virt/kvm/kvm_trace.c | |||
@@ -72,11 +72,7 @@ static void kvm_add_trace(void *probe_private, void *call_data, | |||
72 | rec.cycle_in = p->cycle_in; | 72 | rec.cycle_in = p->cycle_in; |
73 | 73 | ||
74 | if (rec.cycle_in) { | 74 | if (rec.cycle_in) { |
75 | u64 cycle = 0; | 75 | rec.u.cycle.cycle_u64 = get_cycles(); |
76 | |||
77 | cycle = get_cycles(); | ||
78 | rec.u.cycle.cycle_lo = (u32)cycle; | ||
79 | rec.u.cycle.cycle_hi = (u32)(cycle >> 32); | ||
80 | 76 | ||
81 | for (i = 0; i < rec.extra_u32; i++) | 77 | for (i = 0; i < rec.extra_u32; i++) |
82 | rec.u.cycle.extra_u32[i] = va_arg(*args, u32); | 78 | rec.u.cycle.extra_u32[i] = va_arg(*args, u32); |
@@ -114,8 +110,18 @@ static int kvm_subbuf_start_callback(struct rchan_buf *buf, void *subbuf, | |||
114 | { | 110 | { |
115 | struct kvm_trace *kt; | 111 | struct kvm_trace *kt; |
116 | 112 | ||
117 | if (!relay_buf_full(buf)) | 113 | if (!relay_buf_full(buf)) { |
114 | if (!prev_subbuf) { | ||
115 | /* | ||
116 | * executed only once when the channel is opened | ||
117 | * save metadata as first record | ||
118 | */ | ||
119 | subbuf_start_reserve(buf, sizeof(u32)); | ||
120 | *(u32 *)subbuf = 0x12345678; | ||
121 | } | ||
122 | |||
118 | return 1; | 123 | return 1; |
124 | } | ||
119 | 125 | ||
120 | kt = buf->chan->private_data; | 126 | kt = buf->chan->private_data; |
121 | atomic_inc(&kt->lost_records); | 127 | atomic_inc(&kt->lost_records); |