mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 00:32:25 -04:00
bhyve: Add a stub VM_EXITCODE_REG_EMUL handler
This lets us print a few fields of interest before aborting the VM loop. No functional change intended. Reviewed by: corvink, andrew Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D44741
This commit is contained in:
parent
a0ca4af945
commit
05704402ac
1 changed files with 16 additions and 0 deletions
|
|
@ -84,6 +84,21 @@ fail:
|
|||
return (VMEXIT_ABORT);
|
||||
}
|
||||
|
||||
static int
|
||||
vmexit_reg_emul(struct vmctx *ctx __unused, struct vcpu *vcpu __unused,
|
||||
struct vm_run *vmrun)
|
||||
{
|
||||
struct vm_exit *vme;
|
||||
struct vre *vre;
|
||||
|
||||
vme = vmrun->vm_exit;
|
||||
vre = &vme->u.reg_emul.vre;
|
||||
|
||||
EPRINTLN("Unhandled register access: pc %#lx syndrome %#x reg %d\n",
|
||||
vme->pc, vre->inst_syndrome, vre->reg);
|
||||
return (VMEXIT_ABORT);
|
||||
}
|
||||
|
||||
static int
|
||||
vmexit_suspend(struct vmctx *ctx, struct vcpu *vcpu, struct vm_run *vmrun)
|
||||
{
|
||||
|
|
@ -269,6 +284,7 @@ vmexit_ss(struct vmctx *ctx __unused, struct vcpu *vcpu, struct vm_run *vmrun)
|
|||
const vmexit_handler_t vmexit_handlers[VM_EXITCODE_MAX] = {
|
||||
[VM_EXITCODE_BOGUS] = vmexit_bogus,
|
||||
[VM_EXITCODE_INST_EMUL] = vmexit_inst_emul,
|
||||
[VM_EXITCODE_REG_EMUL] = vmexit_reg_emul,
|
||||
[VM_EXITCODE_SUSPENDED] = vmexit_suspend,
|
||||
[VM_EXITCODE_DEBUG] = vmexit_debug,
|
||||
[VM_EXITCODE_SMCCC] = vmexit_smccc,
|
||||
|
|
|
|||
Loading…
Reference in a new issue