aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/kvm/kvm.h
diff options
context:
space:
mode:
authorAvi Kivity <avi@qumranet.com>2007-11-18 09:24:12 -0500
committerAvi Kivity <avi@qumranet.com>2008-01-30 10:53:04 -0500
commitba1389b7a04de07e6231693b7ebb34f5b5d1a3e6 (patch)
tree536139f6e1d3a918b13a9c44f2144c52366a55bb /drivers/kvm/kvm.h
parentf2b5756bb3fbdca912c4890e444c18650389d8ae (diff)
KVM: Extend stats support for VM stats
This is in addition to the current virtual cpu statistics. Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'drivers/kvm/kvm.h')
-rw-r--r--drivers/kvm/kvm.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/kvm/kvm.h b/drivers/kvm/kvm.h
index 5a8a9af3593a..d3171f9c9c01 100644
--- a/drivers/kvm/kvm.h
+++ b/drivers/kvm/kvm.h
@@ -231,7 +231,7 @@ struct kvm_pio_request {
231 int rep; 231 int rep;
232}; 232};
233 233
234struct kvm_stat { 234struct kvm_vcpu_stat {
235 u32 pf_fixed; 235 u32 pf_fixed;
236 u32 pf_guest; 236 u32 pf_guest;
237 u32 tlb_flush; 237 u32 tlb_flush;
@@ -342,7 +342,7 @@ void kvm_io_bus_register_dev(struct kvm_io_bus *bus,
342 wait_queue_head_t wq; \ 342 wait_queue_head_t wq; \
343 int sigset_active; \ 343 int sigset_active; \
344 sigset_t sigset; \ 344 sigset_t sigset; \
345 struct kvm_stat stat; \ 345 struct kvm_vcpu_stat stat; \
346 KVM_VCPU_MMIO 346 KVM_VCPU_MMIO
347 347
348struct kvm_mem_alias { 348struct kvm_mem_alias {
@@ -361,6 +361,9 @@ struct kvm_memory_slot {
361 int user_alloc; 361 int user_alloc;
362}; 362};
363 363
364struct kvm_vm_stat {
365};
366
364struct kvm { 367struct kvm {
365 struct mutex lock; /* protects everything except vcpus */ 368 struct mutex lock; /* protects everything except vcpus */
366 int naliases; 369 int naliases;
@@ -387,6 +390,7 @@ struct kvm {
387 int round_robin_prev_vcpu; 390 int round_robin_prev_vcpu;
388 unsigned int tss_addr; 391 unsigned int tss_addr;
389 struct page *apic_access_page; 392 struct page *apic_access_page;
393 struct kvm_vm_stat stat;
390}; 394};
391 395
392static inline struct kvm_pic *pic_irqchip(struct kvm *kvm) 396static inline struct kvm_pic *pic_irqchip(struct kvm *kvm)
@@ -809,9 +813,15 @@ static inline u32 get_rdx_init_val(void)
809#define TSS_REDIRECTION_SIZE (256 / 8) 813#define TSS_REDIRECTION_SIZE (256 / 8)
810#define RMODE_TSS_SIZE (TSS_BASE_SIZE + TSS_REDIRECTION_SIZE + TSS_IOPB_SIZE + 1) 814#define RMODE_TSS_SIZE (TSS_BASE_SIZE + TSS_REDIRECTION_SIZE + TSS_IOPB_SIZE + 1)
811 815
816enum kvm_stat_kind {
817 KVM_STAT_VM,
818 KVM_STAT_VCPU,
819};
820
812struct kvm_stats_debugfs_item { 821struct kvm_stats_debugfs_item {
813 const char *name; 822 const char *name;
814 int offset; 823 int offset;
824 enum kvm_stat_kind kind;
815 struct dentry *dentry; 825 struct dentry *dentry;
816}; 826};
817extern struct kvm_stats_debugfs_item debugfs_entries[]; 827extern struct kvm_stats_debugfs_item debugfs_entries[];