diff --git a/sys/amd64/vmm/intel/vmx.c b/sys/amd64/vmm/intel/vmx.c index edb3653aff7..f1aea1d2a9d 100644 --- a/sys/amd64/vmm/intel/vmx.c +++ b/sys/amd64/vmm/intel/vmx.c @@ -3184,9 +3184,6 @@ vmx_run(void *arg, int vcpu, register_t rip, pmap_t pmap, handled, vmexit->exitcode); } - if (!handled) - vmm_stat_incr(vm, vcpu, VMEXIT_USERSPACE, 1); - VCPU_CTR1(vm, vcpu, "returning from vmx_run: exitcode %d", vmexit->exitcode); diff --git a/sys/amd64/vmm/vmm.c b/sys/amd64/vmm/vmm.c index 2375dc0e13c..47299301f5f 100644 --- a/sys/amd64/vmm/vmm.c +++ b/sys/amd64/vmm/vmm.c @@ -1821,6 +1821,7 @@ restart: if (error == 0 && retu == false) goto restart; + vmm_stat_incr(vm, vcpuid, VMEXIT_USERSPACE, 1); VCPU_CTR2(vm, vcpuid, "retu %d/%d", error, vme->exitcode); /* copy the exit information */