/* This file is autogenerated by tracetool, do not edit. */
/* SPDX-License-Identifier: GPL-2.0-or-later */

#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_HC_MAP_GPA_RANGE_EVENT;
extern TraceEvent _TRACE_KVM_ARCH_ON_VMFD_CHANGE_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 TraceEvent _TRACE_TDX_HANDLE_RESET_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_HC_MAP_GPA_RANGE_DSTATE;
extern uint16_t _TRACE_KVM_ARCH_ON_VMFD_CHANGE_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;
extern uint16_t _TRACE_TDX_HANDLE_RESET_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_HC_MAP_GPA_RANGE_ENABLED 1
#define TRACE_KVM_ARCH_ON_VMFD_CHANGE_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
#define TRACE_TDX_HANDLE_RESET_ENABLED 1
#include "qemu/log-for-trace.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 trace_kvm_x86_fixup_msi_error(uint32_t gsi)
{
    if (trace_event_get_state(TRACE_KVM_X86_FIXUP_MSI_ERROR)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 4 "../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"
        }
    }
}

#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 trace_kvm_x86_add_msi_route(int virq)
{
    if (trace_event_get_state(TRACE_KVM_X86_ADD_MSI_ROUTE)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 5 "../target/i386/kvm/trace-events"
            qemu_log("kvm_x86_add_msi_route " "Adding route entry for virq %d" "\n", virq);
#line 74 "trace/trace-target_i386_kvm.h"
        }
    }
}

#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 trace_kvm_x86_remove_msi_route(int virq)
{
    if (trace_event_get_state(TRACE_KVM_X86_REMOVE_MSI_ROUTE)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 6 "../target/i386/kvm/trace-events"
            qemu_log("kvm_x86_remove_msi_route " "Removing route entry for virq %d" "\n", virq);
#line 89 "trace/trace-target_i386_kvm.h"
        }
    }
}

#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 trace_kvm_x86_update_msi_routes(int num)
{
    if (trace_event_get_state(TRACE_KVM_X86_UPDATE_MSI_ROUTES)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 7 "../target/i386/kvm/trace-events"
            qemu_log("kvm_x86_update_msi_routes " "Updated %d MSI routes" "\n", num);
#line 104 "trace/trace-target_i386_kvm.h"
        }
    }
}

#define TRACE_KVM_HC_MAP_GPA_RANGE_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_KVM_HC_MAP_GPA_RANGE) || \
    false)

static inline void trace_kvm_hc_map_gpa_range(uint64_t gpa, uint64_t size, uint64_t attributes, uint64_t flags)
{
    if (trace_event_get_state(TRACE_KVM_HC_MAP_GPA_RANGE)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 8 "../target/i386/kvm/trace-events"
            qemu_log("kvm_hc_map_gpa_range " "gpa 0x%" PRIx64 " size 0x%" PRIx64 " attributes 0x%" PRIx64 " flags 0x%" PRIx64 "\n", gpa, size, attributes, flags);
#line 119 "trace/trace-target_i386_kvm.h"
        }
    }
}

#define TRACE_KVM_ARCH_ON_VMFD_CHANGE_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_KVM_ARCH_ON_VMFD_CHANGE) || \
    false)

static inline void trace_kvm_arch_on_vmfd_change(void)
{
    if (trace_event_get_state(TRACE_KVM_ARCH_ON_VMFD_CHANGE)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 9 "../target/i386/kvm/trace-events"
            qemu_log("kvm_arch_on_vmfd_change " "" "\n");
#line 134 "trace/trace-target_i386_kvm.h"
        }
    }
}

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

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 (trace_event_get_state(TRACE_KVM_XEN_HYPERCALL)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 12 "../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 149 "trace/trace-target_i386_kvm.h"
        }
    }
}

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

static inline void trace_kvm_xen_soft_reset(void)
{
    if (trace_event_get_state(TRACE_KVM_XEN_SOFT_RESET)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 13 "../target/i386/kvm/trace-events"
            qemu_log("kvm_xen_soft_reset " "" "\n");
#line 164 "trace/trace-target_i386_kvm.h"
        }
    }
}

#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 trace_kvm_xen_set_shared_info(uint64_t gfn)
{
    if (trace_event_get_state(TRACE_KVM_XEN_SET_SHARED_INFO)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 14 "../target/i386/kvm/trace-events"
            qemu_log("kvm_xen_set_shared_info " "shared info at gfn 0x%" PRIx64 "\n", gfn);
#line 179 "trace/trace-target_i386_kvm.h"
        }
    }
}

#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 trace_kvm_xen_set_vcpu_attr(int cpu, int type, uint64_t gpa)
{
    if (trace_event_get_state(TRACE_KVM_XEN_SET_VCPU_ATTR)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 15 "../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 194 "trace/trace-target_i386_kvm.h"
        }
    }
}

#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 trace_kvm_xen_set_vcpu_callback(int cpu, int vector)
{
    if (trace_event_get_state(TRACE_KVM_XEN_SET_VCPU_CALLBACK)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 16 "../target/i386/kvm/trace-events"
            qemu_log("kvm_xen_set_vcpu_callback " "callback vcpu %d vector %d" "\n", cpu, vector);
#line 209 "trace/trace-target_i386_kvm.h"
        }
    }
}

#define TRACE_TDX_HANDLE_RESET_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_TDX_HANDLE_RESET) || \
    false)

static inline void trace_tdx_handle_reset(void)
{
    if (trace_event_get_state(TRACE_TDX_HANDLE_RESET)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 19 "../target/i386/kvm/trace-events"
            qemu_log("tdx_handle_reset " "" "\n");
#line 224 "trace/trace-target_i386_kvm.h"
        }
    }
}
#endif /* TRACE_TARGET_I386_KVM_GENERATED_TRACERS_H */
