Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
f2b5756b
Commit
f2b5756b
authored
Nov 18, 2007
by
Avi Kivity
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
KVM: Add instruction emulation statistics
parent
f096ed85
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
+6
-0
drivers/kvm/kvm.h
drivers/kvm/kvm.h
+2
-0
drivers/kvm/x86.c
drivers/kvm/x86.c
+4
-0
No files found.
drivers/kvm/kvm.h
View file @
f2b5756b
...
@@ -249,6 +249,8 @@ struct kvm_stat {
...
@@ -249,6 +249,8 @@ struct kvm_stat {
u32
host_state_reload
;
u32
host_state_reload
;
u32
efer_reload
;
u32
efer_reload
;
u32
fpu_reload
;
u32
fpu_reload
;
u32
insn_emulation
;
u32
insn_emulation_fail
;
};
};
struct
kvm_io_device
{
struct
kvm_io_device
{
...
...
drivers/kvm/x86.c
View file @
f2b5756b
...
@@ -63,6 +63,8 @@ struct kvm_stats_debugfs_item debugfs_entries[] = {
...
@@ -63,6 +63,8 @@ struct kvm_stats_debugfs_item debugfs_entries[] = {
{
"host_state_reload"
,
STAT_OFFSET
(
host_state_reload
)
},
{
"host_state_reload"
,
STAT_OFFSET
(
host_state_reload
)
},
{
"efer_reload"
,
STAT_OFFSET
(
efer_reload
)
},
{
"efer_reload"
,
STAT_OFFSET
(
efer_reload
)
},
{
"fpu_reload"
,
STAT_OFFSET
(
fpu_reload
)
},
{
"fpu_reload"
,
STAT_OFFSET
(
fpu_reload
)
},
{
"insn_emulation"
,
STAT_OFFSET
(
insn_emulation
)
},
{
"insn_emulation_fail"
,
STAT_OFFSET
(
insn_emulation_fail
)
},
{
NULL
}
{
NULL
}
};
};
...
@@ -1381,7 +1383,9 @@ int emulate_instruction(struct kvm_vcpu *vcpu,
...
@@ -1381,7 +1383,9 @@ int emulate_instruction(struct kvm_vcpu *vcpu,
get_segment_base
(
vcpu
,
VCPU_SREG_FS
);
get_segment_base
(
vcpu
,
VCPU_SREG_FS
);
r
=
x86_decode_insn
(
&
vcpu
->
emulate_ctxt
,
&
emulate_ops
);
r
=
x86_decode_insn
(
&
vcpu
->
emulate_ctxt
,
&
emulate_ops
);
++
vcpu
->
stat
.
insn_emulation
;
if
(
r
)
{
if
(
r
)
{
++
vcpu
->
stat
.
insn_emulation_fail
;
if
(
kvm_mmu_unprotect_page_virt
(
vcpu
,
cr2
))
if
(
kvm_mmu_unprotect_page_virt
(
vcpu
,
cr2
))
return
EMULATE_DONE
;
return
EMULATE_DONE
;
return
EMULATE_FAIL
;
return
EMULATE_FAIL
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment