qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] pci: single device at function != 0


From: Alexey Kardashevskiy
Subject: [Qemu-devel] pci: single device at function != 0
Date: Wed, 20 Nov 2013 18:39:17 +1100
User-agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0

Hi!

It turned out that it is possible to start QEMU with a single PCI device
placed at 0:0:1.1. I.e. function#1 and there is no function#0. The existing
QEMU only fails if there is function#0 AND the multifunction bit is not set
which is not the case.

Is it supposed to work anywhere (x86 may be)?

In our case SLOF does not scan other functions if there is nothing at
function#0. And the linux kernel does the same thing - it scans other
functions only if sees "multifunction" on function#0.

But I cannot see anywhere in the PCI spec that this configuration is
illegal and must not work. Normally "pseries" guest does not scan PCI and
uses what it gets via the device tree and if we put there devices at
0:0:1.1, it is expected to see the device and work (but not sure).


So - is it a SLOF bug? Or QEMU just does not have right place before
starting the machine to verify that some devices do not have a PCI function
at 0 and print a warning that they won't be detected by the guest? Thanks.


This is the command line example:

./qemu-system-ppc64 \
 -trace "events=qemu_trace_events" \
 -L "qemu-ppc64-bios/" \
 -nographic \
 -vga "none" \
 -device \
 
virtio-blk-pci,scsi=off,bus=pci,addr=1.1,drive=drive-virtio-disk53,id=virtio-disk53
 \
 -drive \
 file=virtimg/test1,if=none,id=drive-virtio-disk53,format=qcow2,cache=none \
 -S \
 -m "2048" \
 -machine "pseries" \
 -enable-kvm \
 -kernel "vml312-probe-pci" \
 -initrd "1.cpio"



-- 
Alexey



reply via email to

[Prev in Thread] Current Thread [Next in Thread]