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
2.01k stars 385 forks source link

vioscsi: add logic to make reset mechanism configurable #971

Closed sb-ntnx closed 1 year ago

sb-ntnx commented 1 year ago

We have seen many cases where we see vioscsi 129 reset events leading to a complete guest hang. While overall reset logic added in https://github.com/virtio-win/kvm-guest-drivers-windows/pull/684 likely mitigates the problem, we still see sporadic requests from customer where they see guest OSes hangs.

This change will make it possible configure system to bugcheck and get a memory dump and the state of the VQs.

By default, the behaviour will remain intact - complete pending SRBs, but can be changed to either to do nothing or bugcheck the guest by setting the registry value.

    Path:    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\vioscsi\Parameters
    Name:    VioscsiActionOnReset
    Type:    REG_DWORD
    Values:
             0x0 - Complete all pending SRBs (default)
             0x1 - Do nothing (all unserved SRBs will be stored in memory)
             0xdeaddead - Bugcheck on the reset event

HLK2022 tests completed successfully as expected.