mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-14 10:09:48 +00:00
9c4d547896
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 |
||
---|---|---|
.. | ||
Makefile | ||
vmmapi_freebsd.c | ||
vmmapi.c | ||
vmmapi.h |