diff options
author | neel <neel@FreeBSD.org> | 2014-07-23 04:28:51 +0000 |
---|---|---|
committer | neel <neel@FreeBSD.org> | 2014-07-23 04:28:51 +0000 |
commit | e972917c13728442e9cd66ca3f86623f7f7ab351 (patch) | |
tree | 0b8a520e692386324f53c5972af0ec0ef5523d3c /usr.sbin/bhyve/inout.c | |
parent | 607bced4fa031f2dbd13539133b0971e2034c49e (diff) | |
download | FreeBSD-src-e972917c13728442e9cd66ca3f86623f7f7ab351.zip FreeBSD-src-e972917c13728442e9cd66ca3f86623f7f7ab351.tar.gz |
Emulate instructions emitted by OpenBSD/i386 version 5.5:
- CMP REG, r/m
- MOV AX/EAX/RAX, moffset
- MOV moffset, AX/EAX/RAX
- PUSH r/m
Diffstat (limited to 'usr.sbin/bhyve/inout.c')
-rw-r--r-- | usr.sbin/bhyve/inout.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/usr.sbin/bhyve/inout.c b/usr.sbin/bhyve/inout.c index fe9e0d8..145ac1c 100644 --- a/usr.sbin/bhyve/inout.c +++ b/usr.sbin/bhyve/inout.c @@ -157,15 +157,13 @@ emulate_inout(struct vmctx *ctx, int vcpu, struct vm_exit *vmexit, int strict) if (vie_calculate_gla(vis->paging.cpu_mode, vis->seg_name, &vis->seg_desc, index, bytes, addrsize, prot, &gla)) { - error = vm_inject_exception2(ctx, vcpu, - IDT_GP, 0); - assert(error == 0); + vm_inject_gp(ctx, vcpu, 0); retval = INOUT_RESTART; break; } - error = vm_gla2gpa(ctx, vcpu, &vis->paging, gla, bytes, - prot, iov, nitems(iov)); + error = vm_copy_setup(ctx, vcpu, &vis->paging, gla, + bytes, prot, iov, nitems(iov)); assert(error == 0 || error == 1 || error == -1); if (error) { retval = (error == 1) ? INOUT_RESTART : @@ -175,9 +173,7 @@ emulate_inout(struct vmctx *ctx, int vcpu, struct vm_exit *vmexit, int strict) if (vie_alignment_check(vis->paging.cpl, bytes, vis->cr0, vis->rflags, gla)) { - error = vm_inject_exception2(ctx, vcpu, - IDT_AC, 0); - assert(error == 0); + vm_inject_ac(ctx, vcpu, 0); return (INOUT_RESTART); } |