microsoft / openvmm

Home of OpenVMM and OpenHCL.
http://openvmm.dev/
MIT License
1.36k stars 59 forks source link

Shutdown relay device should mirror guest connectivity #144

Open Brian-Perkins opened 4 days ago

Brian-Perkins commented 4 days ago

Mirror guest vmbus connection status with shutdown device. This allows the host to determine if there is a shutdown device connected. Rescind guest shutdown device on stop in case VM is moving to a version that does not support shutdown relay (e.g. moving to an older version). If the VM resumes without support for the shutdown relay device, the host device will be enumerated as a new device to the guest and will be used directly. If the resume occurs with support, it will just be setup again. This does mean the guest will see device removal/arrival around operations like servicing. The logic for dealing with the shutdown relay has gotten hefty enough that it has been moved into its own file.