Skip to content

Commit

Permalink
KVM: Portability: Move kvm_vcpu_stat to x86.h
Browse files Browse the repository at this point in the history
This patches moves kvm_vcpu_stat to x86.h, so every
arch can define its own kvm_vcpu_stat structure.

Signed-off-by: Zhang Xiantao <xiantao.zhang@intel.com>
Acked-by: Carsten Otte <cotte@de.ibm.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
  • Loading branch information
Zhang Xiantao authored and Avi Kivity committed Jan 30, 2008
1 parent d17fbbf commit 77b4c25
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 22 deletions.
22 changes: 0 additions & 22 deletions drivers/kvm/kvm.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,28 +47,6 @@ struct kvm_guest_debug {
int singlestep;
};

struct kvm_vcpu_stat {
u32 pf_fixed;
u32 pf_guest;
u32 tlb_flush;
u32 invlpg;

u32 exits;
u32 io_exits;
u32 mmio_exits;
u32 signal_exits;
u32 irq_window_exits;
u32 halt_exits;
u32 halt_wakeup;
u32 request_irq_exits;
u32 irq_exits;
u32 host_state_reload;
u32 efer_reload;
u32 fpu_reload;
u32 insn_emulation;
u32 insn_emulation_fail;
};

/*
* It would be nice to use something smarter than a linear search, TBD...
* Thankfully we dont expect many devices to register (famous last words :),
Expand Down
21 changes: 21 additions & 0 deletions drivers/kvm/x86.h
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,27 @@ struct kvm_vcpu_arch {
struct x86_emulate_ctxt emulate_ctxt;
};

struct kvm_vcpu_stat {
u32 pf_fixed;
u32 pf_guest;
u32 tlb_flush;
u32 invlpg;

u32 exits;
u32 io_exits;
u32 mmio_exits;
u32 signal_exits;
u32 irq_window_exits;
u32 halt_exits;
u32 halt_wakeup;
u32 request_irq_exits;
u32 irq_exits;
u32 host_state_reload;
u32 efer_reload;
u32 fpu_reload;
u32 insn_emulation;
u32 insn_emulation_fail;
};

struct descriptor_table {
u16 limit;
Expand Down

0 comments on commit 77b4c25

Please sign in to comment.