Bug 1965167

Summary: [viogpudo] Win2012R2 hit bsod after operations signtool&sigverf viogpudo driver
Product: Red Hat Enterprise Linux 9 Reporter: dehanmeng <demeng>
Component: virtio-winAssignee: Vadim Rozenfeld <vrozenfe>
virtio-win sub component: virtio-win-prewhql QA Contact: dehanmeng <demeng>
Status: CLOSED CURRENTRELEASE Docs Contact:
Severity: high    
Priority: high CC: juzhang, lijin, mdean, vrozenfe, ymankad, yvugenfi
Version: 9.0   
Target Milestone: beta   
Target Release: 9.0   
Hardware: x86_64   
OS: Windows   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-08-16 13:39:15 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1936265    
Bug Blocks:    

Description dehanmeng 2021-05-27 04:00:34 UTC
Description of problem:
After installing viogpudo driver, I tried to use signtool.exe&sigverf to sign viogpudo driver, but guest hit bsod situation directly when I tried to reboot/shutdown it.

Version-Release number of selected component (if applicable):
RHEL-8.5.0-20210506.n.0
qemu-kvm-6.0.0-16.module+el8.5.0+10848+2dccc46d.x86_64
kernel-4.18.0-305.1.el8.x86_64
seabios-bin-1.14.0-1.module+el8.4.0+8855+a9e237a9.noarch
virtio-win-prewhql-199.iso

How reproducible:
100%

Steps to Reproduce:
1.bootup guest with following qemu-cli
/usr/libexec/qemu-kvm \
    -name 'win2012R2'  \
    -sandbox on  \
    -machine q35 \
    -device pcie-root-port,id=pcie-root-port-0,multifunction=on,bus=pcie.0,addr=0x1,chassis=1 \
    -device pcie-pci-bridge,id=pcie-pci-bridge-0,addr=0x0,bus=pcie-root-port-0  \
    -nodefaults \
    -device virtio-vga,id=video0 \
    -m 4096  \
    -smp 10,maxcpus=10,cores=5,threads=1,dies=1,sockets=2  \
    -cpu Skylake-Server,hv_stimer,hv_synic,hv_time,hv_vpindex,hv_relaxed,hv_spinlocks=0xfff,hv_vapic,hv_frequencies,hv_runtime,hv_tlbflush,hv_reenlightenment,hv_stimer_direct,hv_ipi \
    -device pvpanic,ioport=0x505,id=idAw3tKn \
    -device pcie-root-port,id=pcie-root-port-1,port=0x1,addr=0x1.0x1,bus=pcie.0,chassis=2 \
    -device qemu-xhci,id=usb1,bus=pcie-root-port-1,addr=0x0 \
    -device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1 \
    -device pcie-root-port,id=pcie-root-port-2,port=0x2,addr=0x1.0x2,bus=pcie.0,chassis=3 \
    -device virtio-scsi-pci,id=virtio_scsi_pci0,bus=pcie-root-port-2,addr=0x0 \
    -blockdev node-name=file_image1,driver=file,auto-read-only=on,discard=unmap,aio=threads,filename=win2012-64-virtio-scsi.qcow2,cache.direct=on,cache.no-flush=off \
    -blockdev node-name=drive_image1,driver=qcow2,read-only=off,cache.direct=on,cache.no-flush=off,file=file_image1 \
    -device scsi-hd,id=image1,drive=drive_image1,write-cache=on \
    -device pcie-root-port,id=pcie-root-port-3,port=0x3,addr=0x1.0x3,bus=pcie.0,chassis=4 \
    -device virtio-net-pci,mac=9a:aa:3c:f4:36:fb,id=iddZeBQu,netdev=idDOmGd4,bus=pcie-root-port-3,addr=0x0  \
    -netdev tap,id=idDOmGd4,vhost=on \
    -cdrom /home/kvm_autotest_root/iso/windows/virtio-win-prewhql-0.1-199.iso \
    -vnc :9  \
    -chardev socket,server=on,wait=off,path=/tmp/avocado_wojsvlg0/monitor-qmpmonitor1-20210522-021250-p57eGDBS,id=qmp_id_qmpmonitor1  \
    -mon chardev=qmp_id_qmpmonitor1,mode=control \
    -rtc base=localtime,clock=host,driftfix=slew  \
    -boot menu=off,order=cdn,once=c,strict=off \
    -enable-kvm \
2. install driver via device manager
3. sign driver
  1). verifier /flags 0x008209BB /driver viogpudo.sys
  2). SignTool.exe verify /v /kp /c viogpudo.cat viogpudo.sys
  3). SignTool.exe verify /v /kp /c viogpudo.cat viogpudo.inf
  4). sigverif --> click "Start"
4. reboot/shutdown guest

Actual results:
windows bsod.
Expected results:
VM should be reboot/shutdown successfully.
Additional info:

Comment 2 Vadim Rozenfeld 2021-05-28 02:10:16 UTC
the crash pattern is very similar to https://bugzilla.redhat.com/show_bug.cgi?id=1965159
Hopefully the same fix will fix this problem as well
the fix included into
https://github.com/virtio-win/kvm-guest-drivers-windows/pull/586

Comment 5 dehanmeng 2021-06-09 07:41:13 UTC
Hi Vadim, 
I tried win2012R2-pc/q35 five times with the virtio-win-prewhql-200, the steps are same as comment , BSOD is gone, the guest can reboot/shutdown successfully. thanks for your effort. 

Thanks
Dehan Meng

Comment 6 Vadim Rozenfeld 2021-06-09 08:05:16 UTC
(In reply to dehanmeng from comment #5)
> Hi Vadim, 
> I tried win2012R2-pc/q35 five times with the virtio-win-prewhql-200, the
> steps are same as comment , BSOD is gone, the guest can reboot/shutdown
> successfully. thanks for your effort. 
> 
> Thanks
> Dehan Meng

Hi Dehan,

Thank a lot for your feedback.

Best,
Vadim.