On 14/10/2021 21:20, BALATON Zoltan wrote:
On Sat, 2 Oct 2021, BALATON Zoltan wrote:
Is there any guest OS in your test cases that this patch would break? If not
Ping? I know you're also busy with upstreaming q800 (great work by the way) but did you have a chance to test this? Or maybe I can help if you tell me what to test but I may bot have the same images you normally use.
I spent a few hours researching various device trees and testing the patch this morning. From what I can tell the bus numbers are scoped to the PCI host bridge (i.e. a single domain) and so the bus number 0 in the patch is valid: the bus numbers would only need to change if there were PCI-PCI bridges within the topology.
The main issue I found with the patch is that it causes some of my older Linux images to hang on boot :( The easiest way to reproduce this is booting QEMU with openSUSE-11.1-NET-ppc.iso like this:
./qemu-system-ppc -M mac99,via=pmu -cdrom openSUSE-11.1-NET-ppc.iso -serial stdio -boot d -m 512 -bios openbios-qemu.elf.nostrip -g 800x600x8
From the memory errors that get displayed with the patch applied my guess is that you need to come up with a suitable "ranges" property for your new PCI bus. Take a look at .host_ranges in arch/ppc/qemu/init.c and pci_host_set_ranges() in drivers/pci.c to see how this is created.
ATB,
Mark.