svn commit: r261621 - in head/sys/amd64/vmm: . intel
Neel Natu
neel at FreeBSD.org
Sat Feb 8 06:22:10 UTC 2014
Author: neel
Date: Sat Feb 8 06:22:09 2014
New Revision: 261621
URL: http://svnweb.freebsd.org/changeset/base/261621
Log:
Add a counter to differentiate between VM-exits due to nested paging faults
and instruction emulation faults.
Modified:
head/sys/amd64/vmm/intel/vmx.c
head/sys/amd64/vmm/vmm_stat.c
head/sys/amd64/vmm/vmm_stat.h
Modified: head/sys/amd64/vmm/intel/vmx.c
==============================================================================
--- head/sys/amd64/vmm/intel/vmx.c Sat Feb 8 05:35:36 2014 (r261620)
+++ head/sys/amd64/vmm/intel/vmx.c Sat Feb 8 06:22:09 2014 (r261621)
@@ -1725,7 +1725,6 @@ vmx_exit_process(struct vmx *vmx, int vc
return (1);
break;
case EXIT_REASON_EPT_FAULT:
- vmm_stat_incr(vmx->vm, vcpu, VMEXIT_EPT_FAULT, 1);
/*
* If 'gpa' lies within the address space allocated to
* memory then this must be a nested page fault otherwise
@@ -1736,6 +1735,7 @@ vmx_exit_process(struct vmx *vmx, int vc
vmexit->exitcode = VM_EXITCODE_PAGING;
vmexit->u.paging.gpa = gpa;
vmexit->u.paging.fault_type = ept_fault_type(qual);
+ vmm_stat_incr(vmx->vm, vcpu, VMEXIT_NESTED_FAULT, 1);
} else if (ept_emulation_fault(qual)) {
vmexit->exitcode = VM_EXITCODE_INST_EMUL;
vmexit->u.inst_emul.gpa = gpa;
@@ -1743,6 +1743,7 @@ vmx_exit_process(struct vmx *vmx, int vc
vmexit->u.inst_emul.cr3 = vmcs_guest_cr3();
vmexit->u.inst_emul.cpu_mode = vmx_cpu_mode();
vmexit->u.inst_emul.paging_mode = vmx_paging_mode();
+ vmm_stat_incr(vmx->vm, vcpu, VMEXIT_INST_EMUL, 1);
}
/*
* If Virtual NMIs control is 1 and the VM-exit is due to an
Modified: head/sys/amd64/vmm/vmm_stat.c
==============================================================================
--- head/sys/amd64/vmm/vmm_stat.c Sat Feb 8 05:35:36 2014 (r261620)
+++ head/sys/amd64/vmm/vmm_stat.c Sat Feb 8 06:22:09 2014 (r261621)
@@ -146,7 +146,8 @@ VMM_STAT(VMEXIT_INTR_WINDOW, "vm exits d
VMM_STAT(VMEXIT_NMI_WINDOW, "vm exits due to nmi window opening");
VMM_STAT(VMEXIT_INOUT, "number of times in/out was intercepted");
VMM_STAT(VMEXIT_CPUID, "number of times cpuid was intercepted");
-VMM_STAT(VMEXIT_EPT_FAULT, "vm exits due to nested page fault");
+VMM_STAT(VMEXIT_NESTED_FAULT, "vm exits due to nested page fault");
+VMM_STAT(VMEXIT_INST_EMUL, "vm exits for instruction emulation");
VMM_STAT(VMEXIT_UNKNOWN, "number of vm exits for unknown reason");
VMM_STAT(VMEXIT_ASTPENDING, "number of times astpending at exit");
VMM_STAT(VMEXIT_USERSPACE, "number of vm exits handled in userspace");
Modified: head/sys/amd64/vmm/vmm_stat.h
==============================================================================
--- head/sys/amd64/vmm/vmm_stat.h Sat Feb 8 05:35:36 2014 (r261620)
+++ head/sys/amd64/vmm/vmm_stat.h Sat Feb 8 06:22:09 2014 (r261621)
@@ -116,7 +116,8 @@ VMM_STAT_DECLARE(VMEXIT_INTR_WINDOW);
VMM_STAT_DECLARE(VMEXIT_NMI_WINDOW);
VMM_STAT_DECLARE(VMEXIT_INOUT);
VMM_STAT_DECLARE(VMEXIT_CPUID);
-VMM_STAT_DECLARE(VMEXIT_EPT_FAULT);
+VMM_STAT_DECLARE(VMEXIT_NESTED_FAULT);
+VMM_STAT_DECLARE(VMEXIT_INST_EMUL);
VMM_STAT_DECLARE(VMEXIT_UNKNOWN);
VMM_STAT_DECLARE(VMEXIT_ASTPENDING);
VMM_STAT_DECLARE(VMEXIT_USERSPACE);
More information about the svn-src-all
mailing list