Closed MartinDrab closed 8 months ago
@MartinDrab
Thanks, Looks good to me with only one comment. Can we add some log message in the case when we break VIOSerialSendCtrlMsg while loop on "if (!LongWaitAllowed)" ?
Best, Vadim.
@MartinDrab
Thanks, Looks good to me with only one comment. Can we add some log message in the case when we break VIOSerialSendCtrlMsg while loop on "if (!LongWaitAllowed)" ?
Best, Vadim.
Some log messages added.
@MartinDrab Did you see my comments?
@MartinDrab Did you see my comments?
I saw only these in the Conversation tab of this PR. I seem to see none in Files Changed. Or, should I look elsewhere as well?
Please check now. If you still don't see them, try this link https://github.com/virtio-win/kvm-guest-drivers-windows/pull/991/files/1dba5071ff660339f1da045eda8071dd604bf1f2
Please check now. If you still don't see them, try this link https://github.com/virtio-win/kvm-guest-drivers-windows/pull/991/files/1dba5071ff660339f1da045eda8071dd604bf1f2
Good! I can see them now.
This PR prevents the VirtIO Serial Driver from potentially infinitely waiting for the hypervisor when switching to the
WdfPowerDeviceD3Final
power state (that happens when the system is being shut down, or the device is being removed). In such case, theXxxEvtDeviceD0Exit
callback routine must complete within certain time interval. That is achieved by enhancingVIOSerialSendCtrlMsg
with an extra parameter determining whether long waits are possible.