Deal with transient EBUSY error return from vm_run() by retrying the operation.
This commit is contained in:
parent
75dd336603
commit
3019332f6d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/projects/bhyve/; revision=241490
@ -516,8 +516,19 @@ vm_loop(struct vmctx *ctx, int vcpu, uint64_t rip)
|
||||
|
||||
while (1) {
|
||||
error = vm_run(ctx, vcpu, rip, &vmexit[vcpu]);
|
||||
if (error != 0)
|
||||
break;
|
||||
if (error != 0) {
|
||||
/*
|
||||
* It is possible that 'vmmctl' or some other process
|
||||
* has transitioned the vcpu to CANNOT_RUN state right
|
||||
* before we tried to transition it to RUNNING.
|
||||
*
|
||||
* This is expected to be temporary so just retry.
|
||||
*/
|
||||
if (errno == EBUSY)
|
||||
continue;
|
||||
else
|
||||
break;
|
||||
}
|
||||
|
||||
prevcpu = vcpu;
|
||||
rc = (*handler[vmexit[vcpu].exitcode])(ctx, &vmexit[vcpu],
|
||||
|
Loading…
Reference in New Issue
Block a user