bhyverun.c (240943) | bhyverun.c (241490) |
---|---|
1/*- 2 * Copyright (c) 2011 NetApp, Inc. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 502 unchanged lines hidden (view full) --- 511 512 if (pincpu >= 0) { 513 error = vm_set_pinning(ctx, vcpu, pincpu + vcpu); 514 assert(error == 0); 515 } 516 517 while (1) { 518 error = vm_run(ctx, vcpu, rip, &vmexit[vcpu]); | 1/*- 2 * Copyright (c) 2011 NetApp, Inc. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 502 unchanged lines hidden (view full) --- 511 512 if (pincpu >= 0) { 513 error = vm_set_pinning(ctx, vcpu, pincpu + vcpu); 514 assert(error == 0); 515 } 516 517 while (1) { 518 error = vm_run(ctx, vcpu, rip, &vmexit[vcpu]); |
519 if (error != 0) 520 break; | 519 if (error != 0) { 520 /* 521 * It is possible that 'vmmctl' or some other process 522 * has transitioned the vcpu to CANNOT_RUN state right 523 * before we tried to transition it to RUNNING. 524 * 525 * This is expected to be temporary so just retry. 526 */ 527 if (errno == EBUSY) 528 continue; 529 else 530 break; 531 } |
521 522 prevcpu = vcpu; 523 rc = (*handler[vmexit[vcpu].exitcode])(ctx, &vmexit[vcpu], 524 &vcpu); 525 switch (rc) { 526 case VMEXIT_SWITCH: 527 assert(guest_vcpu_mux); 528 if (vcpu == -1) { --- 197 unchanged lines hidden --- | 532 533 prevcpu = vcpu; 534 rc = (*handler[vmexit[vcpu].exitcode])(ctx, &vmexit[vcpu], 535 &vcpu); 536 switch (rc) { 537 case VMEXIT_SWITCH: 538 assert(guest_vcpu_mux); 539 if (vcpu == -1) { --- 197 unchanged lines hidden --- |