bhyve: Sleep for a short period after VM_EXITCODE_DEBUG exits
Apply 2e2b8afa52 for RISC-V:
As on amd64 and aarch64 APs will repeatedly exit until they are
brought online, so this hack helps avoid burning CPU time during
guest bootup.
Reviewed by: corvink, markj
Differential Revision: https://reviews.freebsd.org/D48811
This commit is contained in:
@@ -47,6 +47,7 @@
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <vmmapi.h>
|
||||
|
||||
@@ -135,6 +136,12 @@ vmexit_debug(struct vmctx *ctx __unused, struct vcpu *vcpu __unused,
|
||||
struct vm_run *vmrun __unused)
|
||||
{
|
||||
|
||||
/*
|
||||
* XXX-MJ sleep for a short period to avoid chewing up the CPU in the
|
||||
* window between activation of the vCPU thread and the
|
||||
* SBI_HSM_HART_START request.
|
||||
*/
|
||||
usleep(1000);
|
||||
return (VMEXIT_CONTINUE);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user