aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/kvm/x86.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/kvm/x86.c')
-rw-r--r--drivers/kvm/x86.c39
1 files changed, 20 insertions, 19 deletions
diff --git a/drivers/kvm/x86.c b/drivers/kvm/x86.c
index a46b95b3651c..016abc3357e9 100644
--- a/drivers/kvm/x86.c
+++ b/drivers/kvm/x86.c
@@ -42,29 +42,30 @@
42#define CR8_RESERVED_BITS (~(unsigned long)X86_CR8_TPR) 42#define CR8_RESERVED_BITS (~(unsigned long)X86_CR8_TPR)
43#define EFER_RESERVED_BITS 0xfffffffffffff2fe 43#define EFER_RESERVED_BITS 0xfffffffffffff2fe
44 44
45#define STAT_OFFSET(x) offsetof(struct kvm_vcpu, stat.x) 45#define VM_STAT(x) offsetof(struct kvm, stat.x), KVM_STAT_VM
46#define VCPU_STAT(x) offsetof(struct kvm_vcpu, stat.x), KVM_STAT_VCPU
46 47
47struct kvm_x86_ops *kvm_x86_ops; 48struct kvm_x86_ops *kvm_x86_ops;
48 49
49struct kvm_stats_debugfs_item debugfs_entries[] = { 50struct kvm_stats_debugfs_item debugfs_entries[] = {
50 { "pf_fixed", STAT_OFFSET(pf_fixed) }, 51 { "pf_fixed", VCPU_STAT(pf_fixed) },
51 { "pf_guest", STAT_OFFSET(pf_guest) }, 52 { "pf_guest", VCPU_STAT(pf_guest) },
52 { "tlb_flush", STAT_OFFSET(tlb_flush) }, 53 { "tlb_flush", VCPU_STAT(tlb_flush) },
53 { "invlpg", STAT_OFFSET(invlpg) }, 54 { "invlpg", VCPU_STAT(invlpg) },
54 { "exits", STAT_OFFSET(exits) }, 55 { "exits", VCPU_STAT(exits) },
55 { "io_exits", STAT_OFFSET(io_exits) }, 56 { "io_exits", VCPU_STAT(io_exits) },
56 { "mmio_exits", STAT_OFFSET(mmio_exits) }, 57 { "mmio_exits", VCPU_STAT(mmio_exits) },
57 { "signal_exits", STAT_OFFSET(signal_exits) }, 58 { "signal_exits", VCPU_STAT(signal_exits) },
58 { "irq_window", STAT_OFFSET(irq_window_exits) }, 59 { "irq_window", VCPU_STAT(irq_window_exits) },
59 { "halt_exits", STAT_OFFSET(halt_exits) }, 60 { "halt_exits", VCPU_STAT(halt_exits) },
60 { "halt_wakeup", STAT_OFFSET(halt_wakeup) }, 61 { "halt_wakeup", VCPU_STAT(halt_wakeup) },
61 { "request_irq", STAT_OFFSET(request_irq_exits) }, 62 { "request_irq", VCPU_STAT(request_irq_exits) },
62 { "irq_exits", STAT_OFFSET(irq_exits) }, 63 { "irq_exits", VCPU_STAT(irq_exits) },
63 { "host_state_reload", STAT_OFFSET(host_state_reload) }, 64 { "host_state_reload", VCPU_STAT(host_state_reload) },
64 { "efer_reload", STAT_OFFSET(efer_reload) }, 65 { "efer_reload", VCPU_STAT(efer_reload) },
65 { "fpu_reload", STAT_OFFSET(fpu_reload) }, 66 { "fpu_reload", VCPU_STAT(fpu_reload) },
66 { "insn_emulation", STAT_OFFSET(insn_emulation) }, 67 { "insn_emulation", VCPU_STAT(insn_emulation) },
67 { "insn_emulation_fail", STAT_OFFSET(insn_emulation_fail) }, 68 { "insn_emulation_fail", VCPU_STAT(insn_emulation_fail) },
68 { NULL } 69 { NULL }
69}; 70};
70 71