freebsd-skq/sys/amd64
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
..
acpica don't set CR4 PSE bit on amd64 2014-07-23 15:53:29 +00:00
amd64 Microsoft vmbus, storage and other related driver enhancements for HyperV. 2015-04-29 10:12:34 +00:00
conf Microsoft vmbus, storage and other related driver enhancements for HyperV. 2015-04-29 10:12:34 +00:00
ia32 Do not qualify the mcontext_t *mcp argument for set_mcontext(9) as 2015-01-31 21:43:46 +00:00
include Deprecate the 3-way return values from vm_gla2gpa() and vm_copy_setup(). 2015-05-06 16:25:20 +00:00
linux32 Regen after r276508, r276509. 2015-01-01 18:43:31 +00:00
pci Pull in r267961 and r267973 again. Fix for issues reported will follow. 2014-06-28 03:56:17 +00:00
vmm Deprecate the 3-way return values from vm_gla2gpa() and vm_copy_setup(). 2015-05-06 16:25:20 +00:00
Makefile