diff options
author | Dave Voutila <dv@cvs.openbsd.org> | 2024-01-10 04:14:00 +0000 |
---|---|---|
committer | Dave Voutila <dv@cvs.openbsd.org> | 2024-01-10 04:14:00 +0000 |
commit | f078343c00dde60ef10e860956d2cc3ed5c5d295 (patch) | |
tree | 8b5de7fa0cec2938446b82fffe74a8679fe890cc /usr.sbin | |
parent | 8a20523879883f413d4914d5ca31772ace3dbfad (diff) |
vmm/vmd: add io instruction length to exit information.
Add the instruction length to the vm exit information to allower
vmd(8) to manipulate the instruction pointer after io emulation.
This is preparation for emulating string-based io instructions.
Removes the instruction pointer update from the kernel (vmm(4)) as
well as the instruction length checks, which were overly restrictive
anyways based on the way prefixes work in x86 instructions.
ok mlarkin@
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/vmd/vm.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/vmd/vm.c b/usr.sbin/vmd/vm.c index ee31c42cfbb..cc2b4fc7636 100644 --- a/usr.sbin/vmd/vm.c +++ b/usr.sbin/vmd/vm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm.c,v 1.94 2023/09/26 01:53:54 dv Exp $ */ +/* $OpenBSD: vm.c,v 1.95 2024/01/10 04:13:59 dv Exp $ */ /* * Copyright (c) 2015 Mike Larkin <mlarkin@openbsd.org> @@ -1750,6 +1750,8 @@ vcpu_exit_inout(struct vm_run_params *vrp) else if (vei->vei.vei_dir == VEI_DIR_IN) set_return_data(vei, 0xFFFFFFFF); + vei->vrs.vrs_gprs[VCPU_REGS_RIP] += vei->vei.vei_insn_len; + if (intr != 0xFF) vcpu_assert_pic_irq(vrp->vrp_vm_id, vrp->vrp_vcpu_id, intr); } |