intel / gvt-linux

Other
503 stars 94 forks source link

[BUG] HD P630 Use GVT-g+DMA-BUF on Windows Guest exceptionally get two monitors #233

Open lurenJBD opened 6 months ago

lurenJBD commented 6 months ago

System:PVE 8.1.3 Kernel:Linux 6.5.11-7-pve CPU:QL33 ( maybe is E3-1275 v6 ES) iGPU: HD P630

The problem I'm having is that there should be only one monitor, but two appear in my VM and the resolution is locked at 800x600

Screenshot of the running VM Snipaste_2024-01-04_15-47-18

The reason I think this is processor related is that the same VM works fine with GVT-g + DMA-BUF on my other device with 6700HQ processor (HD530).

Here's the VM running the same parameters on my other device Snipaste_2024-01-04_16-57-59

This is my linux startup parameters

GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on iommu=pt pcie_acs_override=downstream,multifunction i915.enable_gvt=1 i915.enable_guc=0 video=efifb:off,vesafb:off drm.edid_firmware=edid/1024x768.bin"

Because I encountered the kernel: EDID block 0 is all zeroes error, I added "drm.edid_firmware=edid/1024x768.bin" in /etc/default/grub, and after that I encountered another error, but the relevance to my encounter is unclear.

I am sure that GVT-g is working, because it creates mdevs, but even if I add "display=on,x-igd-opregion=on" to the VM config file, I can't get DMA-BUF to work.

root@pve251:~# ls -la /sys/devices/pci0000:00/0000:00:02.0/mdev_supported_types
total 0
drwxr-xr-x  6 root root 0 Jan  4 16:06 .
drwxr-xr-x 11 root root 0 Jan  4 15:59 ..
drwxr-xr-x  3 root root 0 Jan  4 17:05 i915-GVTg_V5_1
drwxr-xr-x  3 root root 0 Jan  4 17:05 i915-GVTg_V5_2
drwxr-xr-x  3 root root 0 Jan  4 16:06 i915-GVTg_V5_4
drwxr-xr-x  3 root root 0 Jan  4 17:05 i915-GVTg_V5_8

[ 2947.316028] intel_vgpu_mdev df81aedb-05ed-4fee-9802-99e0e060c1e7: Adding to iommu group 33

.conf file contents

agent: 1
args: -cpu host,hypervisor=off,vmware-cpuid-freq=false,enforce=false,host-phys-bits=true -device vfio-pci-nohotplug,addr=0x02,sysfsdev=/sys/bus/mdev/devices/df81aedb-05ed-4fee-9802-99e0e060c1e7,x-igd-opregion=on,display=on,ramfb=on,xres=1920,yres=1080 -vnc unix:/var/run/qemu-server/104.vnc,password=on -display egl-headless,gl=core
balloon: 0
bios: ovmf
boot: order=scsi0
cores: 4
cpu: host
efidisk0: local:104/vm-104-disk-0.qcow2,efitype=4m,size=528K
hookscript: local:snippets/LTSC-2021.pl
localtime: 1
machine: pc-q35-8.1
memory: 8192
meta: creation-qemu=8.1.2,ctime=1704345388
name: LTSC-2
net0: virtio=BC:24:11:CB:06:4F,bridge=vmbr0
numa: 0
ostype: win10
scsi0: local:104/vm-104-disk-1.qcow2,iothread=1,size=80G,ssd=1
scsihw: virtio-scsi-single
smbios1: uuid=ed540818-6aa0-4513-9066-59e2230a8ec1
sockets: 1
vga: none
vmgenid: 7d101ff1-89c1-4caa-a105-4518a7ffe837

Here are the parameters I used to start the VM

/usr/bin/kvm \
  -id 104 \
  -name 'LTSC-2,debug-threads=on' \
  -no-shutdown \
  -chardev 'socket,id=qmp,path=/var/run/qemu-server/104.qmp,server=on,wait=off' \
  -mon 'chardev=qmp,mode=control' \
  -chardev 'socket,id=qmp-event,path=/var/run/qmeventd.sock,reconnect=5' \
  -mon 'chardev=qmp-event,mode=control' \
  -pidfile /var/run/qemu-server/104.pid \
  -daemonize \
  -smbios 'type=1,uuid=ed540818-6aa0-4513-9066-59e2230a8ec1' \
  -drive 'if=pflash,unit=0,format=raw,readonly=on,file=/usr/share/pve-edk2-firmware//OVMF_CODE_4M.secboot.fd' \
  -drive 'if=pflash,unit=1,id=drive-efidisk0,format=qcow2,file=/var/lib/vz/images/104/vm-104-disk-0.qcow2' \
  -smp '4,sockets=1,cores=4,maxcpus=4' \
  -nodefaults \
  -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' \
  -vga none \
  -nographic \
  -cpu 'host,hv_ipi,hv_relaxed,hv_reset,hv_runtime,hv_spinlocks=0x1fff,hv_stimer,hv_synic,hv_time,hv_vapic,hv_vpindex,+kvm_pv_eoi,+kvm_pv_unhalt' \
  -m 8192 \
  -object 'iothread,id=iothread-virtioscsi0' \
  -readconfig /usr/share/qemu-server/pve-q35-4.0.cfg \
  -device 'vmgenid,guid=7d101ff1-89c1-4caa-a105-4518a7ffe837' \
  -device 'usb-tablet,id=tablet,bus=ehci.0,port=1' \
  -chardev 'socket,path=/var/run/qemu-server/104.qga,server=on,wait=off,id=qga0' \
  -device 'virtio-serial,id=qga0,bus=pci.0,addr=0x8' \
  -device 'virtserialport,chardev=qga0,name=org.qemu.guest_agent.0' \
  -iscsi 'initiator-name=iqn.1993-08.org.debian:01:8bf89e458fa' \
  -device 'virtio-scsi-pci,id=virtioscsi0,bus=pci.3,addr=0x1,iothread=iothread-virtioscsi0' \
  -drive 'file=/var/lib/vz/images/104/vm-104-disk-1.qcow2,if=none,id=drive-scsi0,format=qcow2,cache=none,aio=io_uring,detect-zeroes=on' \
  -device 'scsi-hd,bus=virtioscsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,rotation_rate=1,bootindex=100' \
  -netdev 'type=tap,id=net0,ifname=tap104i0,script=/var/lib/qemu-server/pve-bridge,downscript=/var/lib/qemu-server/pve-bridgedown,vhost=on' \
  -device 'virtio-net-pci,mac=BC:24:11:CB:06:4F,netdev=net0,bus=pci.0,addr=0x12,id=net0,rx_queue_size=1024,tx_queue_size=256' \
  -rtc 'driftfix=slew,base=localtime' \
  -machine 'hpet=off,type=pc-q35-8.1+pve0' \
  -global 'kvm-pit.lost_tick_policy=discard' \
  -cpu 'host,hypervisor=off,vmware-cpuid-freq=false,enforce=false,host-phys-bits=true,' \
  -device 'vfio-pci-nohotplug,addr=0x02,sysfsdev=/sys/bus/mdev/devices/df81aedb-05ed-4fee-9802-99e0e060c1e7,x-igd-opregion=on,display=on,ramfb=on,xres=1920,yres=1080' \
  -vnc 'unix:/var/run/qemu-server/104.vnc,password=on' \
  -display 'egl-headless,gl=core'

Information about the version of kvmgt

root@pve251:~# modinfo kvmgt
filename:       /lib/modules/6.5.11-7-pve/kernel/drivers/gpu/drm/i915/kvmgt.ko
author:         Intel Corporation
license:        GPL and additional rights
import_ns:      I915_GVT
import_ns:      DMA_BUF
srcversion:     C484DE61848F8648DB83E14
depends:        i915,kvm,vfio,drm,mdev
retpoline:      Y
intree:         Y
name:           kvmgt
vermagic:       6.5.11-7-pve SMP preempt mod_unload modversions
sig_id:         PKCS#7
signer:         Build time autogenerated kernel key
sig_key:        20:4A:0E:D5:14:C1:A2:98:9F:09:1A:F3:63:B7:A4:F3:FD:A6:88:6A
sig_hashalgo:   sha512
signature:      8A:70:A4:E9:CA:3B:BC:8E:DE:12:B1:B3:A1:3D:B7:62:5B:F1:86:7A:
                1F:28:C6:C1:B2:BB:67:9A:65:33:DC:72:7D:8D:D9:55:BB:D2:CE:77:
                13:4B:34:D3:9B:51:98:9E:7A:F7:9B:EF:04:AC:97:D8:22:A3:8B:AB:
                35:AB:5F:0A:52:5D:F4:FE:BD:D0:19:DF:81:E0:04:30:A6:1B:EC:11:
                53:34:1C:2B:97:F7:21:40:F5:54:0C:7E:AE:30:A2:A1:9D:82:4B:E2:
                B4:03:12:A5:D7:19:19:01:C8:F8:A8:95:35:95:81:AE:96:4E:73:F2:
                BA:88:88:44:40:B1:97:B3:68:75:D1:C3:C1:2E:C3:DB:96:0F:1D:53:
                82:D0:35:BB:E4:6E:CE:9C:CF:B0:66:54:99:E9:34:90:EC:84:03:DA:
                1D:40:60:0E:45:24:01:FA:C8:FE:C1:0E:0F:BA:CD:EF:B6:24:D2:6D:
                5E:5A:35:30:41:1D:57:17:3A:01:5F:61:E2:F0:20:88:D6:36:36:C2:
                93:3A:ED:BB:4A:42:BF:22:AF:10:C2:97:46:16:DA:E2:6C:76:C3:9C:
                56:00:25:64:7D:0B:93:99:C2:19:5E:D0:16:DF:3C:9D:F2:D3:BF:3B:
                7F:3E:84:1A:ED:E5:06:51:59:8F:95:FF:A3:85:A0:71:1B:88:37:C7:
                1A:A8:2D:91:6D:C4:6C:72:AE:71:CF:77:A6:AF:75:45:95:C0:C6:67:
                1A:69:04:61:82:70:97:B4:48:50:24:17:B4:CE:73:43:BD:D9:E3:C2:
                4D:1A:CD:1B:32:B2:4B:03:4A:0D:C6:90:50:31:5F:85:7F:9A:49:1C:
                C8:1B:AB:A1:1F:0D:03:25:C7:FC:97:2D:64:7B:4F:41:FC:4B:E3:3F:
                3C:F8:85:86:A2:F2:21:01:9B:E3:5D:8F:F1:8A:1B:FE:FF:64:72:E8:
                98:BA:11:DB:0A:40:D1:91:3A:9E:80:E0:0D:FF:EA:38:2C:CD:34:89:
                BC:88:89:CF:62:A5:E5:D7:19:64:55:25:CC:DF:C6:40:82:B6:9D:BB:
                B3:D5:C5:6C:B3:47:0B:8F:EA:00:79:BB:FD:37:2B:92:79:A8:3E:98:
                04:39:53:AC:06:64:1D:4C:70:5D:AB:94:69:4D:FD:5A:4B:97:24:BC:
                C1:DC:E7:F0:55:2A:93:D5:D8:90:6C:A8:9E:C4:AD:34:5F:29:78:B3:
                08:F3:F6:70:E5:35:1A:B3:73:4D:22:07:0A:32:6A:B0:76:79:FE:B8:
                B1:C6:33:7B:34:4C:DA:C8:D9:11:D9:A6:33:F1:C2:DA:E5:9D:B5:30:
                B9:EF:61:AE:06:C5:36:F9:ED:30:C5:F8
lurenJBD commented 6 months ago

Adding the error message that appears in dmesg

[   13.758213] ------------[ cut here ]------------
[   13.758215] RPM raw-wakeref not held
[   13.758231] WARNING: CPU: 2 PID: 352 at drivers/gpu/drm/i915/intel_runtime_pm.h:121 fwtable_read32+0x247/0x290 [i915]
[   13.758327] Modules linked in: kvmgt(+) mdev ipmi_ssif intel_rapl_msr intel_rapl_common intel_tcc_cooling x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel btusb btrtl btbcm crct10dif_pclmul polyval_clmulni polyval_generic ghash_clmulni_intel btintel aesni_intel btmtk crypto_simd cryptd rapl bluetooth acpi_ipmi intel_cstate ipmi_si ast pcspkr mei_me ecdh_generic joydev ipmi_devintf input_leds ee1004 drm_shmem_helper mei ecc intel_pch_thermal ie31200_edac ipmi_msghandler acpi_power_meter acpi_pad mac_hid i915 drm_buddy ttm drm_display_helper cec rc_core drm_kms_helper kvm vfio_pci vfio_pci_core irqbypass vfio_iommu_type1 vfio iommufd drm efi_pstore dmi_sysfs ip_tables x_tables autofs4 xfs btrfs blake2b_generic xor raid6_pq libcrc32c simplefb hid_generic usbmouse usbkbd usbhid hid nvme crc32_pclmul i2c_i801 ixgbe r8169 igb i2c_smbus xhci_pci nvme_core xhci_pci_renesas realtek nvme_common i2c_algo_bit xfrm_algo ahci dca xhci_hcd intel_ish_ipc libahci mdio intel_ishtp video wmi
[   13.758374] CPU: 2 PID: 352 Comm: systemd-modules Tainted: G     U    I        6.5.11-7-pve #1
[   13.758376] Hardware name: Supermicro Super Server/X11SSH-LN4F, BIOS 2.4 06/02/2020
[   13.758377] RIP: 0010:fwtable_read32+0x247/0x290 [i915]
[   13.758446] Code: 0f b6 05 38 ca 21 00 3c 01 0f 87 cd ac 1d 00 a8 01 0f 85 13 fe ff ff 48 c7 c7 50 8a 27 c1 c6 05 1a ca 21 00 01 e8 59 c2 5b e9 <0f> 0b 41 c1 ef 10 0f 85 fe fd ff ff 44 0f b6 3d 00 ca 21 00 41 80
[   13.758447] RSP: 0018:ffff9e740040b9b0 EFLAGS: 00010246
[   13.758449] RAX: 0000000000000000 RBX: ffff8bedd2351d90 RCX: 0000000000000000
[   13.758450] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
[   13.758451] RBP: ffff9e740040b9e0 R08: 0000000000000000 R09: 0000000000000000
[   13.758452] R10: 0000000000000000 R11: 0000000000000000 R12: 00000000000020a8
[   13.758453] R13: 00000000000020a8 R14: 0000000000000000 R15: 0000000000000000
[   13.758454] FS:  00007fb27089e440(0000) GS:ffff8bfd2fc80000(0000) knlGS:0000000000000000
[   13.758455] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   13.758456] CR2: 0000563254538090 CR3: 0000000110b9c006 CR4: 00000000003706e0
[   13.758457] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[   13.758458] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[   13.758459] Call Trace:
[   13.758460]  <TASK>
[   13.758461]  ? show_regs+0x6d/0x80
[   13.758465]  ? __warn+0x89/0x160
[   13.758469]  ? fwtable_read32+0x247/0x290 [i915]
[   13.758537]  ? report_bug+0x17e/0x1b0
[   13.758540]  ? handle_bug+0x46/0x90
[   13.758543]  ? exc_invalid_op+0x18/0x80
[   13.758545]  ? asm_exc_invalid_op+0x1b/0x20
[   13.758549]  ? fwtable_read32+0x247/0x290 [i915]
[   13.758616]  handle_mmio+0x4a/0x80 [i915]
[   13.758708]  iterate_generic_mmio+0x25/0x5dc0 [i915]
[   13.758798]  intel_gvt_iterate_mmio_table+0x17/0x1983 [i915]
[   13.758886]  intel_gvt_init_device.part.0+0xfb/0x1f0 [i915]
[   13.758974]  ? __pfx_handle_mmio+0x10/0x10 [i915]
[   13.759062]  intel_gvt_set_ops+0x9d/0xe0 [i915]
[   13.759149]  ? __pfx_kvmgt_init+0x10/0x10 [kvmgt]
[   13.759164]  kvmgt_init+0x19/0xff0 [kvmgt]
[   13.759177]  do_one_initcall+0x5e/0x340
[   13.759181]  do_init_module+0x68/0x260
[   13.759184]  load_module+0x213a/0x22a0
[   13.759188]  init_module_from_file+0x96/0x100
[   13.759190]  ? init_module_from_file+0x96/0x100
[   13.759193]  idempotent_init_module+0x11c/0x2b0
[   13.759196]  __x64_sys_finit_module+0x64/0xd0
[   13.759199]  do_syscall_64+0x5b/0x90
[   13.759201]  ? syscall_exit_to_user_mode+0x37/0x60
[   13.759204]  ? do_syscall_64+0x67/0x90
[   13.759206]  ? syscall_exit_to_user_mode+0x37/0x60
[   13.759208]  ? do_syscall_64+0x67/0x90
[   13.759209]  ? syscall_exit_to_user_mode+0x37/0x60
[   13.759212]  ? do_syscall_64+0x67/0x90
[   13.759213]  ? do_syscall_64+0x67/0x90
[   13.759215]  entry_SYSCALL_64_after_hwframe+0x6e/0xd8
[   13.759217] RIP: 0033:0x7fb270d20559
[   13.759233] Code: 08 89 e8 5b 5d c3 66 2e 0f 1f 84 00 00 00 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 77 08 0d 00 f7 d8 64 89 01 48
[   13.759234] RSP: 002b:00007fff8d191458 EFLAGS: 00000246 ORIG_RAX: 0000000000000139
[   13.759236] RAX: ffffffffffffffda RBX: 000055a942739a50 RCX: 00007fb270d20559
[   13.759237] RDX: 0000000000000000 RSI: 00007fb2711feefd RDI: 000000000000000e
[   13.759238] RBP: 00007fb2711feefd R08: 0000000000000000 R09: 000055a942743f70
[   13.759239] R10: 000000000000000e R11: 0000000000000246 R12: 0000000000020000
[   13.759240] R13: 0000000000000000 R14: 000055a9427398f0 R15: 000000000000001a
[   13.759242]  </TASK>
[   13.759242] ---[ end trace 0000000000000000 ]---
[   13.759243] ------------[ cut here ]------------
[   13.759244] RPM wakelock ref not held during HW access
[   13.759254] WARNING: CPU: 2 PID: 352 at drivers/gpu/drm/i915/intel_runtime_pm.h:129 fwtable_read32+0x282/0x290 [i915]
[   13.759324] Modules linked in: kvmgt(+) mdev ipmi_ssif intel_rapl_msr intel_rapl_common intel_tcc_cooling x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel btusb btrtl btbcm crct10dif_pclmul polyval_clmulni polyval_generic ghash_clmulni_intel btintel aesni_intel btmtk crypto_simd cryptd rapl bluetooth acpi_ipmi intel_cstate ipmi_si ast pcspkr mei_me ecdh_generic joydev ipmi_devintf input_leds ee1004 drm_shmem_helper mei ecc intel_pch_thermal ie31200_edac ipmi_msghandler acpi_power_meter acpi_pad mac_hid i915 drm_buddy ttm drm_display_helper cec rc_core drm_kms_helper kvm vfio_pci vfio_pci_core irqbypass vfio_iommu_type1 vfio iommufd drm efi_pstore dmi_sysfs ip_tables x_tables autofs4 xfs btrfs blake2b_generic xor raid6_pq libcrc32c simplefb hid_generic usbmouse usbkbd usbhid hid nvme crc32_pclmul i2c_i801 ixgbe r8169 igb i2c_smbus xhci_pci nvme_core xhci_pci_renesas realtek nvme_common i2c_algo_bit xfrm_algo ahci dca xhci_hcd intel_ish_ipc libahci mdio intel_ishtp video wmi
[   13.759362] CPU: 2 PID: 352 Comm: systemd-modules Tainted: G     U  W I        6.5.11-7-pve #1
[   13.759363] Hardware name: Supermicro Super Server/X11SSH-LN4F, BIOS 2.4 06/02/2020
[   13.759364] RIP: 0010:fwtable_read32+0x282/0x290 [i915]
[   13.759432] Code: ca 21 00 41 80 ff 01 0f 87 7f ac 1d 00 41 83 e7 01 0f 85 e2 fd ff ff 48 c7 c7 e8 b0 23 c1 c6 05 de c9 21 00 01 e8 1e c2 5b e9 <0f> 0b e9 c8 fd ff ff 0f 1f 80 00 00 00 00 90 90 90 90 90 90 90 90
[   13.759433] RSP: 0018:ffff9e740040b9b0 EFLAGS: 00010246
[   13.759435] RAX: 0000000000000000 RBX: ffff8bedd2351d90 RCX: 0000000000000000
[   13.759435] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
[   13.759436] RBP: ffff9e740040b9e0 R08: 0000000000000000 R09: 0000000000000000
[   13.759437] R10: 0000000000000000 R11: 0000000000000000 R12: 00000000000020a8
[   13.759438] R13: 00000000000020a8 R14: 0000000000000000 R15: 0000000000000000
[   13.759439] FS:  00007fb27089e440(0000) GS:ffff8bfd2fc80000(0000) knlGS:0000000000000000
[   13.759440] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   13.759441] CR2: 0000563254538090 CR3: 0000000110b9c006 CR4: 00000000003706e0
[   13.759442] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[   13.759443] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[   13.759443] Call Trace:
[   13.759444]  <TASK>
[   13.759445]  ? show_regs+0x6d/0x80
[   13.759447]  ? __warn+0x89/0x160
[   13.759449]  ? fwtable_read32+0x282/0x290 [i915]
[   13.759517]  ? report_bug+0x17e/0x1b0
[   13.759520]  ? handle_bug+0x46/0x90
[   13.759522]  ? exc_invalid_op+0x18/0x80
[   13.759523]  ? asm_exc_invalid_op+0x1b/0x20
[   13.759526]  ? fwtable_read32+0x282/0x290 [i915]
[   13.759593]  handle_mmio+0x4a/0x80 [i915]
[   13.759684]  iterate_generic_mmio+0x25/0x5dc0 [i915]
[   13.759773]  intel_gvt_iterate_mmio_table+0x17/0x1983 [i915]
[   13.759861]  intel_gvt_init_device.part.0+0xfb/0x1f0 [i915]
[   13.759950]  ? __pfx_handle_mmio+0x10/0x10 [i915]
[   13.760038]  intel_gvt_set_ops+0x9d/0xe0 [i915]
[   13.760126]  ? __pfx_kvmgt_init+0x10/0x10 [kvmgt]
[   13.760139]  kvmgt_init+0x19/0xff0 [kvmgt]
[   13.760150]  do_one_initcall+0x5e/0x340
[   13.760153]  do_init_module+0x68/0x260
[   13.760156]  load_module+0x213a/0x22a0
[   13.760160]  init_module_from_file+0x96/0x100
[   13.760162]  ? init_module_from_file+0x96/0x100
[   13.760165]  idempotent_init_module+0x11c/0x2b0
[   13.760168]  __x64_sys_finit_module+0x64/0xd0
[   13.760171]  do_syscall_64+0x5b/0x90
[   13.760172]  ? syscall_exit_to_user_mode+0x37/0x60
[   13.760175]  ? do_syscall_64+0x67/0x90
[   13.760177]  ? syscall_exit_to_user_mode+0x37/0x60
[   13.760179]  ? do_syscall_64+0x67/0x90
[   13.760180]  ? syscall_exit_to_user_mode+0x37/0x60
[   13.760183]  ? do_syscall_64+0x67/0x90
[   13.760184]  ? do_syscall_64+0x67/0x90
[   13.760186]  entry_SYSCALL_64_after_hwframe+0x6e/0xd8
[   13.760188] RIP: 0033:0x7fb270d20559
[   13.760193] Code: 08 89 e8 5b 5d c3 66 2e 0f 1f 84 00 00 00 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 77 08 0d 00 f7 d8 64 89 01 48
[   13.760194] RSP: 002b:00007fff8d191458 EFLAGS: 00000246 ORIG_RAX: 0000000000000139
[   13.760196] RAX: ffffffffffffffda RBX: 000055a942739a50 RCX: 00007fb270d20559
[   13.760197] RDX: 0000000000000000 RSI: 00007fb2711feefd RDI: 000000000000000e
[   13.760198] RBP: 00007fb2711feefd R08: 0000000000000000 R09: 000055a942743f70
[   13.760198] R10: 000000000000000e R11: 0000000000000246 R12: 0000000000020000
[   13.760199] R13: 0000000000000000 R14: 000055a9427398f0 R15: 000000000000001a
[   13.760201]  </TASK>
[   13.760202] ---[ end trace 0000000000000000 ]---
lurenJBD commented 5 months ago

Running Windows Guest on HD P630 will not switch the display, there will be two monitors, it is not clear if it is a driver problem or a QEMU/KVMGT problem!

It was mentioned in this https://github.com/intel/gvt-linux/issues/178#issuecomment-805079736 .

After testing, I found that on BlissOS11 (Linux 5.15 kernel), it can output the screen normally, and the resolution is not locked at 800x600, but there will be a switch during the startup process, see the following video

https://github.com/intel/gvt-linux/assets/31967654/3529c73e-6c7d-4c8b-be16-edff78f04c65

This is the system information of BlissOS, you can see that the HD P630 graphics card is recognized.

blissOS_info

Here are the parameters for the BlissOS11 VM startup

root@pve251:~# qm showcmd 107 --pretty
/usr/bin/kvm \
  -id 107 \
  -name 'Android-11,debug-threads=on' \
  -no-shutdown \
  -chardev 'socket,id=qmp,path=/var/run/qemu-server/107.qmp,server=on,wait=off' \
  -mon 'chardev=qmp,mode=control' \
  -chardev 'socket,id=qmp-event,path=/var/run/qmeventd.sock,reconnect=5' \
  -mon 'chardev=qmp-event,mode=control' \
  -pidfile /var/run/qemu-server/107.pid \
  -daemonize \
  -smbios 'type=1,uuid=ada12a68-04fe-40ca-84c2-fd047d63c750' \
  -drive 'if=pflash,unit=0,format=raw,readonly=on,file=/usr/share/pve-edk2-firmware/OVMF_CODE_4M.secboot.fd' \
  -drive 'if=pflash,unit=1,id=drive-efidisk0,format=qcow2,file=/var/lib/vz/images/107/vm-107-disk-0.qcow2' \
  -smp '2,sockets=1,cores=2,maxcpus=2' \
  -nodefaults \
  -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' \
  -vga none \
  -nographic \
  -display 'egl-headless,gl=core' \
  -vnc 'unix:/var/run/qemu-server/107.vnc,password=on' \
  -cpu host,+kvm_pv_eoi,+kvm_pv_unhalt \
  -m 4096 \
  -object 'iothread,id=iothread-virtioscsi0' \
  -readconfig /usr/share/qemu-server/pve-q35-4.0.cfg \
  -device 'vmgenid,guid=32bd78f7-e4d7-4706-a28a-7b1f3c19023b' \
  -device 'usb-tablet,id=tablet,bus=ehci.0,port=1' \
  -iscsi 'initiator-name=iqn.1993-08.org.debian:01:8bf89e458fa' \
  -device 'virtio-scsi-pci,id=virtioscsi0,bus=pci.3,addr=0x1,iothread=iothread-virtioscsi0' \
  -drive 'file=/var/lib/vz/images/107/vm-107-disk-1.qcow2,if=none,id=drive-scsi0,format=qcow2,cache=none,aio=io_uring,detect-zeroes=on' \
  -device 'scsi-hd,bus=virtioscsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,rotation_rate=1,bootindex=100' \
  -netdev 'type=tap,id=net0,ifname=tap107i0,script=/var/lib/qemu-server/pve-bridge,downscript=/var/lib/qemu-server/pve-bridgedown,vhost=on' \
  -device 'virtio-net-pci,mac=BC:24:11:B9:67:98,netdev=net0,bus=pci.0,addr=0x12,id=net0,rx_queue_size=1024,tx_queue_size=256' \
  -machine 'type=q35+pve0' \
  -device 'vfio-pci-nohotplug,addr=0x02,sysfsdev=/sys/bus/mdev/devices/00000000-0000-0000-0000-000000000107,display=on,x-igd-opregion=on,romfile=vbios_gvt_uefi.rom,ramfb=on,xres=1920,yres=1080,bus=pcie.0,multifunction=on'

I then reinstalled Win11 and used the second display as an extended display, and then verified using OBS that the second display does indeed work, but QEMU doesn't seem to automatically switch over, or to be more precise, turn off the initial display by ramfb

在Win11上有两个显示器

在Win11上有两个显示器-2

In OBS using monitor capture you can see the screen that should be outputted 通过OBS可以看到第二个显示屏的内容-1

There are two display options in dxdiag dxdiag里有两个显示选项-1

dxdiag里有两个显示选项-2