Can confirm that it does not crash after applying that patch. I've added
the `fprintf` statement there:
if (vdev->bars[i].size) {
vfio_bar_quirk_setup(vdev, i);
} else {
fprintf(stderr, "%04x:%04x bars for %d are empty\n",
vdev->vendor_id, vdev->device_id, i)
I recorded both lspci - and lspci - for the following
connections:
- hotplug: when GPU is connected after the host was loaded
- fresh: when GPU is connected before the host was started
The main difference is the following:
1c1
< # hotplug
---
> # fresh
6c6
< Control: I/O+ Mem-
Please attach output from `dmesg` and `sudo lspci -vvv`, both from the
host. Laptops typically don't provide sufficient resources for GPUs
attached like this, so my guess is that we're trying to add a quirk on
top of a BAR that isn't mapped. If that's the case, the following host
kernel options m
dmesg:
[0.00] microcode: microcode updated early to revision 0x21, date =
2019-02-13
[0.00] Linux version 5.8.6-1-MANJARO (builder@db927223e331) (gcc (GCC)
10.2.0, GNU ld (GNU Binutils) 2.35) #1 SMP PREEMPT Thu Sep 3 14:19:36 UTC 2020
[0.00] Command line: BOOT_IMAGE=/boot
Thank you Alex for answering me.
It seems, I've got it working, if I boot the host with the connected GPU from
the very beginning.
Previously, I tried hotplug and it crashes.
So previously I had:
1. enable the host
2. enable GPU
3. connect the cable
And this time I tried:
1. enable GP
What's more interesting, it doesn't crash if I hotplug GPU after it was boot
with it. So if I do
1. enable GPU
2. connect the cord
3. enable the host
4. run qemu (I'm not sure, if it's mandatory)
5. disable cord
6. disable GPU
7. enable GPU
8. enable cord
9. run qemu again
qe
There are definitely resource allocation issues on the host in the
crashing case. The quirks currently enumerate the device BARs without
testing them, we identify a device and know what the resources should
be, which is why I think QEMU crashes. Are you able to test if the
patch below is sufficie
non-mangled patch
** Patch added: "patch for test"
https://bugs.launchpad.net/qemu/+bug/1897481/+attachment/5415693/+files/test-bar-size.diff
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1897481