Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 186035
b: refs/heads/master
c: 0c04851
h: refs/heads/master
i:
  186033: 3657729
  186031: 5e47cec
v: v3
  • Loading branch information
Avi Kivity authored and Marcelo Tosatti committed Mar 1, 2010
1 parent 1df21ed commit 8ceff74
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8ae099127668de80e4babba73bb492740ce3a1be
refs/heads/master: 0c04851c0c093ce98ab4ca69556480d779292418
2 changes: 2 additions & 0 deletions trunk/arch/x86/kvm/x86.c
Original file line number Diff line number Diff line change
Expand Up @@ -5292,6 +5292,7 @@ void kvm_load_guest_fpu(struct kvm_vcpu *vcpu)
vcpu->guest_fpu_loaded = 1;
kvm_fx_save(&vcpu->arch.host_fx_image);
kvm_fx_restore(&vcpu->arch.guest_fx_image);
trace_kvm_fpu(1);
}

void kvm_put_guest_fpu(struct kvm_vcpu *vcpu)
Expand All @@ -5304,6 +5305,7 @@ void kvm_put_guest_fpu(struct kvm_vcpu *vcpu)
kvm_fx_restore(&vcpu->arch.host_fx_image);
++vcpu->stat.fpu_reload;
set_bit(KVM_REQ_DEACTIVATE_FPU, &vcpu->requests);
trace_kvm_fpu(0);
}

void kvm_arch_vcpu_free(struct kvm_vcpu *vcpu)
Expand Down
19 changes: 19 additions & 0 deletions trunk/include/trace/events/kvm.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,25 @@ TRACE_EVENT(kvm_mmio,
__entry->len, __entry->gpa, __entry->val)
);

#define kvm_fpu_load_symbol \
{0, "unload"}, \
{1, "load"}

TRACE_EVENT(kvm_fpu,
TP_PROTO(int load),
TP_ARGS(load),

TP_STRUCT__entry(
__field( u32, load )
),

TP_fast_assign(
__entry->load = load;
),

TP_printk("%s", __print_symbolic(__entry->load, kvm_fpu_load_symbol))
);

#endif /* _TRACE_KVM_MAIN_H */

/* This part must be outside protection */
Expand Down

0 comments on commit 8ceff74

Please sign in to comment.