KVM: x86: move all vcpu->arch.pio* setup in emulator_pio_in_out()
[linux-2.6-microblaze.git] / arch / x86 / kvm / trace.h
index d07428e..2120d7c 100644 (file)
@@ -154,7 +154,7 @@ TRACE_EVENT(kvm_xen_hypercall,
 
 TRACE_EVENT(kvm_pio,
        TP_PROTO(unsigned int rw, unsigned int port, unsigned int size,
-                unsigned int count, void *data),
+                unsigned int count, const void *data),
        TP_ARGS(rw, port, size, count, data),
 
        TP_STRUCT__entry(
@@ -333,18 +333,24 @@ TRACE_EVENT_KVM_EXIT(kvm_exit);
  * Tracepoint for kvm interrupt injection:
  */
 TRACE_EVENT(kvm_inj_virq,
-       TP_PROTO(unsigned int irq),
-       TP_ARGS(irq),
+       TP_PROTO(unsigned int vector, bool soft, bool reinjected),
+       TP_ARGS(vector, soft, reinjected),
 
        TP_STRUCT__entry(
-               __field(        unsigned int,   irq             )
+               __field(        unsigned int,   vector          )
+               __field(        bool,           soft            )
+               __field(        bool,           reinjected      )
        ),
 
        TP_fast_assign(
-               __entry->irq            = irq;
+               __entry->vector         = vector;
+               __entry->soft           = soft;
+               __entry->reinjected     = reinjected;
        ),
 
-       TP_printk("irq %u", __entry->irq)
+       TP_printk("%s 0x%x%s",
+                 __entry->soft ? "Soft/INTn" : "IRQ", __entry->vector,
+                 __entry->reinjected ? " [reinjected]" : "")
 );
 
 #define EXS(x) { x##_VECTOR, "#" #x }
@@ -376,10 +382,11 @@ TRACE_EVENT(kvm_inj_exception,
                __entry->reinjected     = reinjected;
        ),
 
-       TP_printk("%s (0x%x)%s",
+       TP_printk("%s%s%s%s%s",
                  __print_symbolic(__entry->exception, kvm_trace_sym_exc),
-                 /* FIXME: don't print error_code if not present */
-                 __entry->has_error ? __entry->error_code : 0,
+                 !__entry->has_error ? "" : " (",
+                 !__entry->has_error ? "" : __print_symbolic(__entry->error_code, { }),
+                 !__entry->has_error ? "" : ")",
                  __entry->reinjected ? " [reinjected]" : "")
 );
 
@@ -1483,6 +1490,24 @@ TRACE_EVENT(kvm_avic_kick_vcpu_slowpath,
                  __entry->icrh, __entry->icrl, __entry->index)
 );
 
+TRACE_EVENT(kvm_avic_doorbell,
+           TP_PROTO(u32 vcpuid, u32 apicid),
+           TP_ARGS(vcpuid, apicid),
+
+       TP_STRUCT__entry(
+               __field(u32, vcpuid)
+               __field(u32, apicid)
+       ),
+
+       TP_fast_assign(
+               __entry->vcpuid = vcpuid;
+               __entry->apicid = apicid;
+       ),
+
+       TP_printk("vcpuid=%u, apicid=%u",
+                 __entry->vcpuid, __entry->apicid)
+);
+
 TRACE_EVENT(kvm_hv_timer_state,
                TP_PROTO(unsigned int vcpu_id, unsigned int hv_timer_in_use),
                TP_ARGS(vcpu_id, hv_timer_in_use),