summaryrefslogtreecommitdiffstats
path: root/drivers/kvm/x86.c
diff options
context:
space:
mode:
authorHollis Blanchard2007-10-31 23:24:23 +0100
committerAvi Kivity2008-01-30 16:52:59 +0100
commit417bc3041f5e66df1ce7f03d8fc481c3b12f250a (patch)
tree6c09ddc5adadd3696aa78e6e3fc219a2e8e63bae /drivers/kvm/x86.c
parentKVM: x86 emulator: Hoist modrm and abs decoding into separate functions (diff)
downloadkernel-qcow2-linux-417bc3041f5e66df1ce7f03d8fc481c3b12f250a.tar.gz
kernel-qcow2-linux-417bc3041f5e66df1ce7f03d8fc481c3b12f250a.tar.xz
kernel-qcow2-linux-417bc3041f5e66df1ce7f03d8fc481c3b12f250a.zip
KVM: Portability: Make exported debugfs data architecture-specific
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'drivers/kvm/x86.c')
-rw-r--r--drivers/kvm/x86.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/kvm/x86.c b/drivers/kvm/x86.c
index f75e7d7d9ead..c1f10e58f4d2 100644
--- a/drivers/kvm/x86.c
+++ b/drivers/kvm/x86.c
@@ -40,6 +40,28 @@
#define CR8_RESERVED_BITS (~(unsigned long)X86_CR8_TPR)
#define EFER_RESERVED_BITS 0xfffffffffffff2fe
+#define STAT_OFFSET(x) offsetof(struct kvm_vcpu, stat.x)
+
+struct kvm_stats_debugfs_item debugfs_entries[] = {
+ { "pf_fixed", STAT_OFFSET(pf_fixed) },
+ { "pf_guest", STAT_OFFSET(pf_guest) },
+ { "tlb_flush", STAT_OFFSET(tlb_flush) },
+ { "invlpg", STAT_OFFSET(invlpg) },
+ { "exits", STAT_OFFSET(exits) },
+ { "io_exits", STAT_OFFSET(io_exits) },
+ { "mmio_exits", STAT_OFFSET(mmio_exits) },
+ { "signal_exits", STAT_OFFSET(signal_exits) },
+ { "irq_window", STAT_OFFSET(irq_window_exits) },
+ { "halt_exits", STAT_OFFSET(halt_exits) },
+ { "halt_wakeup", STAT_OFFSET(halt_wakeup) },
+ { "request_irq", STAT_OFFSET(request_irq_exits) },
+ { "irq_exits", STAT_OFFSET(irq_exits) },
+ { "light_exits", STAT_OFFSET(light_exits) },
+ { "efer_reload", STAT_OFFSET(efer_reload) },
+ { NULL }
+};
+
+
unsigned long segment_base(u16 selector)
{
struct descriptor_table gdt;