Quiescing devices during guest shutdown
When a guest shuts down, in either a controlled or uncontrolled shutdown, the qvm process should try to quiesce any physical devices used by the guest. This ensures that the guest driver doesn't continue writing to physical memory, which can leave the hardware in an unexpected or even damaged state.
When a guest shuts down and hence, its device drivers go away, the host hardware can't be expected to stay in the same state because the devices may be operating asynchronously (e.g., doing DMA writes, generating interrupts). To protect the integrity of the hardware, the qvm process in which the guest runs can be designed to quiesce any such device (i.e., make it go dormant) when the guest terminates.
- writes to physical memory (very dangerous)
- generates interrupts (less dangerous because the hypervisor can acknowledge the IRQ and ignore it)
For information on defining a vdev's control function to register a callback that runs during process shutdown,
see Handling a qvm termination
.