neel 7776059e98 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
..
2014-12-23 10:43:35 +00:00
2014-11-25 11:07:26 +00:00
2014-11-25 11:07:26 +00:00
2014-11-25 11:07:26 +00:00
2014-12-27 08:22:58 +00:00
2015-04-26 09:25:44 +00:00
2014-01-21 21:13:13 +00:00
2015-05-04 16:28:54 +00:00
2014-12-29 21:52:32 +00:00
2014-11-25 11:07:26 +00:00
2015-05-01 18:34:29 +00:00
2014-11-25 11:07:26 +00:00
2015-04-20 21:19:26 +00:00
2014-11-25 11:07:26 +00:00
2015-01-06 22:29:12 +00:00
2014-11-25 11:07:26 +00:00
2015-04-20 21:19:26 +00:00
2014-11-25 11:07:26 +00:00
2014-12-29 21:59:44 +00:00
2014-11-25 11:07:26 +00:00
2014-11-25 11:08:58 +00:00
2015-05-04 16:28:54 +00:00
2014-11-25 11:07:26 +00:00
2015-04-27 17:23:19 +00:00
2014-12-27 21:11:42 +00:00