aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/kvm
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/kvm')
-rw-r--r--drivers/kvm/kvm.h2
-rw-r--r--drivers/kvm/svm.c1
-rw-r--r--drivers/kvm/vmx.c1
-rw-r--r--drivers/kvm/x86.c6
4 files changed, 5 insertions, 5 deletions
diff --git a/drivers/kvm/kvm.h b/drivers/kvm/kvm.h
index 59e001c3ff09..04efe8833e09 100644
--- a/drivers/kvm/kvm.h
+++ b/drivers/kvm/kvm.h
@@ -246,7 +246,7 @@ struct kvm_stat {
246 u32 halt_wakeup; 246 u32 halt_wakeup;
247 u32 request_irq_exits; 247 u32 request_irq_exits;
248 u32 irq_exits; 248 u32 irq_exits;
249 u32 light_exits; 249 u32 host_state_reload;
250 u32 efer_reload; 250 u32 efer_reload;
251}; 251};
252 252
diff --git a/drivers/kvm/svm.c b/drivers/kvm/svm.c
index a1a7f39ff3f1..0d32304944fc 100644
--- a/drivers/kvm/svm.c
+++ b/drivers/kvm/svm.c
@@ -654,6 +654,7 @@ static void svm_vcpu_put(struct kvm_vcpu *vcpu)
654 struct vcpu_svm *svm = to_svm(vcpu); 654 struct vcpu_svm *svm = to_svm(vcpu);
655 int i; 655 int i;
656 656
657 ++vcpu->stat.host_state_reload;
657 for (i = 0; i < NR_HOST_SAVE_USER_MSRS; i++) 658 for (i = 0; i < NR_HOST_SAVE_USER_MSRS; i++)
658 wrmsrl(host_save_user_msrs[i], svm->host_user_msrs[i]); 659 wrmsrl(host_save_user_msrs[i], svm->host_user_msrs[i]);
659 660
diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c
index 84c77fed9d17..7130f315afdf 100644
--- a/drivers/kvm/vmx.c
+++ b/drivers/kvm/vmx.c
@@ -463,6 +463,7 @@ static void vmx_load_host_state(struct vcpu_vmx *vmx)
463 if (!vmx->host_state.loaded) 463 if (!vmx->host_state.loaded)
464 return; 464 return;
465 465
466 ++vmx->vcpu.stat.host_state_reload;
466 vmx->host_state.loaded = 0; 467 vmx->host_state.loaded = 0;
467 if (vmx->host_state.fs_reload_needed) 468 if (vmx->host_state.fs_reload_needed)
468 load_fs(vmx->host_state.fs_sel); 469 load_fs(vmx->host_state.fs_sel);
diff --git a/drivers/kvm/x86.c b/drivers/kvm/x86.c
index b7c72ac36735..923dfd4e0afd 100644
--- a/drivers/kvm/x86.c
+++ b/drivers/kvm/x86.c
@@ -60,7 +60,7 @@ struct kvm_stats_debugfs_item debugfs_entries[] = {
60 { "halt_wakeup", STAT_OFFSET(halt_wakeup) }, 60 { "halt_wakeup", STAT_OFFSET(halt_wakeup) },
61 { "request_irq", STAT_OFFSET(request_irq_exits) }, 61 { "request_irq", STAT_OFFSET(request_irq_exits) },
62 { "irq_exits", STAT_OFFSET(irq_exits) }, 62 { "irq_exits", STAT_OFFSET(irq_exits) },
63 { "light_exits", STAT_OFFSET(light_exits) }, 63 { "host_state_reload", STAT_OFFSET(host_state_reload) },
64 { "efer_reload", STAT_OFFSET(efer_reload) }, 64 { "efer_reload", STAT_OFFSET(efer_reload) },
65 { NULL } 65 { NULL }
66}; 66};
@@ -1988,10 +1988,8 @@ again:
1988 ++vcpu->stat.request_irq_exits; 1988 ++vcpu->stat.request_irq_exits;
1989 goto out; 1989 goto out;
1990 } 1990 }
1991 if (!need_resched()) { 1991 if (!need_resched())
1992 ++vcpu->stat.light_exits;
1993 goto again; 1992 goto again;
1994 }
1995 } 1993 }
1996 1994
1997out: 1995out: