Prefer 'vcpu_should_yield()' over checking 'curthread->td_flags' directly.

MFC after:	1 week
This commit is contained in:
Neel Natu 2015-04-16 20:15:47 +00:00
parent 77afcadd51
commit 7c0b0b9ad3
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=281612

View file

@ -1917,7 +1917,7 @@ svm_vmrun(void *arg, int vcpu, register_t rip, pmap_t pmap,
}
/* 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;