/* This file is autogenerated by tracetool, do not edit. */

#ifndef TRACE_TARGET_I386_KVM_GENERATED_TRACERS_H
#define TRACE_TARGET_I386_KVM_GENERATED_TRACERS_H

#include "trace/control.h"

extern TraceEvent _TRACE_KVM_X86_FIXUP_MSI_ERROR_EVENT;
extern TraceEvent _TRACE_KVM_X86_ADD_MSI_ROUTE_EVENT;
extern TraceEvent _TRACE_KVM_X86_REMOVE_MSI_ROUTE_EVENT;
extern TraceEvent _TRACE_KVM_X86_UPDATE_MSI_ROUTES_EVENT;
extern TraceEvent _TRACE_KVM_XEN_HYPERCALL_EVENT;
extern TraceEvent _TRACE_KVM_XEN_SOFT_RESET_EVENT;
extern TraceEvent _TRACE_KVM_XEN_SET_SHARED_INFO_EVENT;
extern TraceEvent _TRACE_KVM_XEN_SET_VCPU_ATTR_EVENT;
extern TraceEvent _TRACE_KVM_XEN_SET_VCPU_CALLBACK_EVENT;
extern uint16_t _TRACE_KVM_X86_FIXUP_MSI_ERROR_DSTATE;
extern uint16_t _TRACE_KVM_X86_ADD_MSI_ROUTE_DSTATE;
extern uint16_t _TRACE_KVM_X86_REMOVE_MSI_ROUTE_DSTATE;
extern uint16_t _TRACE_KVM_X86_UPDATE_MSI_ROUTES_DSTATE;
extern uint16_t _TRACE_KVM_XEN_HYPERCALL_DSTATE;
extern uint16_t _TRACE_KVM_XEN_SOFT_RESET_DSTATE;
extern uint16_t _TRACE_KVM_XEN_SET_SHARED_INFO_DSTATE;
extern uint16_t _TRACE_KVM_XEN_SET_VCPU_ATTR_DSTATE;
extern uint16_t _TRACE_KVM_XEN_SET_VCPU_CALLBACK_DSTATE;
#define TRACE_KVM_X86_FIXUP_MSI_ERROR_ENABLED 1
#define TRACE_KVM_X86_ADD_MSI_ROUTE_ENABLED 1
#define TRACE_KVM_X86_REMOVE_MSI_ROUTE_ENABLED 1
#define TRACE_KVM_X86_UPDATE_MSI_ROUTES_ENABLED 1
#define TRACE_KVM_XEN_HYPERCALL_ENABLED 1
#define TRACE_KVM_XEN_SOFT_RESET_ENABLED 1
#define TRACE_KVM_XEN_SET_SHARED_INFO_ENABLED 1
#define TRACE_KVM_XEN_SET_VCPU_ATTR_ENABLED 1
#define TRACE_KVM_XEN_SET_VCPU_CALLBACK_ENABLED 1
#include "qemu/log-for-trace.h"
#include "qemu/error-report.h"


#define TRACE_KVM_X86_FIXUP_MSI_ERROR_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_KVM_X86_FIXUP_MSI_ERROR) || \
    false)

static inline void _nocheck__trace_kvm_x86_fixup_msi_error(uint32_t gsi)
{
    if (trace_event_get_state(TRACE_KVM_X86_FIXUP_MSI_ERROR) && qemu_loglevel_mask(LOG_TRACE)) {
        if (message_with_timestamp) {
            struct timeval _now;
            gettimeofday(&_now, NULL);
#line 4 "../git/target/i386/kvm/trace-events"
            qemu_log("%d@%zu.%06zu:kvm_x86_fixup_msi_error " "VT-d failed to remap interrupt for GSI %" PRIu32 "\n",
                     qemu_get_thread_id(),
                     (size_t)_now.tv_sec, (size_t)_now.tv_usec
                     , gsi);
#line 55 "trace/trace-target_i386_kvm.h"
        } else {
#line 4 "../git/target/i386/kvm/trace-events"
            qemu_log("kvm_x86_fixup_msi_error " "VT-d failed to remap interrupt for GSI %" PRIu32 "\n", gsi);
#line 59 "trace/trace-target_i386_kvm.h"
        }
    }
}

static inline void trace_kvm_x86_fixup_msi_error(uint32_t gsi)
{
    if (true) {
        _nocheck__trace_kvm_x86_fixup_msi_error(gsi);
    }
}

#define TRACE_KVM_X86_ADD_MSI_ROUTE_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_KVM_X86_ADD_MSI_ROUTE) || \
    false)

static inline void _nocheck__trace_kvm_x86_add_msi_route(int virq)
{
    if (trace_event_get_state(TRACE_KVM_X86_ADD_MSI_ROUTE) && qemu_loglevel_mask(LOG_TRACE)) {
        if (message_with_timestamp) {
            struct timeval _now;
            gettimeofday(&_now, NULL);
#line 5 "../git/target/i386/kvm/trace-events"
            qemu_log("%d@%zu.%06zu:kvm_x86_add_msi_route " "Adding route entry for virq %d" "\n",
                     qemu_get_thread_id(),
                     (size_t)_now.tv_sec, (size_t)_now.tv_usec
                     , virq);
#line 86 "trace/trace-target_i386_kvm.h"
        } else {
#line 5 "../git/target/i386/kvm/trace-events"
            qemu_log("kvm_x86_add_msi_route " "Adding route entry for virq %d" "\n", virq);
#line 90 "trace/trace-target_i386_kvm.h"
        }
    }
}

static inline void trace_kvm_x86_add_msi_route(int virq)
{
    if (true) {
        _nocheck__trace_kvm_x86_add_msi_route(virq);
    }
}

#define TRACE_KVM_X86_REMOVE_MSI_ROUTE_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_KVM_X86_REMOVE_MSI_ROUTE) || \
    false)

static inline void _nocheck__trace_kvm_x86_remove_msi_route(int virq)
{
    if (trace_event_get_state(TRACE_KVM_X86_REMOVE_MSI_ROUTE) && qemu_loglevel_mask(LOG_TRACE)) {
        if (message_with_timestamp) {
            struct timeval _now;
            gettimeofday(&_now, NULL);
#line 6 "../git/target/i386/kvm/trace-events"
            qemu_log("%d@%zu.%06zu:kvm_x86_remove_msi_route " "Removing route entry for virq %d" "\n",
                     qemu_get_thread_id(),
                     (size_t)_now.tv_sec, (size_t)_now.tv_usec
                     , virq);
#line 117 "trace/trace-target_i386_kvm.h"
        } else {
#line 6 "../git/target/i386/kvm/trace-events"
            qemu_log("kvm_x86_remove_msi_route " "Removing route entry for virq %d" "\n", virq);
#line 121 "trace/trace-target_i386_kvm.h"
        }
    }
}

static inline void trace_kvm_x86_remove_msi_route(int virq)
{
    if (true) {
        _nocheck__trace_kvm_x86_remove_msi_route(virq);
    }
}

#define TRACE_KVM_X86_UPDATE_MSI_ROUTES_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_KVM_X86_UPDATE_MSI_ROUTES) || \
    false)

static inline void _nocheck__trace_kvm_x86_update_msi_routes(int num)
{
    if (trace_event_get_state(TRACE_KVM_X86_UPDATE_MSI_ROUTES) && qemu_loglevel_mask(LOG_TRACE)) {
        if (message_with_timestamp) {
            struct timeval _now;
            gettimeofday(&_now, NULL);
#line 7 "../git/target/i386/kvm/trace-events"
            qemu_log("%d@%zu.%06zu:kvm_x86_update_msi_routes " "Updated %d MSI routes" "\n",
                     qemu_get_thread_id(),
                     (size_t)_now.tv_sec, (size_t)_now.tv_usec
                     , num);
#line 148 "trace/trace-target_i386_kvm.h"
        } else {
#line 7 "../git/target/i386/kvm/trace-events"
            qemu_log("kvm_x86_update_msi_routes " "Updated %d MSI routes" "\n", num);
#line 152 "trace/trace-target_i386_kvm.h"
        }
    }
}

static inline void trace_kvm_x86_update_msi_routes(int num)
{
    if (true) {
        _nocheck__trace_kvm_x86_update_msi_routes(num);
    }
}

#define TRACE_KVM_XEN_HYPERCALL_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_KVM_XEN_HYPERCALL) || \
    false)

static inline void _nocheck__trace_kvm_xen_hypercall(int cpu, uint8_t cpl, uint64_t input, uint64_t a0, uint64_t a1, uint64_t a2, uint64_t ret)
{
    if (trace_event_get_state(TRACE_KVM_XEN_HYPERCALL) && qemu_loglevel_mask(LOG_TRACE)) {
        if (message_with_timestamp) {
            struct timeval _now;
            gettimeofday(&_now, NULL);
#line 10 "../git/target/i386/kvm/trace-events"
            qemu_log("%d@%zu.%06zu:kvm_xen_hypercall " "xen_hypercall: cpu %d cpl %d input %" PRIu64 " a0 0x%" PRIx64 " a1 0x%" PRIx64 " a2 0x%" PRIx64" ret 0x%" PRIx64 "\n",
                     qemu_get_thread_id(),
                     (size_t)_now.tv_sec, (size_t)_now.tv_usec
                     , cpu, cpl, input, a0, a1, a2, ret);
#line 179 "trace/trace-target_i386_kvm.h"
        } else {
#line 10 "../git/target/i386/kvm/trace-events"
            qemu_log("kvm_xen_hypercall " "xen_hypercall: cpu %d cpl %d input %" PRIu64 " a0 0x%" PRIx64 " a1 0x%" PRIx64 " a2 0x%" PRIx64" ret 0x%" PRIx64 "\n", cpu, cpl, input, a0, a1, a2, ret);
#line 183 "trace/trace-target_i386_kvm.h"
        }
    }
}

static inline void trace_kvm_xen_hypercall(int cpu, uint8_t cpl, uint64_t input, uint64_t a0, uint64_t a1, uint64_t a2, uint64_t ret)
{
    if (true) {
        _nocheck__trace_kvm_xen_hypercall(cpu, cpl, input, a0, a1, a2, ret);
    }
}

#define TRACE_KVM_XEN_SOFT_RESET_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_KVM_XEN_SOFT_RESET) || \
    false)

static inline void _nocheck__trace_kvm_xen_soft_reset(void)
{
    if (trace_event_get_state(TRACE_KVM_XEN_SOFT_RESET) && qemu_loglevel_mask(LOG_TRACE)) {
        if (message_with_timestamp) {
            struct timeval _now;
            gettimeofday(&_now, NULL);
#line 11 "../git/target/i386/kvm/trace-events"
            qemu_log("%d@%zu.%06zu:kvm_xen_soft_reset " "" "\n",
                     qemu_get_thread_id(),
                     (size_t)_now.tv_sec, (size_t)_now.tv_usec
                     );
#line 210 "trace/trace-target_i386_kvm.h"
        } else {
#line 11 "../git/target/i386/kvm/trace-events"
            qemu_log("kvm_xen_soft_reset " "" "\n");
#line 214 "trace/trace-target_i386_kvm.h"
        }
    }
}

static inline void trace_kvm_xen_soft_reset(void)
{
    if (true) {
        _nocheck__trace_kvm_xen_soft_reset();
    }
}

#define TRACE_KVM_XEN_SET_SHARED_INFO_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_KVM_XEN_SET_SHARED_INFO) || \
    false)

static inline void _nocheck__trace_kvm_xen_set_shared_info(uint64_t gfn)
{
    if (trace_event_get_state(TRACE_KVM_XEN_SET_SHARED_INFO) && qemu_loglevel_mask(LOG_TRACE)) {
        if (message_with_timestamp) {
            struct timeval _now;
            gettimeofday(&_now, NULL);
#line 12 "../git/target/i386/kvm/trace-events"
            qemu_log("%d@%zu.%06zu:kvm_xen_set_shared_info " "shared info at gfn 0x%" PRIx64 "\n",
                     qemu_get_thread_id(),
                     (size_t)_now.tv_sec, (size_t)_now.tv_usec
                     , gfn);
#line 241 "trace/trace-target_i386_kvm.h"
        } else {
#line 12 "../git/target/i386/kvm/trace-events"
            qemu_log("kvm_xen_set_shared_info " "shared info at gfn 0x%" PRIx64 "\n", gfn);
#line 245 "trace/trace-target_i386_kvm.h"
        }
    }
}

static inline void trace_kvm_xen_set_shared_info(uint64_t gfn)
{
    if (true) {
        _nocheck__trace_kvm_xen_set_shared_info(gfn);
    }
}

#define TRACE_KVM_XEN_SET_VCPU_ATTR_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_KVM_XEN_SET_VCPU_ATTR) || \
    false)

static inline void _nocheck__trace_kvm_xen_set_vcpu_attr(int cpu, int type, uint64_t gpa)
{
    if (trace_event_get_state(TRACE_KVM_XEN_SET_VCPU_ATTR) && qemu_loglevel_mask(LOG_TRACE)) {
        if (message_with_timestamp) {
            struct timeval _now;
            gettimeofday(&_now, NULL);
#line 13 "../git/target/i386/kvm/trace-events"
            qemu_log("%d@%zu.%06zu:kvm_xen_set_vcpu_attr " "vcpu attr cpu %d type %d gpa 0x%" PRIx64 "\n",
                     qemu_get_thread_id(),
                     (size_t)_now.tv_sec, (size_t)_now.tv_usec
                     , cpu, type, gpa);
#line 272 "trace/trace-target_i386_kvm.h"
        } else {
#line 13 "../git/target/i386/kvm/trace-events"
            qemu_log("kvm_xen_set_vcpu_attr " "vcpu attr cpu %d type %d gpa 0x%" PRIx64 "\n", cpu, type, gpa);
#line 276 "trace/trace-target_i386_kvm.h"
        }
    }
}

static inline void trace_kvm_xen_set_vcpu_attr(int cpu, int type, uint64_t gpa)
{
    if (true) {
        _nocheck__trace_kvm_xen_set_vcpu_attr(cpu, type, gpa);
    }
}

#define TRACE_KVM_XEN_SET_VCPU_CALLBACK_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_KVM_XEN_SET_VCPU_CALLBACK) || \
    false)

static inline void _nocheck__trace_kvm_xen_set_vcpu_callback(int cpu, int vector)
{
    if (trace_event_get_state(TRACE_KVM_XEN_SET_VCPU_CALLBACK) && qemu_loglevel_mask(LOG_TRACE)) {
        if (message_with_timestamp) {
            struct timeval _now;
            gettimeofday(&_now, NULL);
#line 14 "../git/target/i386/kvm/trace-events"
            qemu_log("%d@%zu.%06zu:kvm_xen_set_vcpu_callback " "callback vcpu %d vector %d" "\n",
                     qemu_get_thread_id(),
                     (size_t)_now.tv_sec, (size_t)_now.tv_usec
                     , cpu, vector);
#line 303 "trace/trace-target_i386_kvm.h"
        } else {
#line 14 "../git/target/i386/kvm/trace-events"
            qemu_log("kvm_xen_set_vcpu_callback " "callback vcpu %d vector %d" "\n", cpu, vector);
#line 307 "trace/trace-target_i386_kvm.h"
        }
    }
}

static inline void trace_kvm_xen_set_vcpu_callback(int cpu, int vector)
{
    if (true) {
        _nocheck__trace_kvm_xen_set_vcpu_callback(cpu, vector);
    }
}
#endif /* TRACE_TARGET_I386_KVM_GENERATED_TRACERS_H */
