Home
last modified time | relevance | path

Searched refs:msrs (Results 1 – 6 of 6) sorted by relevance

/arch/x86/oprofile/
Dop_model_ppro.c29 #define CTR_IS_RESERVED(msrs, c) (msrs->counters[(c)].addr ? 1 : 0) argument
32 #define CTRL_IS_RESERVED(msrs, c) (msrs->controls[(c)].addr ? 1 : 0) argument
33 #define CTRL_READ(l, h, msrs, c) do {rdmsr((msrs->controls[(c)].addr), (l), (h)); } while (0) argument
34 #define CTRL_WRITE(l, h, msrs, c) do {wrmsr((msrs->controls[(c)].addr), (l), (h)); } while (0) argument
46 static void ppro_fill_in_addresses(struct op_msrs * const msrs) in ppro_fill_in_addresses() argument
52 msrs->counters[i].addr = MSR_P6_PERFCTR0 + i; in ppro_fill_in_addresses()
54 msrs->counters[i].addr = 0; in ppro_fill_in_addresses()
59 msrs->controls[i].addr = MSR_P6_EVNTSEL0 + i; in ppro_fill_in_addresses()
61 msrs->controls[i].addr = 0; in ppro_fill_in_addresses()
66 static void ppro_setup_ctrs(struct op_msrs const * const msrs) in ppro_setup_ctrs() argument
[all …]
Dop_model_amd.c29 #define CTR_IS_RESERVED(msrs, c) (msrs->counters[(c)].addr ? 1 : 0) argument
30 #define CTR_READ(l, h, msrs, c) do {rdmsr(msrs->counters[(c)].addr, (l), (h)); } while (0) argument
31 #define CTR_WRITE(l, msrs, c) do {wrmsr(msrs->counters[(c)].addr, -(unsigned int)(l), -1); } while … argument
34 #define CTRL_IS_RESERVED(msrs, c) (msrs->controls[(c)].addr ? 1 : 0) argument
35 #define CTRL_READ(l, h, msrs, c) do {rdmsr(msrs->controls[(c)].addr, (l), (h)); } while (0) argument
36 #define CTRL_WRITE(l, h, msrs, c) do {wrmsr(msrs->controls[(c)].addr, (l), (h)); } while (0) argument
83 static void op_amd_fill_in_addresses(struct op_msrs * const msrs) in op_amd_fill_in_addresses() argument
89 msrs->counters[i].addr = MSR_K7_PERFCTR0 + i; in op_amd_fill_in_addresses()
91 msrs->counters[i].addr = 0; in op_amd_fill_in_addresses()
96 msrs->controls[i].addr = MSR_K7_EVNTSEL0 + i; in op_amd_fill_in_addresses()
[all …]
Dop_x86_model.h39 void (*fill_in_addresses)(struct op_msrs * const msrs);
40 void (*setup_ctrs)(struct op_msrs const * const msrs);
42 struct op_msrs const * const msrs);
43 void (*start)(struct op_msrs const * const msrs);
44 void (*stop)(struct op_msrs const * const msrs);
45 void (*shutdown)(struct op_msrs const * const msrs);
Dop_model_p4.c369 #define CTRL_IS_RESERVED(msrs, c) (msrs->controls[(c)].addr ? 1 : 0) argument
370 #define CTR_IS_RESERVED(msrs, c) (msrs->counters[(c)].addr ? 1 : 0) argument
397 static void p4_fill_in_addresses(struct op_msrs * const msrs) in p4_fill_in_addresses() argument
407 msrs->counters[i].addr = 0; in p4_fill_in_addresses()
409 msrs->controls[i].addr = 0; in p4_fill_in_addresses()
416 msrs->counters[i].addr = addr; in p4_fill_in_addresses()
417 msrs->controls[i].addr = cccraddr; in p4_fill_in_addresses()
425 msrs->controls[i].addr = addr; in p4_fill_in_addresses()
434 msrs->controls[i].addr = addr; in p4_fill_in_addresses()
440 msrs->controls[i].addr = addr; in p4_fill_in_addresses()
[all …]
Dnmi_int.c52 static void nmi_cpu_save_registers(struct op_msrs *msrs) in nmi_cpu_save_registers() argument
56 struct op_msr *counters = msrs->counters; in nmi_cpu_save_registers()
57 struct op_msr *controls = msrs->controls; in nmi_cpu_save_registers()
80 struct op_msrs *msrs = &per_cpu(cpu_msrs, cpu); in nmi_save_registers() local
81 nmi_cpu_save_registers(msrs); in nmi_save_registers()
126 struct op_msrs *msrs = &per_cpu(cpu_msrs, cpu); in nmi_cpu_setup() local
128 model->setup_ctrs(msrs); in nmi_cpu_setup()
178 static void nmi_restore_registers(struct op_msrs *msrs) in nmi_restore_registers() argument
182 struct op_msr *counters = msrs->counters; in nmi_restore_registers()
183 struct op_msr *controls = msrs->controls; in nmi_restore_registers()
[all …]
/arch/x86/kvm/
Dx86.c891 static int __msr_io(struct kvm_vcpu *vcpu, struct kvm_msrs *msrs, in __msr_io() argument
901 for (i = 0; i < msrs->nmsrs; ++i) in __msr_io()
921 struct kvm_msrs msrs; in msr_io() local
927 if (copy_from_user(&msrs, user_msrs, sizeof msrs)) in msr_io()
931 if (msrs.nmsrs >= MAX_IO_MSRS) in msr_io()
935 size = sizeof(struct kvm_msr_entry) * msrs.nmsrs; in msr_io()
944 r = n = __msr_io(vcpu, &msrs, entries, do_msr); in msr_io()