freebsd-dev/sys/amd64/vmm
Neel Natu 9c4d547896 Deprecate the 3-way return values from vm_gla2gpa() and vm_copy_setup().
Prior to this change both functions returned 0 for success, -1 for failure
and +1 to indicate that an exception was injected into the guest.

The numerical value of ERESTART also happens to be -1 so when these functions
returned -1 it had to be translated to a positive errno value to prevent the
VM_RUN ioctl from being inadvertently restarted. This made it easy to introduce
bugs when writing emulation code.

Fix this by adding an 'int *guest_fault' parameter and setting it to '1' if
an exception was delivered to the guest. The return value is 0 or EFAULT so
no additional translation is needed.

Reviewed by:	tychon
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D2428
2015-05-06 16:25:20 +00:00
..
amd Do a proper emulation of guest writes to MSR_EFER. 2015-05-06 05:40:20 +00:00
intel Emulate machine check related MSRs to allow guest OSes like Windows to boot. 2015-05-02 04:19:11 +00:00
io r281630 relaxed the limits on the vectors that can be asserted in the IRRs. 2015-05-01 16:00:29 +00:00
vmm_dev.c Deprecate the 3-way return values from vm_gla2gpa() and vm_copy_setup(). 2015-05-06 16:25:20 +00:00
vmm_host.c - Rework the XSAVE/XRSTOR emulation to only expose XCR0 features to the 2014-05-27 19:04:38 +00:00
vmm_host.h Add virtualized XSAVE support to bhyve which permits guests to use XSAVE and 2014-02-08 16:37:54 +00:00
vmm_instruction_emul.c Deprecate the 3-way return values from vm_gla2gpa() and vm_copy_setup(). 2015-05-06 16:25:20 +00:00
vmm_ioport.c Don't require <sys/cpuset.h> to be always included before <machine/vmm.h>. 2015-04-30 22:23:22 +00:00
vmm_ioport.h Change the type of the first argument to the I/O emulation handlers to 2014-10-26 19:03:06 +00:00
vmm_ktr.h Add emulation of the "outsb" instruction. NetBSD guests use this to write to 2014-05-23 05:15:17 +00:00
vmm_lapic.c Relax the check on which vectors can be delivered through the APIC. According 2015-04-16 22:44:51 +00:00
vmm_lapic.h Roll back botched partial MFC :( 2014-02-04 05:03:14 +00:00
vmm_mem.c Merge projects/bhyve_npt_pmap into head. 2013-10-05 21:22:35 +00:00
vmm_mem.h Merge projects/bhyve_npt_pmap into head. 2013-10-05 21:22:35 +00:00
vmm_stat.c Don't require <sys/cpuset.h> to be always included before <machine/vmm.h>. 2015-04-30 22:23:22 +00:00
vmm_stat.h Get rid of unused stat VMM_HLT_IGNORED. 2014-09-21 18:52:56 +00:00
vmm_util.c
vmm_util.h
vmm.c Deprecate the 3-way return values from vm_gla2gpa() and vm_copy_setup(). 2015-05-06 16:25:20 +00:00
x86.c Do a proper emulation of guest writes to MSR_EFER. 2015-05-06 05:40:20 +00:00
x86.h Do a proper emulation of guest writes to MSR_EFER. 2015-05-06 05:40:20 +00:00