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.06k stars 386 forks source link

virtio-scsi - HLK 1809 storage firmware tests fail #375

Closed rob-scheepens closed 4 years ago

rob-scheepens commented 5 years ago

When running HLK 1809 on vioscsi, the Storage Firmware Update and Storage Firmware HBA Update tests fail. This looks to be related to the driver not implementing IOCTL_STORAGE_FIRMWARE_GET_INFO yet (https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/content/ntddstor/ni-ntddstor-ioctl_storage_firmware_get_info).

Storage Firmware HBA Update log (storfirmware.txt) shows:

Device string in use: $LocalPub:QSize=0($LogFile:file=StorFirmware.wtl,writemode=overwrite,CRC=true;$PlainLog:file=StorFirmware.txt,writemode=overwrite;$Console)
WTTLogger_CPP_GitEnlistment; Version: 2.7.3483.0
Machine: Build=17763.00 
    Platform=AMD64 
    OS=Windows Server 2019 Datacenter 
    ServicePack="" 
    Version=6.3 
    BuildLab="rs5_release" 
    BuildDate=180914-1434 
    Language=English (US) (REDMOND) 
    Config=n/a 

Start: Get device detail information., TUID=
End: Pass, Get device detail information., TUID=, Repro=StorFirmware  -hbatest \\.\PhysicalDrive2 "Enter_Path_and_Name_of_New_Firmware_File"

    Disk 0 : [SAS    ] [HDD] [03 00 01 00] NUTANIX  VDISK               0   
Start: Get firmware information by issuing IOCTL_STORAGE_FIRMWARE_GET_INFO., TUID=
Error: 0x0, Error 0x00000000
    Get Firmware Information - IOCTL_STORAGE_FIRMWARE_GET_INFO Failed. Error code: 1
    File=drivers\storage\tests\storfirmware\firmware.cpp Line=434
End: Fail, Get firmware information by issuing IOCTL_STORAGE_FIRMWARE_GET_INFO., TUID=, Repro=StorFirmware  -hbatest \\.\PhysicalDrive2 "Enter_Path_and_Name_of_New_Firmware_File"

Summary: Total=2, Passed=1, Failed=1, Blocked=0, Warned=0, Skipped=0

Storage Firmware Update log shows:

Device string in use: $LocalPub:QSize=0($LogFile:file=StorFirmware.wtl,writemode=overwrite,CRC=true;$PlainLog:file=StorFirmware.txt,writemode=overwrite;$Console)
WTTLogger_CPP_GitEnlistment; Version: 2.7.3483.0
Machine: Build=17763.00 
    Platform=AMD64 
    OS=Windows Server 2019 Datacenter 
    ServicePack="" 
    Version=6.3 
    BuildLab="rs5_release" 
    BuildDate=180914-1434 
    Language=English (US) (REDMOND) 
    Config=n/a 

Start: Get device detail information., TUID=
End: Pass, Get device detail information., TUID=, Repro=StorFirmware  -test \\.\PhysicalDrive2 "Enter_Path_and_Name_of_New_Firmware_File"

    Disk 0 : [SAS    ] [HDD] [03 00 01 00] NUTANIX  VDISK               0   
Start: Get firmware information by issuing IOCTL_STORAGE_FIRMWARE_GET_INFO., TUID=

    Support upgrade command: Yes
    Slot Count: 1
    Current Active Slot: 0
    Pending Active Slot: N/A

    Firmware applies to both controller and device: No
    Firmware payload alignment: 4096
    Firmware payload max size: 65536

    Slot ID: 0
    Slot Read Only: No
    Revision: 0   

End: Pass, Get firmware information by issuing IOCTL_STORAGE_FIRMWARE_GET_INFO., TUID=, Repro=StorFirmware  -test \\.\PhysicalDrive2 "Enter_Path_and_Name_of_New_Firmware_File"

Start: Validate firmware upgrade support information., TUID=
End: Pass, Validate firmware upgrade support information., TUID=, Repro=StorFirmware  -test \\.\PhysicalDrive2 "Enter_Path_and_Name_of_New_Firmware_File"

Start: Download firmware to device using IOCTL_STORAGE_FIRMWARE_DOWNLOAD., TUID=
Error: 0x0, Error 0x00000000
    Unable to open handle for firmware image file Enter_Path_and_Name_of_New_Firmware_File.
    File=drivers\storage\tests\storfirmware\firmware.cpp Line=1067
End: Fail, Download firmware to device using IOCTL_STORAGE_FIRMWARE_DOWNLOAD., TUID=, Repro=StorFirmware  -test \\.\PhysicalDrive2 "Enter_Path_and_Name_of_New_Firmware_File"

Summary: Total=4, Passed=3, Failed=1, Blocked=0, Warned=0, Skipped=0
vrozenfe commented 5 years ago

Thank you Rob. We might need to handle IOCTL_SCSI_MINIPORT_FIRMWARE and probably fail it with STOR_STATUS_INVALID_PARAMETER status code. But let me check with QE first to see if they hit this problem.

Best regards, Vadim.

rob-scheepens commented 5 years ago

You're welcome Vadim.

Looks like you already have given this some thought before, see https://github.com/virtio-win/kvm-guest-drivers-windows/issues/152#issuecomment-321472575.

It looks like HLK tests specifically use IOCTL_STORAGE_FIRMWARE_GET_INFO instead of IOCTL_SCSI_MINIPORT_FIRMWARE - not sure why. Perhaps just return STATUS_NOT_SUPPORTED?

Regards, \Rob

vrozenfe commented 5 years ago

I was playing with this issue some time ago but stopped working on it mostly because QE knew the way how to pass submission. Let me check the current WHQL status of with Li Jin and see if I need to finalize and push this code now.

Best, Vadim.

lijinlijin commented 5 years ago

Hi Rob and Vadim,

QE passed scsi whql certification with playlist msft provided, "Storage Firmware Update" and "Storage Firmware HBA Update" are not in the job list after load the playlist.

Anything else, please let me know

rob-scheepens commented 5 years ago

Hi Li Jin, thanks. When I download and select the 1809 Server playlist from https://aka.ms/HLKPlaylist, this still shows the "Storage HBA Firmware Update":

image

What am I missing here?