kvm-guest-drivers-windows
kvm-guest-drivers-windows copied to clipboard
Windows 10 ivshmem BSOD problems
Hello,
I'm experiencing problems with ivshmem which can be installed in windows 10 (windows server 2019) successfuly, but when i use RtlZeroMemory to clean the virtual address which is mapped by MmMapIoSpace function in IVSHMEMEvtDevicePrepareHardware routine the gvm will BSOD, see BUG CHECK in picture
this BSOD only show in specific environment,
we know as this Host Model:HP ProLiant BL460c G7 CPUs:2 * 6 * 2 Cores CPU Model:Intel(R) Xeon(R) CPU X5675 @ 3.07GHz
Hello @YYFUnique ,
Can you please post your QEMU command line and driver version you are using?
Thanks, Yan.
@YYFUnique I suspect you try to do some odd modification of the driver. Device's memory (BAR0) is not intended to random write operation. It should be accessed only as 32-bit operation and only when needed. It is not a "shared memory".
@YYFUnique I suspect you try to do some odd modification of the driver. Device's memory (BAR0) is not intended to random write operation. It should be accessed only as 32-bit operation and only when needed. It is not a "shared memory".
yes, but we just write the memory which length greater than 0x1000. we write the virtual address which is mapped by MmMapIoSpace function in IVSHMEMEvtDevicePrepareHardware routine the gvm will BSOD crash Immediately. In factly, this problem just occurs on specific hardware.
qemu command list: virsh attach-device vmid *.xml --config --live
@YYFUnique I suspect you try to do some odd modification of the driver. Device's memory (BAR0) is not intended to random write operation. It should be accessed only as 32-bit operation and only when needed. It is not a "shared memory".
yes, but we just write the memory which length greater than 0x1000. we write the virtual address which is mapped by MmMapIoSpace function in IVSHMEMEvtDevicePrepareHardware routine the gvm will BSOD crash Immediately. In factly, this problem just occurs on specific hardware.
qemu command list: virsh attach-device vmid *.xml --config --live
This is libvirt command line, it can be also useful - but we need VM configuration file (xml). Eventually libvirt deamon will run QEMU, and we need its command line. Run something like ps -ax | grep qemu
to get it.
Thanks.
@YYFUnique I suspect you try to do some odd modification of the driver. Device's memory (BAR0) is not intended to random write operation. It should be accessed only as 32-bit operation and only when needed. It is not a "shared memory".
yes, but we just write the memory which length greater than 0x1000. we write the virtual address which is mapped by MmMapIoSpace function in IVSHMEMEvtDevicePrepareHardware routine the gvm will BSOD crash Immediately. In factly, this problem just occurs on specific hardware. qemu command list: virsh attach-device vmid *.xml --config --live
This is libvirt command line, it can be also useful - but we need VM configuration file (xml). Eventually libvirt deamon will run QEMU, and we need its command line. Run something like
ps -ax | grep qemu
to get it.Thanks.
here it is , use command ps -ax | grep qemu /usr/bin/kvm -name guest=dsha-frontend_win7_x64,debug-threads=on -S -object secret,id=masterKey0,format=raw,file=/var/run/lib/libvirt/qemu/domain-1-dsha-frontend_win7_x/master-key.aes -machine pc-i440fx-2.12,accel=kvm,usb=off,system=windows,dump-guest-core=off -cpu qemu64,hv_time,hv_relaxed,hv_vapic,hv_spinlocks=0x1000,hv_vpindex,hv_runtime,hv_synic,hv_stimer,hv_reset -m size=4194304k,slots=10,maxmem=34359738368k -realtime mlock=off -smp 2,maxcpus=48,sockets=48,cores=1,threads=1 -object iothread,id=iothread1 -object iothread,id=iothread2 -object iothread,id=iothread3 -object iothread,id=iothread4 -object iothread,id=iothread5 -object iothread,id=iothread6 -object iothread,id=iothread7 -object iothread,id=iothread8 -object iothread,id=iothread9 -object iothread,id=iothread10 -numa node,nodeid=0,cpus=0-47,mem=4096 -uuid 0a359af6-005c-411b-a39e-cc694a5f4ca6 -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/run/lib/libvirt/qemu/domain-1-dsha-frontend_win7_x/monitor.sock,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -chardev socket,id=charmonitor_cas,path=/var/run/lib/libvirt/qemu/domain-1-dsha-frontend_win7_x/monitor.sock.cas,server,nowait -mon chardev=charmonitor_cas,id=monitor_cas,mode=control -rtc base=localtime,clock=vm,driftfix=slew -no-hpet -no-shutdown -global PIIX4_PM.disable_s3=1 -global PIIX4_PM.disable_s4=1 -boot strict=on -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -device usb-ehci,id=usb1,bus=pci.0,addr=0x4 -device nec-usb-xhci,p2=15,p3=15,id=usb2,bus=pci.0,addr=0x5 -device virtio-scsi-pci,id=scsi1,bus=pci.0,addr=0x6 -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x7 -device usb-hub,id=hub0,bus=usb.0,port=1 -drive file=/vms/images/Windows_7_x64,format=qcow2,if=none,id=drive-virtio-disk0,cache=directsync,aio=native -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x8,pci_hotpluggable=on,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 -drive file=/vms/isos/virtio-win7.vfd,format=raw,if=none,id=drive-fdc0-0-0,readonly=on,cache=none,aio=native -global isa-fdc.driveA=drive-fdc0-0-0 -global isa-fdc.bootindexA=4 -drive if=none,id=drive-ide0-0-0,readonly=on -device ide-cd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=2 -netdev tap,fd=55,id=hostnet0,vhost=on,vhostfd=56 -device virtio-net-pci,pci_hotpluggable=on,netdev=hostnet0,id=net0,mac=0c:da:41:1d:89:ef,bus=pci.0,addr=0x3,bootindex=3 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -chardev socket,id=charchannel0,path=/var/lib/libvirt/qemu/dsha-frontend_win7_x64.agent,server,nowait -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=org.qemu.guest_agent.0 -chardev socket,id=charchannel1,path=/var/lib/libvirt/qemu/dsha-frontend_win7_x64-asiainfo.agent,server,nowait -device virtserialport,bus=virtio-serial0.0,nr=2,chardev=charchannel1,id=channel1,name=org.qemu.guest_agent_asiainfo.0 -device usb-tablet,id=input0,bus=usb.0,port=2 -vnc 0.0.0.0:0 -device VGA,id=video0,vgamem_mb=64,bus=pci.0,addr=0x2 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x9 -object memory-backend-file,id=shmmem-shmem0,mem-path=/dev/shm/0a359af6-005c-411b-a39e-cc694a5f4ca6,size=8388608,share=yes -device ivshmem-plain,id=shmem0,memdev=shmmem-shmem0,master=on,bus=pci.0,addr=0x1f -msg timestamp=on
@YYFUnique Hi! Can you please provide a simple code that you run when getting BSOD?
Closing as no response was received. @YYFUnique @kostyanf14 please reopen if the problem still happens.