From: Andrej Krutak <1856834@bugs.launchpad.net>
To: qemu-devel@nongnu.org
Subject: [Bug 1856834] Re: PCI broken in qemu ppc e500 in v2.12.0 and other versions
Date: Tue, 20 Oct 2020 10:53:32 -0000 [thread overview]
Message-ID: <160319121255.22162.17683775548479385650.malone@gac.canonical.com> (raw)
In-Reply-To: 157666458990.14847.6716769636962803095.malonedeb@wampee.canonical.com
After some research, the problem is that mpc8544ds has only 2 PCI slots
defined (hw/ppc/mpc8544ds.c -> pmc->pci_nr_slots = 2;). This in turn
results in DTB only contain 2 devices in pci@e0008000/interrupt-map. Too
bad qemu doesn't complain when more devices are added - the PCI bars
seem to be OK, just interrupts are not found by linux, hence the error
-22:
pci 8000:00:13.0: of_irq_parse_pci: failed with rc=-22
...and later virtio_rng probe freeze (which freezes linux boot, if a
module is not used and probed in different process).
Changing pci_nr_slots to bigger number (e.g. 4) seems to work just OK,
though of course the mpc8544ds simulation is then non-realistic. A
cleaner solution is adding PCI-PCI bridge, that seems to work too.
As a side-note, MSI doesn't seem to work on e500mc neither. Enabling MSI
support in kernel seems to cause that virtio-blk-pci device probe freeze
in linux, /proc/interrupts shows:
19: 0 fsl-msi-224 0 Edge virtio1-config
20: 0 fsl-msi-224 1 Edge virtio1-req.0
Without MSI, legacy IRQ is used and that seems to work OK:
17: 743 OpenPIC 3 Level virtio1
Alternatively, passing vectors=0 to the virtio device (-device virtio-
blk,drive=drive0,vectors=0 -drive ...) does the trick as well.
That was a fun ride... :-)
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1856834
Title:
PCI broken in qemu ppc e500 in v2.12.0 and other versions
Status in QEMU:
New
Bug description:
The same qemu -M mpc... command that works on qemu-system-ppc version
2.8.0 freezes guest on bootup and shows error for qemu-system-ppc
version 4.2.0release and 4.19dirtygit:
qemu-system-ppc: virtio-blk failed to set guest notifier (-24), ensure -accel kvm is set.
qemu-system-ppc: virtio_bus_start_ioeventfd: failed. Fallback to userspace (slower).
ends/freezes at:
nbd: registered device at major 43
vda:
I'm using -drive file=/home/me/rawimage.dd,if=virtio and works fine in
version 2.8.0 installed with apt-get install (Ubuntu 17.04) and also
with 2.8.0 official release from git/github that I compiled/built
myself. But both of the newer releases fail on the same exact machine
same config.
I also noticed that qemu-2.8.0 was fine with mtd but the newer ones I tried weren't, ie gave
qemu-system-ppc: -drive if=mtd: machine type does not support if=mtd,bus=0,unit=0
(but I removed -drive if=mtd since wasn't using it anyway)
I also tried on windows but I think virtio doesn't work on windows
hosts at all? On windows host it fails the same way, even version 2.12
as well as 4.1.10...
used:
./configure --prefix=/opt/... --enable-fdt --enable-kvm --enable-debug
(basically all steps the same on same exact system same config, yet
2.8.0 works fine whether apt-get installed or built from source while
the others I built, 4.19/4.2.0 or 2.12/4.1.10(win) don't.)
In case newer qemu versions act weird on various kernels, I did try with both vmlinuz-4.10.0-19-generic and vmlinuz-4.13.12-041312-generic (I didn't compile them but I can provide config-..files. This is on Ubuntu 17.04 x86_64 host emulating e500v2 cpm guest, ie -M mpc... GUEST kernel 2.6.32.44 which is why I can't use -M ppce500 instead..)
tx
ecs
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1856834/+subscriptions
next prev parent reply other threads:[~2020-10-20 11:03 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-18 10:23 [Bug 1856834] [NEW] softmmu qemu-system-ppc freezes at virtio vda ecsdn
2019-12-18 10:28 ` [Bug 1856834] " ecsdn
2019-12-18 21:17 ` [Bug 1856834] Re: Virtio broken in qemu ppc in 4.2.0 and other versions ecsdn
2019-12-18 21:28 ` ecsdn
2019-12-18 23:45 ` ecsdn
2019-12-19 9:06 ` Laurent Vivier
2019-12-20 5:23 ` ecsdn
2019-12-20 13:30 ` Laurent Vivier
2019-12-20 17:02 ` ecsdn
2019-12-20 17:20 ` ecsdn
2020-01-03 5:29 ` ecsdn
2020-01-07 17:11 ` Laurent Vivier
2020-01-07 18:01 ` ecsdn
2020-01-10 22:53 ` ecsdn
2020-01-11 11:35 ` Laurent Vivier
2020-01-11 11:39 ` [Bug 1856834] Re: PCI broken in qemu ppc e500 in v2.12.0 " Laurent Vivier
2020-01-11 18:44 ` ecsdn
2020-10-16 6:16 ` Andrej Krutak
2020-10-20 10:53 ` Andrej Krutak [this message]
2020-10-21 4:51 ` Andrej Krutak
2021-05-02 18:15 ` Thomas Huth
2021-07-02 4:17 ` Launchpad Bug Tracker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=160319121255.22162.17683775548479385650.malone@gac.canonical.com \
--to=1856834@bugs.launchpad.net \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).