RE: [PATCH v4 2/5] drm/virtio: Add a helper to map and note the dma addrs and lengths

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Dmitry,

> >> Wondering if it could be a problem with my guest kernel config. I
> >> attached my config to the email, please try to boot guest with my config
> >> if you'll have time.
> > Sure, let me try to test with your config. Could you also please share your
> > Qemu launch parameters?
> 
> Recap of the DG2 problem:
> 
> The virtio-gpu PCIe accesses in guest are becoming rejected as soon as Intel
> driver (either i915 or Xe) is probed. My theory is that Intel driver causes PCIe
> config change that indirectly breaks virtio-gpu PCIe. This problem isn't
> observed by swapping DG2 card with AMD card. AMD setup works perfectly
> fine on the same machine with GPU card plugged into the same PCIe slot as
> DG2 was on host.
> 
> $ lspci | grep DG2
> 0c:00.0 VGA compatible controller: Intel Corporation DG2 [Arc A750] (rev 08)
> 0d:00.0 Audio device: Intel Corporation DG2 Audio Controller
Looks like the GPU and the audio devices are on different buses (I see the same
in my setup as well) but you are making them appear as different functions of
the same device in Guest VM:
01:00.0 VGA compatible controller [0300]: Intel Corporation DG2 [Intel Graphics] [8086:56bd] (rev 05) (prog-if 00 [VGA controller])
        Subsystem: Intel Corporation Device [8086:1211]
        Physical Slot: 0
        Kernel driver in use: i915
        Kernel modules: i915, xe
01:00.1 Audio device [0403]: Intel Corporation DG2 Audio Controller [8086:4f92]
        Subsystem: Intel Corporation Device [8086:1211]
        Physical Slot: 0

I am not sure if this a valid config or not. Regardless, the presence of i915 preventing
virtio-gpu from probing correctly in this situation is indeed a problem that I am able
to see in my setup as well (with your Qemu parameters, especially the pcie-port ones).
I'll definitely take a look at this issue next week. 

> 
> qemu-system-x86_64 \
> -kernel linux-guest/arch/x86_64/boot/bzImage \
> -append "console=ttyS0 nokaslr root=/dev/sda init=/lib/systemd/systemd
> vt.global_cursor_default=0 log_buf_len=16M" \
> -netdev user,id=u1,hostfwd=tcp::10022-:22 \
> -device virtio-net-pci,netdev=u1 \
> -serial mon:stdio -m 24G \
> --enable-kvm \
> -cpu host,host-phys-bits=on,host-phys-bits-limit=39 \
> -device virtio-vga,max_outputs=1,xres=1920,yres=1080,blob=true \
> -device virtio-tablet-pci \
> -device virtio-balloon \
> -device virtio-keyboard-pci \
> -display gtk,gl=on \
> -smp 16 \
> -machine q35,accel=kvm,kernel-irqchip=split,memory-backend=mem1 \
> -object memory-backend-memfd,id=mem1,size=24G \
> -d guest_errors \
> -drive file=disk.img,format=raw \
> -device pcie-root-
> port,id=pcie.1,bus=pcie.0,addr=1c.0,slot=1,chassis=1,multifunction=on \
> -device vfio-pci,host=0c:00.0,bus=pcie.1,addr=00.0,x-
> vga=on,multifunction=on \
> -device vfio-pci,host=0d:00.0,bus=pcie.1,addr=00.1
Passthrough'ng the devices directly instead of creating a new pcie root port
enables virtio-gpu to work correctly in my setup. That is, having just
-device vfio-pci,host=0c:00.0,x-vga=on -device vfio-pci,host=0d:00.0

instead of the last few lines in your Qemu parameters list makes virtio-gpu
to work as expected. Could you please try it out and let me know if it works?

Thanks,
Vivek

> 
> Guest kernel boot log is attached to this email.
> 
> --
> Best regards,
> Dmitry




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux