v3 was posted here: https://lists.gnu.org/archive/html/qemu-devel/2019-01/msg01536.html
In v4: - Detect optreset at ./configure time and use ifdef HAVE_OPTRESET. - Adjusted comment style. - Checkpatch is now clean. - Retested on Linux, FreeBSD 11.2 and OpenBSD 6.4. Rich.