Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 80733
b: refs/heads/master
c: f2b5756
h: refs/heads/master
i:
  80731: 4ed0737
v: v3
  • Loading branch information
Avi Kivity committed Jan 30, 2008
1 parent 53eb068 commit e158f34
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f096ed8588b53bf802b84862c6c4d00d25d1ed72
refs/heads/master: f2b5756bb3fbdca912c4890e444c18650389d8ae
2 changes: 2 additions & 0 deletions trunk/drivers/kvm/kvm.h
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,8 @@ struct kvm_stat {
u32 host_state_reload;
u32 efer_reload;
u32 fpu_reload;
u32 insn_emulation;
u32 insn_emulation_fail;
};

struct kvm_io_device {
Expand Down
4 changes: 4 additions & 0 deletions trunk/drivers/kvm/x86.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ struct kvm_stats_debugfs_item debugfs_entries[] = {
{ "host_state_reload", STAT_OFFSET(host_state_reload) },
{ "efer_reload", STAT_OFFSET(efer_reload) },
{ "fpu_reload", STAT_OFFSET(fpu_reload) },
{ "insn_emulation", STAT_OFFSET(insn_emulation) },
{ "insn_emulation_fail", STAT_OFFSET(insn_emulation_fail) },
{ NULL }
};

Expand Down Expand Up @@ -1381,7 +1383,9 @@ int emulate_instruction(struct kvm_vcpu *vcpu,
get_segment_base(vcpu, VCPU_SREG_FS);

r = x86_decode_insn(&vcpu->emulate_ctxt, &emulate_ops);
++vcpu->stat.insn_emulation;
if (r) {
++vcpu->stat.insn_emulation_fail;
if (kvm_mmu_unprotect_page_virt(vcpu, cr2))
return EMULATE_DONE;
return EMULATE_FAIL;
Expand Down

0 comments on commit e158f34

Please sign in to comment.