QEMU drives devices through the C API, so the graphics device gets seven
functions there: create and release, the region QEMU maps as BAR 2, BAR 0's
reads and writes, the doorbell file QEMU's ioeventfd fills, and the bus
reset. Its two callbacks raise the MSI-X vector and ask QEMU's dirty log
whether the guest wrote the scanout. Both run on the device's threads with
no lock of the library's held, so QEMU may take the BQL inside them, and no
function waits for those threads.
The additions are strictly additive (docs/api.md section 1): new functions,
types and constants, and status 17, RVG_ERR_HOST_RESOURCES, for a host that
refuses the region's memory, a pipe or a thread. The C harness calls each new
function and drives one GET_DISPLAYS through the region to its interrupt.