tenclass / mvisor-win-vgpu-driver

Implementation of OpenGL on windows guest virtual machine using Mesa/Virgl protocol.
GNU General Public License v3.0
114 stars 21 forks source link

vgpu not detected by GpuTest #2

Open purplepalmdash opened 11 months ago

purplepalmdash commented 11 months ago

Hi, I installed the prebuilt driver in win10 vm, but gputest could not use this device, during the test it shows nothing then exit.

2023_10_10_11_21_25_1311x722

From the issue #1 you could see GpuTest could detect graphical infos during testing , but in my vm it show nothing, just a blank window then exit.

From the mvisor's log I couldn't find any log related to virtio_vgpu.cc like in #1

Mvisor VGPU device seems OK in device manager:

2023_10_10_11_27_15_617x586

My enviroment is listed as following:

# uname -a
Linux vir8 4.18.0-514.el8.x86_64 #1 SMP Tue Sep 19 13:19:58 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
# cat /etc/redhat-release 
CentOS Stream release 8
# lspci | grep -i vga
0000:01:00.0 VGA compatible controller: NVIDIA Corporation TU116 [GeForce GTX 1660 SUPER] (rev a1)
# /usr/bin/mvisor --version
MVisor: 2.5.2
Copyright (C) 2022 Terrence <terrence@tenclass.com>.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law
# ldd /usr/bin/mvisor | grep -i virgl
    libvirglrenderer.so.1 => /lib64/libvirglrenderer.so.1 (0x00007f16797a2000)
# ls -l -h /lib64/libvirglrenderer.so.1
lrwxrwxrwx. 1 root root 25 Oct 10 11:09 /lib64/libvirglrenderer.so.1 -> libvirglrenderer.so.1.8.8

nvidia-smi output:

[root@vir8 ~]# nvidia-smi 
Tue Oct 10 11:30:03 2023       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 525.125.06   Driver Version: 525.125.06   CUDA Version: 12.0     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  Off  | 00000000:01:00.0  On |                  N/A |
| 23%   34C    P8    10W / 125W |    314MiB /  6144MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A      2759      G   /usr/libexec/Xorg                  87MiB |
|    0   N/A  N/A      2880      G   /usr/bin/gnome-shell               23MiB |
|    0   N/A  N/A     24637      G   mvisor                            199MiB |
+-----------------------------------------------------------------------------+

vgpu config:

  - class: virtio-vgpu
    memory: 1G
    staging: Yes
    blob: Yes
    node: /dev/dri/renderD129

# lspci | grep -i vga
0000:01:00.0 VGA compatible controller: NVIDIA Corporation TU116 [GeForce GTX 1660 SUPER] (rev a1)
# ls -l -h /dev/dri/by-path/
total 0
lrwxrwxrwx. 1 root root  8 Oct 10 11:05 pci-0000:00:02.0-card -> ../card0
lrwxrwxrwx. 1 root root 13 Oct 10 11:05 pci-0000:00:02.0-render -> ../renderD128
lrwxrwxrwx. 1 root root  8 Oct 10 11:05 pci-0000:01:00.0-card -> ../card1
lrwxrwxrwx. 1 root root 13 Oct 10 11:05 pci-0000:01:00.0-render -> ../renderD129

Any suggestions?

nooodles2023 commented 11 months ago

Can you post the mvisor log? did it output some error information?

purplepalmdash commented 11 months ago

mvisor -c default.yaml 2>&1 | tee mvisor.log

# cat mvisor.log 
[0.000] ../core/memory_manager.cc:300 Map() debug: map region EPT+TSS gpa=0xfeffc000 size=0x4000 type=0x0
[0.014] ../core/memory_manager.cc:88 InitializeSystemRam() debug: RAM size: 8192 MB
[0.020] ../core/memory_manager.cc:300 Map() debug: map region System gpa=0x0 size=0x80000000 type=0x1
[0.389] ../core/memory_manager.cc:300 Map() debug: map region System gpa=0x100000000 size=0x180000000 type=0x1
[2.449] ../core/memory_manager.cc:300 Map() debug: map region SeaBIOS gpa=0xc0000 size=0x40000 type=0x1
[2.805] ../core/memory_manager.cc:300 Map() debug: map region SeaBIOS gpa=0xfffc0000 size=0x40000 type=0x1
[3.076] ../core/device.cc:62 Connect() debug: piix3 <= cmos
[3.084] ../core/device.cc:62 Connect() debug: piix3 <= debug-console
[3.090] ../core/memory_manager.cc:300 Map() debug: map region HPET gpa=0xfed00000 size=0x400 type=0x2
[3.094] ../core/device.cc:62 Connect() debug: piix3 <= dummy-device
[3.098] ../core/device.cc:62 Connect() debug: piix3 <= firmware-config
[3.120] ../core/device.cc:62 Connect() debug: piix3 <= ps2
[3.123] ../core/device.cc:62 Connect() debug: piix3 <= i8257-dma
[3.124] ../core/device.cc:62 Connect() debug: piix3 <= i82078-fdc
[3.127] ../core/device_manager.cc:157 RegisterDevice() debug: register PCI piix3 at 0:1.0
[3.128] ../core/device.cc:62 Connect() debug: i440fx-host <= piix3
[3.130] ../core/device_manager.cc:157 RegisterDevice() debug: register PCI piix3-ide at 0:1.1
[3.133] ../core/device.cc:62 Connect() debug: i440fx-host <= piix3-ide
[3.135] ../core/device.cc:62 Connect() debug: piix3-uhci <= usb-tablet
[3.137] ../core/device_manager.cc:157 RegisterDevice() debug: register PCI piix3-uhci at 0:1.2
[3.137] ../core/device.cc:62 Connect() debug: i440fx-host <= piix3-uhci
[3.139] ../core/device_manager.cc:157 RegisterDevice() debug: register PCI piix4-pm at 0:1.3
[3.141] ../core/device.cc:62 Connect() debug: i440fx-host <= piix4-pm
[3.143] ../core/device_manager.cc:157 RegisterDevice() debug: register PCI ac97 at 0:2.0
[3.144] ../core/device.cc:62 Connect() debug: i440fx-host <= ac97
[3.174] ../core/device_manager.cc:157 RegisterDevice() debug: register PCI qxl at 0:3.0
[3.177] ../core/memory_manager.cc:300 Map() debug: map region VGA MMIO gpa=0xa0000 size=0x20000 type=0x2
[3.192] ../core/device.cc:62 Connect() debug: i440fx-host <= qxl
[3.199] ../core/device.cc:62 Connect() debug: virtio-console <= spice-agent
[3.200] ../core/device.cc:62 Connect() debug: virtio-console <= qemu-guest-agent
[3.203] ../core/device_manager.cc:157 RegisterDevice() debug: register PCI virtio-console at 0:4.0
[3.204] ../core/device.cc:62 Connect() debug: i440fx-host <= virtio-console
[3.209] ../core/device_manager.cc:157 RegisterDevice() debug: register PCI virtio-network at 0:5.0
[3.210] ../core/device.cc:62 Connect() debug: i440fx-host <= virtio-network
[3.565] ../core/device_manager.cc:157 RegisterDevice() debug: register PCI virtio-block at 0:6.0
[3.568] ../core/device.cc:62 Connect() debug: i440fx-host <= virtio-block
[3.578] ../core/device_manager.cc:157 RegisterDevice() debug: register PCI virtio-vgpu at 0:7.0
[3.579] ../core/device.cc:62 Connect() debug: i440fx-host <= virtio-vgpu
[3.581] ../core/device_manager.cc:157 RegisterDevice() debug: register PCI i440fx-host at 0:0.0
[3.584] ../core/device.cc:62 Connect() debug: system-root <= i440fx-host
[3.585] ../core/device.cc:62 Connect() debug: system-root <= kvm-clock
[4.304] ../core/vcpu.cc:506 Process() debug: mvisor-vcpu-0 started
[4.318] ../core/vcpu.cc:506 Process() debug: mvisor-vcpu-1 started
[4.324] ../core/vcpu.cc:506 Process() debug: mvisor-vcpu-2 started
[4.346] ../core/vcpu.cc:506 Process() debug: mvisor-vcpu-3 started
[95.709] ../core/device_manager.cc:462 HandleIo() debug: pio count=1  mmio count=0
SeaBIOS (version rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org)
BUILD: gcc: (GCC) 11.2.1 20210728 (Red Hat Cross 11.2.1-1) binutils: version 2.37-3.fc35
No Xen hypervisor found.
Running on QEMU (i440fx)
Found QEMU fw_cfg
QEMU fw_cfg DMA interface supported
qemu/e820: addr 0x0000000000000000 len 0x0000000080000000 [RAM]
qemu/e820: addr 0x0000000100000000 len 0x0000000180000000 [RAM]
Relocating init from 0x000d4c00 to 0x7ffab420 (size 84800)
=== PCI bus & bridge init ===
PCI: pci_bios_init_bus_rec bus = 0x0
=== PCI device probing ===
Found 11 PCI devices (max PCI bus is 00)
=== PCI new allocation pass #1 ===
PCI: check devices
=== PCI new allocation pass #2 ===
PCI: IO: c000 - c64f
PCI: 32: 0000000080000000 - 00000000fec00000
PCI: map device bdf=00:02.0  bar 0, addr 0000c000, size 00000400 [io]
PCI: map device bdf=00:02.0  bar 1, addr 0000c400, size 00000100 [io]
PCI: map device bdf=00:04.0  bar 0, addr 0000c500, size 00000040 [io]
PCI: map device bdf=00:05.0  bar 0, addr 0000c540, size 00000040 [io]
PCI: map device bdf=00:06.0  bar 0, addr 0000c580, size 00000040 [io]
PCI: map device bdf=00:07.0  bar 0, addr 0000c5c0, size 00000040 [io]
PCI: map device bdf=00:01.2  bar 4, addr 0000c600, size 00000020 [io]
PCI: map device bdf=00:03.0  bar 3, addr 0000c620, size 00000020 [io]
PCI: map device bdf=00:01.1  bar 4, addr 0000c640, size 00000010 [io]
PCI: map device bdf=00:03.0  bar 6, addr febd0000, size 00010000 [mem]
[99.951] ../core/memory_manager.cc:300 Map() debug: map region PCI ROM gpa=0xfebd0000 size=0x10000 type=0x3
PCI: map device bdf=00:04.0  bar 4, addr febe0000, size 00004000 [mem]
[100.077] ../core/memory_manager.cc:300 Map() debug: map region PCI BAR MMIO gpa=0xfebe0000 size=0x4000 type=0x2
PCI: map device bdf=00:05.0  bar 4, addr febe4000, size 00004000 [mem]
[100.181] ../core/memory_manager.cc:300 Map() debug: map region PCI BAR MMIO gpa=0xfebe4000 size=0x4000 type=0x2
PCI: map device bdf=00:06.0  bar 4, addr febe8000, size 00004000 [mem]
[100.284] ../core/memory_manager.cc:300 Map() debug: map region PCI BAR MMIO gpa=0xfebe8000 size=0x4000 type=0x2
PCI: map device bdf=00:07.0  bar 4, addr febec000, size 00004000 [mem]
[100.387] ../core/memory_manager.cc:300 Map() debug: map region PCI BAR MMIO gpa=0xfebec000 size=0x4000 type=0x2
PCI: map device bdf=00:04.0  bar 1, addr febf0000, size 00001000 [mem]
[100.490] ../core/memory_manager.cc:300 Map() debug: map region PCI BAR MMIO gpa=0xfebf0000 size=0x1000 type=0x2
PCI: map device bdf=00:05.0  bar 1, addr febf1000, size 00001000 [mem]
[100.593] ../core/memory_manager.cc:300 Map() debug: map region PCI BAR MMIO gpa=0xfebf1000 size=0x1000 type=0x2
PCI: map device bdf=00:06.0  bar 1, addr febf2000, size 00001000 [mem]
[100.697] ../core/memory_manager.cc:300 Map() debug: map region PCI BAR MMIO gpa=0xfebf2000 size=0x1000 type=0x2
PCI: map device bdf=00:07.0  bar 1, addr febf3000, size 00001000 [mem]
[100.800] ../core/memory_manager.cc:300 Map() debug: map region PCI BAR MMIO gpa=0xfebf3000 size=0x1000 type=0x2
PCI: map device bdf=00:03.0  bar 0, addr e0000000, size 10000000 [prefmem]
PCI: map device bdf=00:03.0  bar 1, addr f0000000, size 01000000 [prefmem]
PCI: map device bdf=00:03.0  bar 2, addr f1000000, size 00002000 [prefmem]
PCI: init bdf=00:00.0 id=8086:1237
PCI: init bdf=00:01.0 id=8086:7000
PIIX3/PIIX4 init: elcr=00 0c
PCI: init bdf=00:01.1 id=8086:7010
PCI: init bdf=00:01.2 id=8086:7020
PCI: init bdf=00:01.3 id=8086:7113
Using pmtimer, ioport 0xb008
PCI: init bdf=00:02.0 id=8086:2415
PCI: init bdf=00:03.0 id=1b36:0100
[101.639] ../core/memory_manager.cc:300 Map() debug: map region PCI BAR RAM gpa=0xe0000000 size=0x10000000 type=0x1
[101.699] ../core/memory_manager.cc:300 Map() debug: map region PCI BAR RAM gpa=0xf0000000 size=0x1000000 type=0x1
[101.712] ../core/memory_manager.cc:300 Map() debug: map region PCI BAR RAM gpa=0xf1000000 size=0x2000 type=0x1
[101.723] ../core/device_manager.cc:322 RegisterIoEvent() debug: qxl register IO event address=0xc620 length=0 fd=32
[101.732] ../core/device_manager.cc:322 RegisterIoEvent() debug: qxl register IO event address=0xc621 length=0 fd=33
PCI: init bdf=00:04.0 id=1af4:1003
PCI: init bdf=00:05.0 id=1af4:1000
PCI: init bdf=00:06.0 id=1af4:1001
PCI: init bdf=00:07.0 id=1af4:105b
PCI: Using 00:03.0 for primary VGA
handle_smp: apic_id=0x3
handle_smp: apic_id=0x1
handle_smp: apic_id=0x2
Found 4 cpu(s) max supported 4 cpu(s)
Copying PIR from 0x7ffbfc40 to 0x000f5c80
Copying MPTABLE from 0x00006d00/7ffa27d0 to 0x000f5b70
Copying SMBIOS from 0x00006d00 to 0x000f5af0
[102.744] ../devices/superio/dummy.cc:117 Read() debug: MMIO ignore HPET read base=0xfed00000 offset=0x0 size=4
[102.749] ../devices/superio/dummy.cc:117 Read() debug: MMIO ignore HPET read base=0xfed00000 offset=0x4 size=4
ACPI DSDT=0x7fffe310
Copying ACPI RSDP from 0x00006cdc to 0x000f5ad0
Scan for VGA option rom
Running option rom at c000:0003
Start SeaVGABIOS (version rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org)
VGABUILD: gcc: (GCC) 11.2.1 20210728 (Red Hat Cross 11.2.1-1) binutils: version 2.37-3.fc35
enter vga_post:
   a=00000018  b=0000ffff  c=00000000  d=0000ffff ds=0000 es=f000 ss=0000
  si=00000000 di=00006060 bp=00000000 sp=00006d1a cs=f000 ip=d04a  f=0000
VBE DISPI: bdf 00:03.0, bar 0
VBE DISPI: lfb_addr=e0000000, size 256 MB
Attempting to allocate 512 bytes lowmem via pmm call to f000:d104
pmm call arg1=0
VGA stack allocated at e8c80
Turning on vga text mode console
set VGA mode 3
SeaBIOS (version rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org)
UHCI init on dev 00:01.2 (io=c600)
ATA controller 1 at 1f0/3f4/0 (irq 14 dev 9)
ATA controller 2 at 170/374/0 (irq 15 dev 9)
Searching bootorder for: HALT
found virtio-blk at 00:06.0
pci dev 00:06.0 virtio cap at 0x84 type 5 [pci cfg access]
pci dev 00:06.0 virtio cap at 0x70 type 2 bar 4 at 0xfebe8000 off +0x3000 [mmio]
pci dev 00:06.0 virtio cap at 0x60 type 4 bar 4 at 0xfebe8000 off +0x2000 [mmio]
pci dev 00:06.0 virtio cap at 0x50 type 3 bar 4 at 0xfebe8000 off +0x1000 [mmio]
pci dev 00:06.0 virtio cap at 0x40 type 1 bar 4 at 0xfebe8000 off +0x0000 [mmio]
pci dev 00:06.0 using modern (1.0) virtio mode
[113.097] ../core/device_manager.cc:322 RegisterIoEvent() debug: virtio-block register IO event address=0xfebeb000 length=0 fd=34
Searching bootorder for: /pci@i0cf8/*@6
Searching bios-geometry for: /pci@i0cf8/*@6
[113.290] ../devices/superio/dummy.cc:117 Read() debug: PIO ignore Parallel LPT2 read base=0x378 offset=0x2 size=1
[113.293] ../devices/superio/dummy.cc:108 Write() debug: PIO ignore Parallel LPT2 write base=0x378 offset=0x2 data=0xab01df size=1
[113.296] ../devices/superio/dummy.cc:108 Write() debug: PIO ignore Parallel LPT2 write base=0x378 offset=0x0 data=0xab01aa size=1
[113.298] ../devices/superio/dummy.cc:117 Read() debug: PIO ignore Parallel LPT2 read base=0x378 offset=0x0 size=1
[113.301] ../devices/superio/dummy.cc:117 Read() debug: PIO ignore Parallel LPT1 read base=0x278 offset=0x2 size=1
[113.304] ../devices/superio/dummy.cc:108 Write() debug: PIO ignore Parallel LPT1 write base=0x278 offset=0x2 data=0xab01df size=1
[113.306] ../devices/superio/dummy.cc:108 Write() debug: PIO ignore Parallel LPT1 write base=0x278 offset=0x0 data=0xab01aa size=1
[113.308] ../devices/superio/dummy.cc:117 Read() debug: PIO ignore Parallel LPT1 read base=0x278 offset=0x0 size=1
Found 0 lpt ports
[113.336] ../core/device_manager.cc:479 HandleIo() debug: unhandled io out port: 0x3f9 size: 1 data: 0000000000ab01ff count: 1
[113.339] ../core/device_manager.cc:479 HandleIo() debug: unhandled io in port: 0x3f9 size: 1 data: 0000000000ab01ff count: 1
[113.342] ../core/device_manager.cc:479 HandleIo() debug: unhandled io out port: 0x2f9 size: 1 data: 0000000000ab01ff count: 1
[113.345] ../core/device_manager.cc:479 HandleIo() debug: unhandled io in port: 0x2f9 size: 1 data: 0000000000ab01ff count: 1
[113.348] ../core/device_manager.cc:479 HandleIo() debug: unhandled io out port: 0x3e9 size: 1 data: 0000000000ab01ff count: 1
[113.351] ../core/device_manager.cc:479 HandleIo() debug: unhandled io in port: 0x3e9 size: 1 data: 0000000000ab01ff count: 1
[113.354] ../core/device_manager.cc:479 HandleIo() debug: unhandled io out port: 0x2e9 size: 1 data: 0000000000ab01ff count: 1
[113.356] ../core/device_manager.cc:479 HandleIo() debug: unhandled io in port: 0x2e9 size: 1 data: 0000000000ab01ff count: 1
Found 0 serial ports
PS2 keyboard initialized
All threads complete.
Scan for option roms
Searching bootorder for: HALT
drive 0x000e8c10: PCHS=0/0/0 translation=lba LCHS=1024/255/63 s=167772160
Space available for UMB: ca000-e8800, f5500-f5a90
Returned 237568 bytes of ZoneHigh
e820 map has 8 items:
  0: 0000000000000000 - 000000000009fc00 = 1 RAM
  1: 000000000009fc00 - 00000000000a0000 = 2 RESERVED
  2: 00000000000f0000 - 0000000000100000 = 2 RESERVED
  3: 0000000000100000 - 000000007fffa000 = 1 RAM
  4: 000000007fffa000 - 0000000080000000 = 2 RESERVED
  5: 00000000feffc000 - 00000000ff000000 = 2 RESERVED
  6: 00000000fffc0000 - 0000000100000000 = 2 RESERVED
  7: 0000000100000000 - 0000000280000000 = 1 RAM
enter handle_19:
  NULL
Booting from Hard Disk...
Booting from 0000:7c00
VBE current mode=3
VBE mode info request: 3
VBE mode info request: 100
VBE mode info request: 101
VBE mode info request: 102
VBE mode info request: 103
VBE mode info request: 104
VBE mode info request: 105
VBE mode info request: 106
VBE mode info request: 107
VBE mode info request: 10d
VBE mode info request: 10e
VBE mode info request: 10f
VBE mode info request: 110
VBE mode info request: 111
VBE mode info request: 112
VBE mode info request: 113
VBE mode info request: 114
VBE mode info request: 115
VBE mode info request: 116
VBE mode info request: 117
VBE mode info request: 118
VBE mode set: 4118
set VGA mode 118
[380.666] ../core/memory_manager.cc:300 Map() debug: map region VGA RAM gpa=0xa0000 size=0x20000 type=0x1
VBE mode info request: 118
VBE current mode=4118
VBE current mode=4118
VBE mode info request: 118
VBE mode info request: 100
VBE mode info request: 101
VBE mode info request: 102
VBE mode info request: 103
VBE mode info request: 104
VBE mode info request: 105
VBE mode info request: 106
VBE mode info request: 107
VBE mode info request: 10d
VBE mode info request: 10e
VBE mode info request: 10f
VBE mode info request: 110
VBE mode info request: 111
VBE mode info request: 112
VBE mode info request: 113
VBE mode info request: 114
VBE mode info request: 115
VBE mode info request: 116
VBE mode info request: 117
VBE mode info request: 118
VBE mode info request: 118
[999.586] ../core/vcpu.cc:429 ProcessHyperV() debug: msr_hv_synic_msg_page = 0x16001
[1177.344] ../core/device_manager.cc:462 HandleIo() debug: pio count=209515  mmio count=36179
[1232.423] ../core/vcpu.cc:429 ProcessHyperV() debug: msr_hv_synic_msg_page = 0x17001
[1233.202] ../core/vcpu.cc:429 ProcessHyperV() debug: msr_hv_synic_msg_page = 0x18001
[1234.266] ../core/vcpu.cc:429 ProcessHyperV() debug: msr_hv_synic_msg_page = 0x19001
[1502.800] ../core/device_manager.cc:479 HandleIo() debug: unhandled io in port: 0xafe0 size: 1 data: 00000000000000ff count: 1
[1502.814] ../core/device_manager.cc:479 HandleIo() debug: unhandled io out port: 0xafe0 size: 1 data: 00000000000000ff count: 1
[1502.817] ../core/device_manager.cc:479 HandleIo() debug: unhandled io in port: 0xafe1 size: 1 data: 00000000000000ff count: 1
[1502.821] ../core/device_manager.cc:479 HandleIo() debug: unhandled io out port: 0xafe1 size: 1 data: 00000000000000ff count: 1
[1502.824] ../core/device_manager.cc:479 HandleIo() debug: unhandled io out port: 0xafe2 size: 1 data: 00000000000000ff count: 1
[1502.827] ../core/device_manager.cc:479 HandleIo() debug: unhandled io out port: 0xafe3 size: 1 data: 00000000000000ff count: 1
[1503.023] ../core/device_manager.cc:479 HandleIo() debug: unhandled io out port: 0xafe2 size: 1 data: 00000000000000ff count: 1
[1503.030] ../core/device_manager.cc:479 HandleIo() debug: unhandled io out port: 0xafe3 size: 1 data: 00000000000000ff count: 1
[1503.035] ../core/device_manager.cc:479 HandleIo() debug: unhandled io in port: 0xafe0 size: 1 data: 00000000000000ff count: 1
[1503.039] ../core/device_manager.cc:479 HandleIo() debug: unhandled io out port: 0xafe0 size: 1 data: 00000000000000ff count: 1
[1503.043] ../core/device_manager.cc:479 HandleIo() debug: unhandled io in port: 0xafe1 size: 1 data: 00000000000000ff count: 1
[1503.046] ../core/device_manager.cc:479 HandleIo() debug: unhandled io out port: 0xafe1 size: 1 data: 00000000000000ff count: 1
[1503.285] ../core/device_manager.cc:479 HandleIo() debug: unhandled io out port: 0xafe2 size: 1 data: 00000000000000ff count: 1
[1503.288] ../core/device_manager.cc:479 HandleIo() debug: unhandled io out port: 0xafe3 size: 1 data: 00000000000000ff count: 1
[1503.515] ../devices/superio/dummy.cc:117 Read() debug: MMIO ignore HPET read base=0xfed00000 offset=0x0 size=4
[1503.530] ../devices/superio/dummy.cc:117 Read() debug: MMIO ignore HPET read base=0xfed00000 offset=0x4 size=4
[1504.799] ../devices/superio/dummy.cc:117 Read() debug: MMIO ignore HPET read base=0xfed00000 offset=0x0 size=4
[1504.807] ../devices/superio/dummy.cc:117 Read() debug: MMIO ignore HPET read base=0xfed00000 offset=0x4 size=4
[1505.134] ../devices/superio/dummy.cc:117 Read() debug: MMIO ignore HPET read base=0xfed00000 offset=0x0 size=4
[1505.147] ../devices/superio/dummy.cc:117 Read() debug: MMIO ignore HPET read base=0xfed00000 offset=0x4 size=4
[1505.747] ../devices/superio/dummy.cc:117 Read() debug: MMIO ignore HPET read base=0xfed00000 offset=0x0 size=4
[1505.755] ../devices/superio/dummy.cc:117 Read() debug: MMIO ignore HPET read base=0xfed00000 offset=0x4 size=4
[1506.036] ../devices/superio/dummy.cc:117 Read() debug: MMIO ignore HPET read base=0xfed00000 offset=0x0 size=4
[1506.044] ../devices/superio/dummy.cc:117 Read() debug: MMIO ignore HPET read base=0xfed00000 offset=0x4 size=4
[1509.045] ../devices/superio/dummy.cc:117 Read() debug: MMIO ignore HPET read base=0xfed00000 offset=0x0 size=4
[1509.055] ../devices/superio/dummy.cc:117 Read() debug: MMIO ignore HPET read base=0xfed00000 offset=0x4 size=4
[1509.274] ../devices/superio/dummy.cc:117 Read() debug: MMIO ignore HPET read base=0xfed00000 offset=0x0 size=4
[1509.278] ../devices/superio/dummy.cc:117 Read() debug: MMIO ignore HPET read base=0xfed00000 offset=0x4 size=4
[1519.330] ../core/memory_manager.cc:312 Unmap() debug: unmap region PCI BAR RAM gpa=0xe0000000 size=10000000 type=1
[1525.657] ../core/memory_manager.cc:312 Unmap() debug: unmap region PCI BAR RAM gpa=0xf0000000 size=1000000 type=1
[1525.693] ../core/memory_manager.cc:312 Unmap() debug: unmap region PCI BAR RAM gpa=0xf1000000 size=2000 type=1
[1525.942] ../core/memory_manager.cc:300 Map() debug: map region PCI BAR RAM gpa=0xe0000000 size=0x10000000 type=0x1
[1526.003] ../core/memory_manager.cc:300 Map() debug: map region PCI BAR RAM gpa=0xf0000000 size=0x1000000 type=0x1
[1526.013] ../core/memory_manager.cc:300 Map() debug: map region PCI BAR RAM gpa=0xf1000000 size=0x2000 type=0x1
[1526.024] ../core/device_manager.cc:322 RegisterIoEvent() debug: qxl register IO event address=0xc620 length=0 fd=32
[1526.031] ../core/device_manager.cc:322 RegisterIoEvent() debug: qxl register IO event address=0xc621 length=0 fd=33
[1526.889] ../core/memory_manager.cc:312 Unmap() debug: unmap region PCI BAR MMIO gpa=0xfebf0000 size=1000 type=2
[1526.893] ../core/memory_manager.cc:312 Unmap() debug: unmap region PCI BAR MMIO gpa=0xfebe0000 size=4000 type=2
[1527.025] ../core/memory_manager.cc:300 Map() debug: map region PCI BAR MMIO gpa=0xfebf0000 size=0x1000 type=0x2
[1527.029] ../core/memory_manager.cc:300 Map() debug: map region PCI BAR MMIO gpa=0xfebe0000 size=0x4000 type=0x2
[1527.369] ../core/memory_manager.cc:312 Unmap() debug: unmap region PCI BAR MMIO gpa=0xfebf1000 size=1000 type=2
[1527.371] ../core/memory_manager.cc:312 Unmap() debug: unmap region PCI BAR MMIO gpa=0xfebe4000 size=4000 type=2
[1527.499] ../core/memory_manager.cc:300 Map() debug: map region PCI BAR MMIO gpa=0xfebf1000 size=0x1000 type=0x2
[1527.502] ../core/memory_manager.cc:300 Map() debug: map region PCI BAR MMIO gpa=0xfebe4000 size=0x4000 type=0x2
[1527.888] ../core/memory_manager.cc:312 Unmap() debug: unmap region PCI BAR MMIO gpa=0xfebf2000 size=1000 type=2
[1527.890] ../core/memory_manager.cc:312 Unmap() debug: unmap region PCI BAR MMIO gpa=0xfebe8000 size=4000 type=2
[1528.019] ../core/memory_manager.cc:300 Map() debug: map region PCI BAR MMIO gpa=0xfebf2000 size=0x1000 type=0x2
[1528.022] ../core/memory_manager.cc:300 Map() debug: map region PCI BAR MMIO gpa=0xfebe8000 size=0x4000 type=0x2
[1528.368] ../core/memory_manager.cc:312 Unmap() debug: unmap region PCI BAR MMIO gpa=0xfebf3000 size=1000 type=2
[1528.371] ../core/memory_manager.cc:312 Unmap() debug: unmap region PCI BAR MMIO gpa=0xfebec000 size=4000 type=2
[1528.500] ../core/memory_manager.cc:300 Map() debug: map region PCI BAR MMIO gpa=0xfebf3000 size=0x1000 type=0x2
[1528.504] ../core/memory_manager.cc:300 Map() debug: map region PCI BAR MMIO gpa=0xfebec000 size=0x4000 type=0x2
[2566.896] ../core/device_manager.cc:462 HandleIo() debug: pio count=34079  mmio count=14
[2583.621] ../core/memory_manager.cc:312 Unmap() debug: unmap region PCI BAR MMIO gpa=0xfebf2000 size=1000 type=2
[2583.632] ../core/memory_manager.cc:312 Unmap() debug: unmap region PCI BAR MMIO gpa=0xfebe8000 size=4000 type=2
[2583.705] ../core/memory_manager.cc:300 Map() debug: map region PCI BAR MMIO gpa=0xfebf2000 size=0x1000 type=0x2
[2583.714] ../core/memory_manager.cc:300 Map() debug: map region PCI BAR MMIO gpa=0xfebe8000 size=0x4000 type=0x2
[2584.752] ../core/device_manager.cc:322 RegisterIoEvent() debug: virtio-block register IO event address=0xfebeb000 length=0 fd=34
[3446.216] ../core/memory_manager.cc:312 Unmap() debug: unmap region PCI BAR RAM gpa=0xe0000000 size=10000000 type=1
[3489.162] ../core/memory_manager.cc:312 Unmap() debug: unmap region PCI BAR RAM gpa=0xf0000000 size=1000000 type=1
[3489.208] ../core/memory_manager.cc:312 Unmap() debug: unmap region PCI BAR RAM gpa=0xf1000000 size=2000 type=1
[3489.275] ../core/device_manager.cc:458 HandleIo() debug: i440fx-host SLOW IO out port=0xcfc size=2 data=80000500 cost=43.062ms
[3489.448] ../core/memory_manager.cc:300 Map() debug: map region PCI BAR RAM gpa=0xe0000000 size=0x10000000 type=0x1
[3489.531] ../core/memory_manager.cc:300 Map() debug: map region PCI BAR RAM gpa=0xf0000000 size=0x1000000 type=0x1
[3489.541] ../core/memory_manager.cc:300 Map() debug: map region PCI BAR RAM gpa=0xf1000000 size=0x2000 type=0x1
[3489.552] ../core/device_manager.cc:322 RegisterIoEvent() debug: qxl register IO event address=0xc620 length=0 fd=32
[3489.559] ../core/device_manager.cc:322 RegisterIoEvent() debug: qxl register IO event address=0xc621 length=0 fd=33
[3491.055] ../core/memory_manager.cc:312 Unmap() debug: unmap region PCI BAR MMIO gpa=0xfebf0000 size=1000 type=2
[3491.063] ../core/memory_manager.cc:312 Unmap() debug: unmap region PCI BAR MMIO gpa=0xfebe0000 size=4000 type=2
[3491.163] ../core/memory_manager.cc:300 Map() debug: map region PCI BAR MMIO gpa=0xfebf0000 size=0x1000 type=0x2
[3491.169] ../core/memory_manager.cc:300 Map() debug: map region PCI BAR MMIO gpa=0xfebe0000 size=0x4000 type=0x2
[3491.327] ../core/memory_manager.cc:312 Unmap() debug: unmap region PCI BAR MMIO gpa=0xfebf1000 size=1000 type=2
[3491.335] ../core/memory_manager.cc:312 Unmap() debug: unmap region PCI BAR MMIO gpa=0xfebe4000 size=4000 type=2
[3491.406] ../core/memory_manager.cc:300 Map() debug: map region PCI BAR MMIO gpa=0xfebf1000 size=0x1000 type=0x2
[3491.412] ../core/memory_manager.cc:300 Map() debug: map region PCI BAR MMIO gpa=0xfebe4000 size=0x4000 type=0x2
[3492.012] ../core/memory_manager.cc:312 Unmap() debug: unmap region PCI BAR MMIO gpa=0xfebf3000 size=1000 type=2
[3492.020] ../core/memory_manager.cc:312 Unmap() debug: unmap region PCI BAR MMIO gpa=0xfebec000 size=4000 type=2
[3492.092] ../core/memory_manager.cc:300 Map() debug: map region PCI BAR MMIO gpa=0xfebf3000 size=0x1000 type=0x2
[3492.098] ../core/memory_manager.cc:300 Map() debug: map region PCI BAR MMIO gpa=0xfebec000 size=0x4000 type=0x2
[3492.185] ../core/device_manager.cc:322 RegisterIoEvent() debug: virtio-console register IO event address=0xfebe3000 length=0 fd=37
[3492.244] ../core/device_manager.cc:322 RegisterIoEvent() debug: virtio-console register IO event address=0xfebe3004 length=0 fd=38
[3492.292] ../core/device_manager.cc:322 RegisterIoEvent() debug: virtio-console register IO event address=0xfebe3008 length=0 fd=39
[3492.353] ../core/device_manager.cc:322 RegisterIoEvent() debug: virtio-console register IO event address=0xfebe300c length=0 fd=40
[3492.410] ../core/device_manager.cc:322 RegisterIoEvent() debug: virtio-console register IO event address=0xfebe3010 length=0 fd=41
[3492.484] ../core/device_manager.cc:322 RegisterIoEvent() debug: virtio-console register IO event address=0xfebe3014 length=0 fd=42
[3492.538] ../core/device_manager.cc:322 RegisterIoEvent() debug: virtio-console register IO event address=0xfebe3018 length=0 fd=43
[3492.594] ../core/device_manager.cc:322 RegisterIoEvent() debug: virtio-console register IO event address=0xfebe301c length=0 fd=44
[3493.461] ../core/device_manager.cc:322 RegisterIoEvent() debug: virtio-network register IO event address=0xfebe7008 length=0 fd=45
[3493.525] ../core/device_manager.cc:322 RegisterIoEvent() debug: virtio-network register IO event address=0xfebe7000 length=0 fd=46
[3495.066] ../core/device_manager.cc:322 RegisterIoEvent() debug: virtio-network register IO event address=0xfebe7004 length=0 fd=47
[3807.128] ../core/device_manager.cc:524 HandleMmio() debug: pio count=2770  mmio count=408
[3808.400] ../core/device_manager.cc:322 RegisterIoEvent() debug: virtio-vgpu register IO event address=0xfebef000 length=0 fd=48
[3808.931] ../core/device_manager.cc:322 RegisterIoEvent() debug: virtio-vgpu register IO event address=0xfebef004 length=0 fd=49
[5703.914] ../core/device_manager.cc:462 HandleIo() debug: pio count=492  mmio count=44
[6800.890] ../core/device_manager.cc:462 HandleIo() debug: pio count=15  mmio count=0
[7912.022] ../core/device_manager.cc:462 HandleIo() debug: pio count=21  mmio count=0
[9019.529] ../core/device_manager.cc:462 HandleIo() debug: pio count=15  mmio count=0
[10124.054] ../core/device_manager.cc:462 HandleIo() debug: pio count=15  mmio count=0
[11801.591] ../core/device_manager.cc:462 HandleIo() debug: pio count=101  mmio count=0
[13817.224] ../core/device_manager.cc:462 HandleIo() debug: pio count=6  mmio count=0
[15817.173] ../core/device_manager.cc:462 HandleIo() debug: pio count=6  mmio count=0
[16817.289] ../core/device_manager.cc:462 HandleIo() debug: pio count=3  mmio count=0
[18801.624] ../core/device_manager.cc:462 HandleIo() debug: pio count=6  mmio count=0
[19801.643] ../core/device_manager.cc:462 HandleIo() debug: pio count=22  mmio count=0
VBE mode info request: 100
VBE mode info request: 101
VBE mode info request: 102
VBE mode info request: 103
VBE mode info request: 104
VBE mode info request: 105
VBE mode info request: 106
VBE mode info request: 107
VBE mode info request: 10d
VBE mode info request: 10e
VBE mode info request: 10f
VBE mode info request: 110
VBE mode info request: 111
VBE mode info request: 112
VBE mode info request: 113
VBE mode info request: 114
VBE mode info request: 115
VBE mode info request: 116
VBE mode info request: 117
VBE mode info request: 118
VBE mode info request: 119
VBE mode info request: 11a
VBE mode info request: 11b
VBE mode info request: 11c
VBE mode info request: 11d
VBE mode info request: 11e
VBE mode info request: 11f
VBE mode info request: 140
VBE mode info request: 141
VBE mode info request: 142
VBE mode info request: 143
VBE mode info request: 144
VBE mode info request: 145
VBE mode info request: 146
VBE mode info request: 147
VBE mode info request: 148
VBE mode info request: 149
VBE mode info request: 14a
VBE mode info request: 14b
VBE mode info request: 14c
VBE mode info request: 175
VBE mode info request: 176
VBE mode info request: 177
VBE mode info request: 178
VBE mode info request: 179
VBE mode info request: 17a
VBE mode info request: 17b
VBE mode info request: 17c
VBE mode info request: 17d
VBE mode info request: 17e
VBE mode info request: 17f
VBE mode info request: 180
VBE mode info request: 181
VBE mode info request: 182
VBE mode info request: 183
VBE mode info request: 184
VBE mode info request: 185
VBE mode info request: 186
VBE mode info request: 187
VBE mode info request: 188
VBE mode info request: 189
VBE mode info request: 18a
VBE mode info request: 18b
VBE mode info request: 18c
VBE mode info request: 18d
VBE mode info request: 18e
VBE mode info request: 18f
VBE mode info request: 190
VBE mode info request: 191
VBE mode info request: 192
VBE mode info request: 193
VBE mode info request: 194
VBE mode info request: 195
VBE mode info request: 196
VBE mode info request: 197
VBE mode info request: 198
VBE mode info request: 199
VBE mode info request: 19a
VBE mode info request: 19b
VBE mode info request: 19c
VBE mode info request: 19d
VBE mode info request: 19e
VBE mode info request: 0
VBE mode info request: 1
VBE mode info request: 2
VBE mode info request: 3
VBE mode info request: 4
VBE mode info request: 5
VBE mode info request: 6
VBE mode info request: 7
VBE mode info request: d
VBE mode info request: e
VBE mode info request: f
VBE mode info request: 10
VBE mode info request: 11
VBE mode info request: 12
VBE mode info request: 13
VBE mode info request: 6a
[19900.993] ../core/memory_manager.cc:312 Unmap() debug: unmap region VGA RAM gpa=0xa0000 size=20000 type=1
[19916.402] ../core/device_manager.cc:458 HandleIo() debug: qxl SLOW IO out port=0xc625 size=1 data=0 cost=15.410ms
[21475.634] ../core/device_manager.cc:462 HandleIo() debug: pio count=2931  mmio count=0
[22810.810] ../core/device_manager.cc:462 HandleIo() debug: pio count=457  mmio count=0
[24231.666] ../core/device_manager.cc:462 HandleIo() debug: pio count=21  mmio count=0
[25236.974] ../core/device_manager.cc:462 HandleIo() debug: pio count=66  mmio count=0
[26248.263] ../core/device_manager.cc:462 HandleIo() debug: pio count=60  mmio count=0
[27687.515] ../core/device_manager.cc:462 HandleIo() debug: pio count=25  mmio count=0
[28794.240] ../core/device_manager.cc:462 HandleIo() debug: pio count=15  mmio count=0
[29806.252] ../core/device_manager.cc:462 HandleIo() debug: pio count=15  mmio count=0
[30809.977] ../core/device_manager.cc:462 HandleIo() debug: pio count=653  mmio count=0
[31810.032] ../core/device_manager.cc:462 HandleIo() debug: pio count=15  mmio count=0
[33433.604] ../core/device_manager.cc:462 HandleIo() debug: pio count=21  mmio count=0
[34441.663] ../core/device_manager.cc:462 HandleIo() debug: pio count=334  mmio count=0
[35532.120] ../core/device_manager.cc:462 HandleIo() debug: pio count=818  mmio count=0
[36541.994] ../core/device_manager.cc:462 HandleIo() debug: pio count=312  mmio count=0
[37618.935] ../core/device_manager.cc:462 HandleIo() debug: pio count=939  mmio count=0
[38809.145] ../core/io_thread.cc:152 RunLoop() debug: ZN13DeviceManager15RegisterIoEventEP6Device14IoResourceTypemjmEUliE_ SLOW fd=49 events=1 cost=54.509ms
[38809.981] ../core/device_manager.cc:462 HandleIo() debug: pio count=301  mmio count=0
[40363.142] ../core/device_manager.cc:462 HandleIo() debug: pio count=21  mmio count=0
[41483.154] ../core/device_manager.cc:462 HandleIo() debug: pio count=15  mmio count=0
[42591.247] ../core/device_manager.cc:462 HandleIo() debug: pio count=15  mmio count=0
[43728.149] ../core/device_manager.cc:462 HandleIo() debug: pio count=48  mmio count=0
[44810.048] ../core/device_manager.cc:462 HandleIo() debug: pio count=15  mmio count=0
[46062.498] ../core/device_manager.cc:462 HandleIo() debug: pio count=123  mmio count=0
[47261.893] ../core/device_manager.cc:462 HandleIo() debug: pio count=15  mmio count=0
[48420.950] ../core/device_manager.cc:462 HandleIo() debug: pio count=15  mmio count=0
[49554.028] ../core/device_manager.cc:462 HandleIo() debug: pio count=15  mmio count=0
[50690.836] ../core/device_manager.cc:462 HandleIo() debug: pio count=15  mmio count=0
[51825.635] ../core/device_manager.cc:462 HandleIo() debug: pio count=15  mmio count=0
[52977.045] ../core/device_manager.cc:462 HandleIo() debug: pio count=21  mmio count=0
[54099.960] ../core/device_manager.cc:462 HandleIo() debug: pio count=15  mmio count=0
[55242.655] ../core/device_manager.cc:462 HandleIo() debug: pio count=15  mmio count=0
[56247.207] ../core/device_manager.cc:462 HandleIo() debug: pio count=356  mmio count=0
[57542.003] ../core/device_manager.cc:462 HandleIo() debug: pio count=556  mmio count=0
[58666.792] ../core/device_manager.cc:462 HandleIo() debug: pio count=81  mmio count=0
[59773.926] ../core/device_manager.cc:462 HandleIo() debug: pio count=15  mmio count=0
[60778.983] ../core/device_manager.cc:462 HandleIo() debug: pio count=422  mmio count=0
[61794.621] ../core/device_manager.cc:462 HandleIo() debug: pio count=532  mmio count=0
[62794.729] ../core/device_manager.cc:462 HandleIo() debug: pio count=356  mmio count=0
[63810.376] ../core/device_manager.cc:462 HandleIo() debug: pio count=598  mmio count=0
[64811.143] ../core/device_manager.cc:462 HandleIo() debug: pio count=747  mmio count=0
[65812.146] ../core/device_manager.cc:462 HandleIo() debug: pio count=358  mmio count=0
[66884.910] ../core/device_manager.cc:462 HandleIo() debug: pio count=378  mmio count=0
[68055.407] ../core/device_manager.cc:462 HandleIo() debug: pio count=391  mmio count=0
[69326.102] ../core/device_manager.cc:462 HandleIo() debug: pio count=37  mmio count=0
[70810.429] ../core/device_manager.cc:462 HandleIo() debug: pio count=234  mmio count=0
[70836.107] ../core/device_manager.cc:479 HandleIo() debug: unhandled io out port: 0xafe2 size: 1 data: 00000000000000ff count: 1
[70836.117] ../core/device_manager.cc:479 HandleIo() debug: unhandled io out port: 0xafe3 size: 1 data: 00000000000000ff count: 1
[71570.101] ../core/memory_manager.cc:312 Unmap() debug: unmap region PCI BAR MMIO gpa=0xfebf0000 size=1000 type=2
[71570.114] ../core/memory_manager.cc:312 Unmap() debug: unmap region PCI BAR MMIO gpa=0xfebe0000 size=4000 type=2
[71571.164] ../core/memory_manager.cc:312 Unmap() debug: unmap region PCI BAR MMIO gpa=0xfebf3000 size=1000 type=2
[71571.169] ../core/memory_manager.cc:312 Unmap() debug: unmap region PCI BAR MMIO gpa=0xfebec000 size=4000 type=2
[71586.022] ../core/memory_manager.cc:312 Unmap() debug: unmap region PCI BAR MMIO gpa=0xfebf2000 size=1000 type=2
[71586.029] ../core/memory_manager.cc:312 Unmap() debug: unmap region PCI BAR MMIO gpa=0xfebe8000 size=4000 type=2
[71586.137] ../core/device_manager.cc:479 HandleIo() debug: unhandled io out port: 0xafe2 size: 1 data: 00000000000000ff count: 1
[71586.141] ../core/device_manager.cc:479 HandleIo() debug: unhandled io out port: 0xafe3 size: 1 data: 00000000000000ff count: 1
[71586.294] ../core/device_manager.cc:479 HandleIo() debug: unhandled io out port: 0xafe2 size: 1 data: 00000000000000ff count: 1
[71586.297] ../core/device_manager.cc:479 HandleIo() debug: unhandled io out port: 0xafe3 size: 1 data: 00000000000000ff count: 1
[71587.524] ../devices/acpi/pmio.cc:86 operator()() debug: machine is power off
nooodles2023 commented 11 months ago

Oh, maybe the MvisorVGPUx64.dll was not loaded. Put these dll to directory of GpuTest.exe image

nooodles2023 commented 11 months ago
name: Default configuration
base: q35.yaml

machine:
  memory: 8G
  vcpu: 8
  priority: 1
  debug: No
  hypervisor: Yes

objects:
  - name: cmos
    rtc: localtime

  - class: qxl
  - class: spice-agent
  - class: qemu-guest-agent
  - class: usb-tablet 

  - class: virtio-network
    backend: uip
    mac: 00:50:00:11:22:33
    map: tcp:0.0.0.0:8022-:22

  - class: virtio-block
    image: /mnt/images/611a7f7bb8b7b5d056128219_4cd4ab51-6989-4731-9d4a-682c481c276c.qcow2
    snapshot: Yes

  - class: virtio-fs
    path: /tmp/fuse
    disk_name: mvisor-fs
    disk_size: 10G
    inode_count: 200

  - class: virtio-vgpu
    memory: 1G
    staging: No
    blob: No
nooodles2023 commented 11 months ago

Use q35.yaml instead of i440fx.

nooodles2023 commented 11 months ago

@purplepalmdash how about other tests in GpuTest ?

purplepalmdash commented 11 months ago

all of the tests in GpuTest under current config(i440fx) got the same result(blank window and no result), I'm currently trying the q35 way.

nooodles2023 commented 11 months ago

all of the tests in GpuTest under current config(i440fx) got the same result(blank window and no result), I'm currently trying the q35 way.

You can use ProcessHack to check if the guest dll were loaded.

purplepalmdash commented 11 months ago

q35 get the same result.

Mvisor version:
2023_10_10_15_59_11_409x226

though copied all user dll under gputest, not loaded when running test:

2023_10_10_16_02_38_502x586

nooodles2023 commented 11 months ago

q35 get the same result.

Mvisor version: 2023_10_10_15_59_11_409x226

though copied all user dll under gputest, not loaded when running test:

2023_10_10_16_02_38_502x586

GpuTest_GUI would create sub process to test opengl, check if the sub process loaded opengl32.dll. When you got blank window from GpuTest, try to delete opengl32.dll to check if this dll was loaded correctly. The install.bat script need to be called with UAC, it would add reg for opengl and copy guest dlls to system32.Check if the script worked correctly.

nooodles2023 commented 11 months ago

As you see, the MvisorVGPUx64.dll is the entrance of vgpu device, it implements the opengl api in opengl32.dll and transport all the request to kernel driver(Mvisor VGPU). If the dll was not loaded, maybe you can compile your own opengl test to loaded the guest dll

purplepalmdash commented 11 months ago

both dll(MvisorVGPUx64/opengl32) are loaded.

2023_10_10_17_41_49_912x597

Seems the virglrender didn't received the commands from guest?

nooodles2023 commented 11 months ago

both dll(MvisorVGPUx64/opengl32) are loaded.

2023_10_10_17_41_49_912x597

Seems the virglrender didn't received the commands from guest?

Close the Gputest.exe, try to disabled the Mvisor VGPU device in device manager, and then enable it. After that, try to start GpuTest again.

nooodles2023 commented 11 months ago

both dll(MvisorVGPUx64/opengl32) are loaded.

2023_10_10_17_41_49_912x597

Seems the virglrender didn't received the commands from guest?

Yes, it seems that the vgpu device didn't receive any commands from guest dll. Maybe the vgpu driver did not start. Use Dbgview to check if vgpu driver started.

teleport-10032 commented 7 months ago

Hello, I also encountered the same problem. This is the output of dbgview when running gputest. Have you encountered such a situation?

B78543CD-2FD2-4256-ADC2-304C639AFEEB
nooodles2023 commented 7 months ago

image something wrong with this. lasterror=31 try to stop the vgpu device and restart it

teleport-10032 commented 7 months ago

image something wrong with this. lasterror=31 try to stop the vgpu device and restart it

Thank you for your reply, I tried restart vm and restart vgpu device, I got the same error when running gputest. The device manager showed that the vgpu device was normal. My vm is windows 10 21h2, Build 19041.vb_release.191206-1406

nooodles2023 commented 7 months ago

image something wrong with this. lasterror=31 try to stop the vgpu device and restart it

Thank you for your reply, I tried restart vm and restart vgpu device, I got the same error when running gputest. The device manager showed that the vgpu device was normal. My vm is windows 10 21h2, Build 19041.vb_release.191206-1406

don't restart vm, just disable the vgpu device and then enable it again. don't forget to start gputest with UAC

teleport-10032 commented 7 months ago

image something wrong with this. lasterror=31 try to stop the vgpu device and restart it

Thank you for your reply, I tried restart vm and restart vgpu device, I got the same error when running gputest. The device manager showed that the vgpu device was normal. My vm is windows 10 21h2, Build 19041.vb_release.191206-1406

don't restart vm, just disable the vgpu device and then enable it again. don't forget to start gputest with UAC

I tried disable Mvisor VGPU device and enable it, then run gputest with UAC, but it doesn't work. I use pre-built vgpu-drive and virtio-win-0.1.240, do I need to change the OS?

nooodles2023 commented 7 months ago

oh~You may need to debug it why the IOCTL_VIRTIO_VGPU_GET_CAPS got failed. It was the beginning of VGPU initialization. I will also check it later

teleport-10032 commented 7 months ago

oh~You may need to debug it why the IOCTL_VIRTIO_VGPU_GET_CAPS got failed. It was the beginning of VGPU initialization. I will also check it later

Yes, I think so, I'll debug it later, thanks for the advice!

nooodles2023 commented 7 months ago

If the driver didn't output anything error, the problem maybe the GetHandleFromVgpu in MvisorVGPUx64.dll. Could you copy this method to a new console project to test it?

teleport-10032 commented 7 months ago

If the driver didn't output anything error, the problem maybe the GetHandleFromVgpu in MvisorVGPUx64.dll. Could you copy this method to a new console project to test it?

Of course, I will find a free time to test it.

teleport-10032 commented 7 months ago

If the driver didn't output anything error, the problem maybe the GetHandleFromVgpu in MvisorVGPUx64.dll. Could you copy this method to a new console project to test it?

Hello nooodles, Happy New Year!

Recently I try to debug MvisorVGPUx64.dll by following the steps:

  1. download mvisor-win-vgpu-driver source code zip(tag v1.0.0), clone mesa source, reset the specified commit and apply the mesa-virgl-icd-for-windows.patch.
  2. add some debug infomation in source.
  3. build it from the source code.
  4. i get the MvisorVGPUx64.dll, copy it to C:\Windows\System32.
  5. run gputest with UAC.

At this time I found that gputest did not load MvisorVGPUx64.dll. I did the following checks:

  1. restart the vgpu devices, it's useless.
  2. restart the vm, it's useless.
  3. build kernal mode driver from source, install it on vm, it's useless.
  4. Delete the debug information I added and rebuild MvisorVGPUx64.dll, it's useless.
  5. copy the pre-built MvisorVGPUx64.dll to C:\Windows\System32, and run gputest with UAC, it's work, gputest loaded MvisorVGPUx64.dll successful.

I found that the size of MvisorVGPUx64.dll I built was 23MB, but the pre-built dll was only 20MB.

My compile command line is as follows: meson setup build -Dbuildtype=release -Dgallium-drivers=virgl -Dgallium-windows-dll-name=MvisorVGPUx64 -Dllvm=disabled -Dprefix=/d/workspace/mesa_install meson install -C build

Some environmental information:

mesa 23.1.0-devel

  Directories
    prefix                  : D:/workspace/mesa_install
    libdir                  : lib
    includedir              : include

  Common C and C++ arguments
    c_cpp_args              :

  OpenGL
    OpenGL                  : YES
    ES1                     : NO
    ES2                     : NO
    Shared glapi            : NO

  DRI
    Platform                : windows
    Driver dir              : D:/workspace/mesa_install/lib/dri

  GLX
    Enabled                 : NO
    Provider                : None

  EGL
    Enabled                 : NO

  GBM
    Enabled                 : NO

  Vulkan
    Drivers                 : NO

  LLVM
    Enabled                 : NO

  Gallium
    Enabled                 : YES
    Drivers                 : virgl
    Platforms               : windows
    Frontends               : mesa
    Off-screen rendering    : NO
    HUD lm-sensors          : NO

  Perfetto
    Enabled                 : NO

  User defined options
    buildtype               : release
    prefix                  : D:/workspace/mesa_install
    gallium-drivers         : virgl
    gallium-windows-dll-name: MvisorVGPUx64
    llvm                    : disabled

Found ninja-1.11.1 at C:\msys64\mingw64\bin/ninja.EXE
$ gcc -v
Using built-in specs.
COLLECT_GCC=C:\msys64\mingw64\bin\gcc.exe
COLLECT_LTO_WRAPPER=C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: ../gcc-13.2.0/configure --prefix=/mingw64 --with-local-prefix=/mingw64/local --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 -
-target=x86_64-w64-mingw32 --with-native-system-header-dir=/mingw64/include --libexecdir=/mingw64/lib --enable-bootstrap --enable-checking=release -
-with-arch=nocona --with-tune=generic --enable-languages=c,lto,c++,fortran,ada,objc,obj-c++,jit --enable-shared --enable-static --enable-libatomic -
-enable-threads=posix --enable-graphite --enable-fully-dynamic-string --enable-libstdcxx-filesystem-ts --enable-libstdcxx-time --disable-libstdcxx-p
ch --enable-lto --enable-libgomp --disable-libssp --disable-multilib --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disab
le-symvers --with-libiconv --with-system-zlib --with-gmp=/mingw64 --with-mpfr=/mingw64 --with-mpc=/mingw64 --with-isl=/mingw64 --with-pkgversion='Re
v3, Built by MSYS2 project' --with-bugurl=https://github.com/msys2/MINGW-packages/issues --with-gnu-as --with-gnu-ld --disable-libstdcxx-debug --wit
h-boot-ldflags=-static-libstdc++ --with-stage1-ldflags=-static-libstdc++
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 13.2.0 (Rev3, Built by MSYS2 project)
$ meson -v
1.3.2

Did I make a mistake somewhere?

teleport-10032 commented 7 months ago

Another question, Can you tell me what the function of opengl32.dll in the pre-built package? It doesn't seem to be used in install.bat.

nooodles2023 commented 6 months ago

If the driver didn't output anything error, the problem maybe the GetHandleFromVgpu in MvisorVGPUx64.dll. Could you copy this method to a new console project to test it?

Hello nooodles, Happy New Year!

Recently I try to debug MvisorVGPUx64.dll by following the steps:

  1. download mvisor-win-vgpu-driver source code zip(tag v1.0.0), clone mesa source, reset the specified commit and apply the mesa-virgl-icd-for-windows.patch.
  2. add some debug infomation in source.
  3. build it from the source code.
  4. i get the MvisorVGPUx64.dll, copy it to C:\Windows\System32.
  5. run gputest with UAC.

At this time I found that gputest did not load MvisorVGPUx64.dll. I did the following checks:

  1. restart the vgpu devices, it's useless.
  2. restart the vm, it's useless.
  3. build kernal mode driver from source, install it on vm, it's useless.
  4. Delete the debug information I added and rebuild MvisorVGPUx64.dll, it's useless.
  5. copy the pre-built MvisorVGPUx64.dll to C:\Windows\System32, and run gputest with UAC, it's work, gputest loaded MvisorVGPUx64.dll successful.

I found that the size of MvisorVGPUx64.dll I built was 23MB, but the pre-built dll was only 20MB.

My compile command line is as follows: meson setup build -Dbuildtype=release -Dgallium-drivers=virgl -Dgallium-windows-dll-name=MvisorVGPUx64 -Dllvm=disabled -Dprefix=/d/workspace/mesa_install meson install -C build

Some environmental information:

mesa 23.1.0-devel

  Directories
    prefix                  : D:/workspace/mesa_install
    libdir                  : lib
    includedir              : include

  Common C and C++ arguments
    c_cpp_args              :

  OpenGL
    OpenGL                  : YES
    ES1                     : NO
    ES2                     : NO
    Shared glapi            : NO

  DRI
    Platform                : windows
    Driver dir              : D:/workspace/mesa_install/lib/dri

  GLX
    Enabled                 : NO
    Provider                : None

  EGL
    Enabled                 : NO

  GBM
    Enabled                 : NO

  Vulkan
    Drivers                 : NO

  LLVM
    Enabled                 : NO

  Gallium
    Enabled                 : YES
    Drivers                 : virgl
    Platforms               : windows
    Frontends               : mesa
    Off-screen rendering    : NO
    HUD lm-sensors          : NO

  Perfetto
    Enabled                 : NO

  User defined options
    buildtype               : release
    prefix                  : D:/workspace/mesa_install
    gallium-drivers         : virgl
    gallium-windows-dll-name: MvisorVGPUx64
    llvm                    : disabled

Found ninja-1.11.1 at C:\msys64\mingw64\bin/ninja.EXE
$ gcc -v
Using built-in specs.
COLLECT_GCC=C:\msys64\mingw64\bin\gcc.exe
COLLECT_LTO_WRAPPER=C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: ../gcc-13.2.0/configure --prefix=/mingw64 --with-local-prefix=/mingw64/local --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 -
-target=x86_64-w64-mingw32 --with-native-system-header-dir=/mingw64/include --libexecdir=/mingw64/lib --enable-bootstrap --enable-checking=release -
-with-arch=nocona --with-tune=generic --enable-languages=c,lto,c++,fortran,ada,objc,obj-c++,jit --enable-shared --enable-static --enable-libatomic -
-enable-threads=posix --enable-graphite --enable-fully-dynamic-string --enable-libstdcxx-filesystem-ts --enable-libstdcxx-time --disable-libstdcxx-p
ch --enable-lto --enable-libgomp --disable-libssp --disable-multilib --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disab
le-symvers --with-libiconv --with-system-zlib --with-gmp=/mingw64 --with-mpfr=/mingw64 --with-mpc=/mingw64 --with-isl=/mingw64 --with-pkgversion='Re
v3, Built by MSYS2 project' --with-bugurl=https://github.com/msys2/MINGW-packages/issues --with-gnu-as --with-gnu-ld --disable-libstdcxx-debug --wit
h-boot-ldflags=-static-libstdc++ --with-stage1-ldflags=-static-libstdc++
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 13.2.0 (Rev3, Built by MSYS2 project)
$ meson -v
1.3.2

Did I make a mistake somewhere?

so, you made it !!!? The size of dll may depend on the version of libs. I created a register key in install.bat to let windows find the implement of opengl32.dll, maybe it can't work correctly in some situations.

nooodles2023 commented 6 months ago

Another question, Can you tell me what the function of opengl32.dll in the pre-built package? It doesn't seem to be used in install.bat.

Yes, the windows already got the openg32.dll in system32, the dll was just a interface collections, it needed implemention from GPU driver.

teleport-10032 commented 6 months ago

Yes, I got MvisorVGPUx64.dll from sources code sucessfully and copy it to C:\Windows\System32, but gputest can not load it. The pre-built MvisorVGPUx64.dll can be loaded by gputest.

teleport-10032 commented 6 months ago

Another question, Can you tell me what the function of opengl32.dll in the pre-built package? It doesn't seem to be used in install.bat.

Yes, the windows already got the openg32.dll in system32, the dll was just a interface collections, it needed implemention from GPU driver.

Thanks, I get it, maybe I don't need to care about opengl32.dll that build from sources.

nooodles2023 commented 6 months ago

Yes, I got MvisorVGPUx64.dll from sources code sucessfully, but gputest can not loaded it. The pre-built MvisorVGPUx64.dll can be boaded by gputest.

Oh, maybe there are some other dlls depended lost. For example, zlib.dll or zstd.dll

teleport-10032 commented 6 months ago

Yes, I got MvisorVGPUx64.dll from sources code sucessfully, but gputest can not loaded it. The pre-built MvisorVGPUx64.dll can be boaded by gputest.

Oh, maybe there are some other dlls depended lost. For example, zlib.dll or zstd.dll

Maybe, I'll check the deps later.

teleport-10032 commented 6 months ago

Yes, I got MvisorVGPUx64.dll from sources code sucessfully, but gputest can not loaded it. The pre-built MvisorVGPUx64.dll can be boaded by gputest.

Oh, maybe there are some other dlls depended lost. For example, zlib.dll or zstd.dll

Maybe, I'll check the deps later.

it's works after add dll deps, i print some information in GetHandleFromVgpu.

A13BCB62392E44A205000D5EC05C96B8

963AB33646AA45045D63EB55534C379D

But it looks like it returns a handle normally.

teleport-10032 commented 6 months ago

I got a specific error when run gputest with MvisorVGPUx64.dll in debug mode: WX20240219-140230@2x

My device manager: WX20240219-140553@2x

My mvsior vm config:

name: Default configuration
base: q35.yaml

machine:
  memory: 8G
  vcpu: 4
  # Set vcpu thread priority value [-20, 19]
  # A higher value means a lower priority
  priority: 1
  # Turn on BIOS output and performance measurement
  debug: Yes
  # Turn on hypervisor to lower CPU usage (Hyper-V is used for Windows)
  hypervisor: Yes

objects:
  - name: cmos
    # gmtime for linux, localtime for windows
    rtc: localtime

  - class: qxl
  - class: spice-agent
  - class: qemu-guest-agent
  - class: usb-tablet

  - class: virtio-network
    backend: uip
    mac: 00:50:00:11:22:33
    map: tcp:0.0.0.0:8022-:22

    # class: ata-cdrom 
    #image: /root/iso/win1021h2.iso

    #- class: ata-cdrom
    #  image: /root/iso/virtio-win-0.1.240.iso

    #- class: ata-disk
    #image: /root/images/mvtest.qcow2
    #snapshot: No

  # - class: floppy
  #   image: /data/images/floppy.img

  - class: virtio-block
    image: /root/images/mvtest.raw
    snapshot: No

  #- class: virtio-fs
  #  path: /tmp/fuse
  #  disk_name: mvisor-fs
  #  disk_size: 10G
  #  inode_count: 200

  # - class: vfio-pci
  #   sysfs: /sys/bus/mdev/devices/c2e088ba-954f-11ec-8584-525400666f2b
  #   debug: Yes

  - class: virtio-vgpu
    memory: 1G
    staging: No
    blob: No
    node: /dev/dri/renderD128

Can you give me some advice?

nooodles2023 commented 6 months ago

Yes, I got MvisorVGPUx64.dll from sources code sucessfully, but gputest can not loaded it. The pre-built MvisorVGPUx64.dll can be boaded by gputest.

Oh, maybe there are some other dlls depended lost. For example, zlib.dll or zstd.dll

Maybe, I'll check the deps later.

it's works after add dll deps, i print some information in GetHandleFromVgpu.

A13BCB62392E44A205000D5EC05C96B8

963AB33646AA45045D63EB55534C379D

But it looks like it returns a handle normally.

failed=31 means that the vgpu device didn't work. it was windows error. Print the handle value

nooodles2023 commented 6 months ago

I got a specific error when run gputest with MvisorVGPUx64.dll in debug mode: WX20240219-140230@2x

My device manager: WX20240219-140553@2x

My mvsior vm config:

name: Default configuration
base: q35.yaml

machine:
  memory: 8G
  vcpu: 4
  # Set vcpu thread priority value [-20, 19]
  # A higher value means a lower priority
  priority: 1
  # Turn on BIOS output and performance measurement
  debug: Yes
  # Turn on hypervisor to lower CPU usage (Hyper-V is used for Windows)
  hypervisor: Yes

objects:
  - name: cmos
    # gmtime for linux, localtime for windows
    rtc: localtime

  - class: qxl
  - class: spice-agent
  - class: qemu-guest-agent
  - class: usb-tablet

  - class: virtio-network
    backend: uip
    mac: 00:50:00:11:22:33
    map: tcp:0.0.0.0:8022-:22

    # class: ata-cdrom 
    #image: /root/iso/win1021h2.iso

    #- class: ata-cdrom
    #  image: /root/iso/virtio-win-0.1.240.iso

    #- class: ata-disk
    #image: /root/images/mvtest.qcow2
    #snapshot: No

  # - class: floppy
  #   image: /data/images/floppy.img

  - class: virtio-block
    image: /root/images/mvtest.raw
    snapshot: No

  #- class: virtio-fs
  #  path: /tmp/fuse
  #  disk_name: mvisor-fs
  #  disk_size: 10G
  #  inode_count: 200

  # - class: vfio-pci
  #   sysfs: /sys/bus/mdev/devices/c2e088ba-954f-11ec-8584-525400666f2b
  #   debug: Yes

  - class: virtio-vgpu
    memory: 1G
    staging: No
    blob: No
    node: /dev/dri/renderD128

Can you give me some advice?

I have no idea with this now, have you modified the code about stw_pf_color?But it seems the gpu device worked By the way, you can use mvisor snapshot to prepare a vm env, it will save much time when you need to reset env

teleport-10032 commented 6 months ago

I got a specific error when run gputest with MvisorVGPUx64.dll in debug mode: WX20240219-140230@2x My device manager: WX20240219-140553@2x My mvsior vm config:

name: Default configuration
base: q35.yaml

machine:
  memory: 8G
  vcpu: 4
  # Set vcpu thread priority value [-20, 19]
  # A higher value means a lower priority
  priority: 1
  # Turn on BIOS output and performance measurement
  debug: Yes
  # Turn on hypervisor to lower CPU usage (Hyper-V is used for Windows)
  hypervisor: Yes

objects:
  - name: cmos
    # gmtime for linux, localtime for windows
    rtc: localtime

  - class: qxl
  - class: spice-agent
  - class: qemu-guest-agent
  - class: usb-tablet

  - class: virtio-network
    backend: uip
    mac: 00:50:00:11:22:33
    map: tcp:0.0.0.0:8022-:22

    # class: ata-cdrom 
    #image: /root/iso/win1021h2.iso

    #- class: ata-cdrom
    #  image: /root/iso/virtio-win-0.1.240.iso

    #- class: ata-disk
    #image: /root/images/mvtest.qcow2
    #snapshot: No

  # - class: floppy
  #   image: /data/images/floppy.img

  - class: virtio-block
    image: /root/images/mvtest.raw
    snapshot: No

  #- class: virtio-fs
  #  path: /tmp/fuse
  #  disk_name: mvisor-fs
  #  disk_size: 10G
  #  inode_count: 200

  # - class: vfio-pci
  #   sysfs: /sys/bus/mdev/devices/c2e088ba-954f-11ec-8584-525400666f2b
  #   debug: Yes

  - class: virtio-vgpu
    memory: 1G
    staging: No
    blob: No
    node: /dev/dri/renderD128

Can you give me some advice?

I have no idea with this now, have you modified the code about stw_pf_color?But it seems the gpu device workd

I haven't modified the code about stw_pf_color, i think i need debug it again.

gfxflynn commented 4 months ago

Hello, I also encountered the same problem. This is the output of dbgview when running gputest. Have you encountered such a situation? B78543CD-2FD2-4256-ADC2-304C639AFEEB

I also encountered this error, is there any solution now?

teleport-10032 commented 4 months ago

Hello, I also encountered the same problem. This is the output of dbgview when running gputest. Have you encountered such a situation? B78543CD-2FD2-4256-ADC2-304C639AFEEB

I also encountered this error, is there any solution now?

Sadly not yet, I know nothing about windows, I'm learning it

nooodles2023 commented 1 month ago

@w568w IOCTL_VIRTIO_VGPU_GET_CAPS has always succeeded in my env. Could you help me to debug it in mvisor to ensure the case VIRTIO_GPU_CMD_GET_CAPSET was successfully called

w568w commented 1 month ago

This looks pretty strange. The error log IOCTL_VIRTIO_VGPU_GET_CAPS failed=31 is printed by the userspace driver:

https://github.com/tenclass/mvisor-win-vgpu-driver/blob/45ab463193b68a4fef70707f3ade92800cc25c6f/usermode/mesa-virgl-icd-for-windows.patch#L2703-L2711

Here, failed=31 is ERROR_GEN_FAILURE (i.e. A device attached to the system is not functioning.), which is the counterpart error code for NTSTATUS STATUS_UNSUCCESSFUL from kernel. [1, 2]

So, if we assume that VirtioVgpuIoControl in the kernel driver is called normally, which in turn calls CtlGetCaps, something must be printed before return STATUS_UNSUCCESSFUL:

https://github.com/tenclass/mvisor-win-vgpu-driver/blob/45ab463193b68a4fef70707f3ade92800cc25c6f/kernelmode/vgpu/control.c#L204-L254

But we don't see any log printed, which really confuses me. Is VirtioVgpuIoControl really called?

[1] https://github.com/reactos/reactos/blob/90de2b660b12919c2f60f2f31ad41e37c123d662/sdk/lib/rtl/error.c#L463-L465 [2] https://comp.os.ms-windows.programmer.nt.kernel-mode.narkive.com/B1CpbmzW/deviceiocontrol-failed-with-error-code-31

nooodles2023 commented 1 month ago

Maybe there are sth wrong with the params of DeviceIoControl. ctl_get_param has been called successfully before, so the driver worked.

w568w commented 1 month ago

ctl_get_param has been called successfully before, so the driver worked.

Can you confirm this?

I prepended VGPU_DEBUG_LOG("io control called code=%d", IoControlCode); in VirtioVgpuIoControl, and these are what the kernel driver printed:

[Mvisor] Func:VirtioVgpuDevicePrepareHardware Line:346 
[Mvisor] Func:VirtioVgpuDevicePrepareHardware Line:370 get virtio queue num=2
[Mvisor] Func:InitializeVgpuMemory Line:61 init vgpu memory va=FFFFE8F400000000 gpa=0x100000000 size=0x40000000
[Mvisor] Func:VirtioVgpuDeviceD0Entry Line:499 from D4
[Mvisor] Func:VirtioVgpuInterruptEnable Line:208 info.MessageNumber=0
[Mvisor] Func:VirtioVgpuInterruptEnable Line:208 info.MessageNumber=1
[Mvisor] Func:VirtioVgpuInterruptEnable Line:208 info.MessageNumber=2
[Mvisor] Func:VirtioVgpuInterruptEnable Line:208 info.MessageNumber=3

All above are printed during the system boot, i.e., when the driver is loading. When I run GpuTest or something graphic, nothing is printed anymore. Also, VirtioVgpuIoControl seems never printing anything.


I have several hypotheses:

  1. When VirtioVgpuIoControl is called, it is “muted” and not allowed to print anything;
  2. The kernel driver crashed quietly after loaded;
  3. The user-space driver attached to the wrong device, or held an invalid handle;
  4. Something mysteriously breaks in DeviceIoControl procedure, so that VirtioVgpuIoControl never gets called.

I have no idea how to verify them. Maybe a kernel driver debugger is necessary.


IOCTL_VIRTIO_VGPU_GET_CAPS has always succeeded in my env.

By the way, could you share your VM config and images? I want to check whether it is a system environment or image issue.

nooodles2023 commented 1 month ago
static int ctl_get_caps(HANDLE handle, struct drm_virtgpu_get_caps *getcaps) {
  uint32_t input[2];
  input[0] = getcaps->cap_set_id;
  input[1] = getcaps->cap_set_ver;

  if (!DeviceIoControl(handle, IOCTL_VIRTIO_VGPU_GET_CAPS, input, sizeof(input),
                       (void *)getcaps->addr, getcaps->size, NULL, NULL)) {
    _debug_printf("IOCTL_VIRTIO_VGPU_GET_CAPS failed=%d\n", GetLastError());
    return -1;
  }
}

try to fix the ctl_get_caps like ths

w568w commented 1 month ago

try to fix the ctl_get_caps like ths

Okay, but I have no experience in compiling Mesa on Windows. Will have a try this week.

c3n21 commented 3 weeks ago

I tried all of the above with the release driver but I don't get any errors with IOCTL_VIRTIO_VGPU_GET_CAPS in DebugView

image

Here is what I get (because I enabled for a while CaptureEvents.)

I can see Mvisor VGPU

image

name: Default configuration
base: q35.yaml

machine:
  memory: 8G
  vcpu: 4
  # Set vcpu thread priority value [-20, 19]
  # A higher value means a lower priority
  priority: 1
  # Turn on BIOS output and performance measurement
  debug: Yes
  # Turn on hypervisor to lower CPU usage (Hyper-V is used for Windows)
  hypervisor: Yes

objects:
  - name: cmos
    # gmtime for linux, localtime for windows
    rtc: localtime

  - class: qxl
  - class: spice-agent
  - class: usb-tablet

  - class: virtio-network
    mac: 00:50:00:11:22:33
    map: tcp:0.0.0.0:8022-:22
    # If you have configured the tap interface, you can uncomment the following lines
    # backend: tap
    # ifname: tap0

  # - class: ata-cdrom 
  #   image: /home/zhifan/Documents/iso/Win11_23H2_English_x64v2.iso

  # - class: ata-cdrom
  #   image: /home/zhifan/Documents/iso/virtio-win-0.1.262.iso

  - class: virtio-block
    image: /home/zhifan/Documents/vms/win11-2.qcow2
    snapshot: No

  # - class: floppy
  #   image: /data/images/floppy.img

  # - class: virtio-block
  #   image: /data/empty.qcow2
  #   snapshot: No

  # - class: virtio-fs
  #   path: /tmp/fuse
  #   disk_name: mvisor-fs
  #   disk_size: 2G
  #   inode_count: 200

  # - class: vfio-pci
  #   sysfs: /sys/bus/mdev/devices/c2e088ba-954f-11ec-8584-525400666f2b
  #   debug: Yes

  - class: virtio-vgpu
    memory: 1G
    staging: No
    blob: Yes
    # node: /dev/dri/renderD128

  # - class: virtio-cuda
  #   memory: 1G
  #   gpu_memory: 8G
  #   visible_gpus: GPU-0

Here is my config

image

And this is libvirglrenderer version

I also noticed that when I close mvisor I get this output

Error of failed request:  BadAccess (attempt to access private resource denied)
  Major opcode of failed request:  150 (GLX)
  Minor opcode of failed request:  26 (X_GLXMakeContextCurrent)
  Serial number of failed request:  112
  Current serial number in output stream:  112

And this is my GPU

c1:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Phoenix1 (rev c4)
nooodles2023 commented 3 weeks ago

I tried all of the above with the release driver but I don't get any errors with IOCTL_VIRTIO_VGPU_GET_CAPS in DebugView

image

Here is what I get (because I enabled for a while CaptureEvents.)

I can see Mvisor VGPU

image

name: Default configuration
base: q35.yaml

machine:
  memory: 8G
  vcpu: 4
  # Set vcpu thread priority value [-20, 19]
  # A higher value means a lower priority
  priority: 1
  # Turn on BIOS output and performance measurement
  debug: Yes
  # Turn on hypervisor to lower CPU usage (Hyper-V is used for Windows)
  hypervisor: Yes

objects:
  - name: cmos
    # gmtime for linux, localtime for windows
    rtc: localtime

  - class: qxl
  - class: spice-agent
  - class: usb-tablet

  - class: virtio-network
    mac: 00:50:00:11:22:33
    map: tcp:0.0.0.0:8022-:22
    # If you have configured the tap interface, you can uncomment the following lines
    # backend: tap
    # ifname: tap0

  # - class: ata-cdrom 
  #   image: /home/zhifan/Documents/iso/Win11_23H2_English_x64v2.iso

  # - class: ata-cdrom
  #   image: /home/zhifan/Documents/iso/virtio-win-0.1.262.iso

  - class: virtio-block
    image: /home/zhifan/Documents/vms/win11-2.qcow2
    snapshot: No

  # - class: floppy
  #   image: /data/images/floppy.img

  # - class: virtio-block
  #   image: /data/empty.qcow2
  #   snapshot: No

  # - class: virtio-fs
  #   path: /tmp/fuse
  #   disk_name: mvisor-fs
  #   disk_size: 2G
  #   inode_count: 200

  # - class: vfio-pci
  #   sysfs: /sys/bus/mdev/devices/c2e088ba-954f-11ec-8584-525400666f2b
  #   debug: Yes

  - class: virtio-vgpu
    memory: 1G
    staging: No
    blob: Yes
    # node: /dev/dri/renderD128

  # - class: virtio-cuda
  #   memory: 1G
  #   gpu_memory: 8G
  #   visible_gpus: GPU-0

Here is my config

image

And this is libvirglrenderer version

I also noticed that when I close mvisor I get this output

Error of failed request:  BadAccess (attempt to access private resource denied)
  Major opcode of failed request:  150 (GLX)
  Minor opcode of failed request:  26 (X_GLXMakeContextCurrent)
  Serial number of failed request:  112
  Current serial number in output stream:  112

And this is my GPU

c1:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Phoenix1 (rev c4)

What's your question when you run GPUtest?

nooodles2023 commented 3 weeks ago
static int ctl_get_caps(HANDLE handle, struct drm_virtgpu_get_caps *getcaps) {
  uint32_t input[2];
  input[0] = getcaps->cap_set_id;
  input[1] = getcaps->cap_set_ver;

  if (!DeviceIoControl(handle, IOCTL_VIRTIO_VGPU_GET_CAPS, input, sizeof(input),
                       (void *)getcaps->addr, getcaps->size, NULL, NULL)) {
    _debug_printf("IOCTL_VIRTIO_VGPU_GET_CAPS failed=%d\n", GetLastError());
    return -1;
  }
}

try to fix the ctl_get_caps like ths

@teleport-10032 @w568w Maybe this is the key for this bug.

w568w commented 3 weeks ago

Maybe this is the key for this bug.

Oh, have you compiled and tested the user-space part?

I was trying to compile Mesa with this patch last week but failed. Will appreciate it if you can build one for testing. :rocket:

c3n21 commented 3 weeks ago

I tried all of the above with the release driver but I don't get any errors with IOCTL_VIRTIO_VGPU_GET_CAPS in DebugView image Here is what I get (because I enabled for a while CaptureEvents.) I can see Mvisor VGPU image

name: Default configuration
base: q35.yaml

machine:
  memory: 8G
  vcpu: 4
  # Set vcpu thread priority value [-20, 19]
  # A higher value means a lower priority
  priority: 1
  # Turn on BIOS output and performance measurement
  debug: Yes
  # Turn on hypervisor to lower CPU usage (Hyper-V is used for Windows)
  hypervisor: Yes

objects:
  - name: cmos
    # gmtime for linux, localtime for windows
    rtc: localtime

  - class: qxl
  - class: spice-agent
  - class: usb-tablet

  - class: virtio-network
    mac: 00:50:00:11:22:33
    map: tcp:0.0.0.0:8022-:22
    # If you have configured the tap interface, you can uncomment the following lines
    # backend: tap
    # ifname: tap0

  # - class: ata-cdrom 
  #   image: /home/zhifan/Documents/iso/Win11_23H2_English_x64v2.iso

  # - class: ata-cdrom
  #   image: /home/zhifan/Documents/iso/virtio-win-0.1.262.iso

  - class: virtio-block
    image: /home/zhifan/Documents/vms/win11-2.qcow2
    snapshot: No

  # - class: floppy
  #   image: /data/images/floppy.img

  # - class: virtio-block
  #   image: /data/empty.qcow2
  #   snapshot: No

  # - class: virtio-fs
  #   path: /tmp/fuse
  #   disk_name: mvisor-fs
  #   disk_size: 2G
  #   inode_count: 200

  # - class: vfio-pci
  #   sysfs: /sys/bus/mdev/devices/c2e088ba-954f-11ec-8584-525400666f2b
  #   debug: Yes

  - class: virtio-vgpu
    memory: 1G
    staging: No
    blob: Yes
    # node: /dev/dri/renderD128

  # - class: virtio-cuda
  #   memory: 1G
  #   gpu_memory: 8G
  #   visible_gpus: GPU-0

Here is my config image And this is libvirglrenderer version I also noticed that when I close mvisor I get this output

Error of failed request:  BadAccess (attempt to access private resource denied)
  Major opcode of failed request:  150 (GLX)
  Minor opcode of failed request:  26 (X_GLXMakeContextCurrent)
  Serial number of failed request:  112
  Current serial number in output stream:  112

And this is my GPU

c1:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Phoenix1 (rev c4)

What's your question when you run GPUtest?

When I run the GPUtest I have the same issue as OP, blank screen and then it closes without any log.

I've tried every test available in GPUTest