Exit with a user-friendly message instead of tripping an assert
if vm_activate_cpu(..) fails when called from fbsdrun_addcpu(..) MFC after: 1 week PR: 203884 Reviewed by: grehan Submitted by: William Orr <will@worrbase.com>
This commit is contained in:
@@ -261,7 +261,8 @@ fbsdrun_addcpu(struct vmctx *ctx, int fromcpu, int newcpu, uint64_t rip)
|
|||||||
* with vm_suspend().
|
* with vm_suspend().
|
||||||
*/
|
*/
|
||||||
error = vm_activate_cpu(ctx, newcpu);
|
error = vm_activate_cpu(ctx, newcpu);
|
||||||
assert(error == 0);
|
if (error != 0)
|
||||||
|
err(EX_OSERR, "could not activate CPU %d", newcpu);
|
||||||
|
|
||||||
CPU_SET_ATOMIC(newcpu, &cpumask);
|
CPU_SET_ATOMIC(newcpu, &cpumask);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user