virtio-win / kvm-guest-drivers-windows

Windows paravirtualized drivers for QEMU\KVM
https://www.linux-kvm.org/page/WindowsGuestDrivers
BSD 3-Clause "New" or "Revised" License
1.92k stars 377 forks source link

Vioser: Do not wait infinitely when power down or removal is imminent #991

Closed MartinDrab closed 8 months ago

MartinDrab commented 9 months ago

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, the XxxEvtDeviceD0Exit callback routine must complete within certain time interval. That is achieved by enhancing VIOSerialSendCtrlMsg with an extra parameter determining whether long waits are possible.

vrozenfe commented 9 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 commented 9 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.

Some log messages added.

YanVugenfirer commented 8 months ago

@MartinDrab Did you see my comments?

MartinDrab commented 8 months ago

@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?

YanVugenfirer commented 8 months ago

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

MartinDrab commented 8 months ago

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.

YanVugenfirer commented 6 months ago

Solves https://issues.redhat.com/browse/RHEL-1217