svn commit: r281612 - head/sys/amd64/vmm/amd
Neel Natu
neel at FreeBSD.org
Thu Apr 16 20:15:48 UTC 2015
Author: neel
Date: Thu Apr 16 20:15:47 2015
New Revision: 281612
URL: https://svnweb.freebsd.org/changeset/base/281612
Log:
Prefer 'vcpu_should_yield()' over checking 'curthread->td_flags' directly.
MFC after: 1 week
Modified:
head/sys/amd64/vmm/amd/svm.c
Modified: head/sys/amd64/vmm/amd/svm.c
==============================================================================
--- head/sys/amd64/vmm/amd/svm.c Thu Apr 16 20:11:49 2015 (r281611)
+++ head/sys/amd64/vmm/amd/svm.c Thu Apr 16 20:15:47 2015 (r281612)
@@ -1917,7 +1917,7 @@ svm_vmrun(void *arg, int vcpu, register_
}
/* We are asked to give the cpu by scheduler. */
- if (curthread->td_flags & (TDF_ASTPENDING | TDF_NEEDRESCHED)) {
+ if (vcpu_should_yield(vm, vcpu)) {
enable_gintr();
vm_exit_astpending(vm, vcpu, state->rip);
break;
More information about the svn-src-head
mailing list