]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix fault injection in bhyve.
authorneel <neel@FreeBSD.org>
Thu, 24 Jul 2014 01:38:11 +0000 (01:38 +0000)
committerneel <neel@FreeBSD.org>
Thu, 24 Jul 2014 01:38:11 +0000 (01:38 +0000)
commit4535fa67c47e242c2d4c579630ebc12d8153d881
treef10160daba1a9c8df5c059e74db7b03dcae6f007
parent57fd2f85267f7e1a29e8cef251c560081842963b
Fix fault injection in bhyve.

The faulting instruction needs to be restarted when the exception handler
is done handling the fault. bhyve now does this correctly by setting
'vmexit[vcpu].inst_length' to zero so the %rip is not advanced.

A minor complication is that the fault injection APIs are used by instruction
emulation code that is shared by vmm.ko and bhyve. Thus the argument that
refers to 'struct vm *' in kernel or 'struct vmctx *' in userspace needs to
be loosely typed as a 'void *'.
lib/libvmmapi/vmmapi.c
lib/libvmmapi/vmmapi.h
sys/amd64/include/vmm.h
sys/amd64/vmm/vmm.c
usr.sbin/bhyve/bhyverun.c
usr.sbin/bhyve/inout.c
usr.sbin/bhyve/task_switch.c