3 #include "../../util/kvm-stat.h" 36 #define KVM_TRACE_MMIO_READ_UNSATISFIED 0 37 #define KVM_TRACE_MMIO_READ 1 38 #define KVM_TRACE_MMIO_WRITE 2 48 if (!strcmp(evsel->
name,
"kvm:kvm_mmio") &&
65 if (!strcmp(evsel->
name,
"kvm:kvm_mmio") &&
79 (
unsigned long)key->
key,
103 if (!strcmp(evsel->
name,
"kvm:kvm_pio")) {
123 (
unsigned long long)key->
key,
124 key->
info ?
"POUT" :
"PIN");
131 .name =
"IO Port Access" 143 { .
name =
"vmexit", .ops = &exit_events },
144 { .
name =
"mmio", .ops = &mmio_events },
145 { .
name =
"ioport", .ops = &ioport_events },
156 if (strstr(cpuid,
"Intel")) {
159 }
else if (strstr(cpuid,
"AMD")) {
static struct kvm_events_ops ioport_events
define_exit_reasons_table(hv_exit_reasons, kvm_trace_symbol_exit)
static bool mmio_event_begin(struct perf_evsel *evsel, struct perf_sample *sample, struct event_key *key)
struct exit_reasons_table * exit_reasons
static void mmio_event_decode_key(struct perf_kvm_stat *kvm __maybe_unused, struct event_key *key, char *decode)
static bool ioport_event_end(struct perf_evsel *evsel, struct perf_sample *sample __maybe_unused, struct event_key *key __maybe_unused)
const char * kvm_events_tp[NR_TPS+1]
bool kvm_entry_event(struct perf_evsel *evsel)
static void ioport_event_decode_key(struct perf_kvm_stat *kvm __maybe_unused, struct event_key *key, char *decode)
static void ioport_event_get_key(struct perf_evsel *evsel, struct perf_sample *sample, struct event_key *key)
int cpu_isa_init(struct perf_kvm_stat *kvm, const char *cpuid __maybe_unused)
const char *const kvm_skip_events[]
u64 perf_evsel__intval(struct perf_evsel *evsel, struct perf_sample *sample, const char *name)
static struct kvm_events_ops mmio_events
bool exit_event_begin(struct perf_evsel *evsel, struct perf_sample *sample, struct event_key *key)
#define KVM_TRACE_MMIO_READ
void exit_event_decode_key(struct perf_kvm_stat *kvm, struct event_key *key, char *decode)
bool(* is_begin_event)(struct perf_evsel *evsel, struct perf_sample *sample, struct event_key *key)
const char * kvm_exit_reason
static bool ioport_event_begin(struct perf_evsel *evsel, struct perf_sample *sample, struct event_key *key)
bool kvm_exit_event(struct perf_evsel *evsel)
static void mmio_event_get_key(struct perf_evsel *evsel, struct perf_sample *sample, struct event_key *key)
const char * exit_reasons_isa
const char * kvm_exit_trace
static bool mmio_event_end(struct perf_evsel *evsel, struct perf_sample *sample, struct event_key *key)
static struct kvm_events_ops exit_events
const char * kvm_entry_trace
bool exit_event_end(struct perf_evsel *evsel, struct perf_sample *sample, struct event_key *key)
#define KVM_TRACE_MMIO_WRITE