On Tue, 3 Jun 2014, Segher Boessenkool wrote:
Enabling bus mastering on a PCI device allows the device to generate reads and writes on the PCI bus.
It fails in exciting and mysterious ways if you haven't yet set up bus mastering on your PCI-PCI bridges and your PHB yet. And related config, e.g. the windows on those bridges.
I don't know if PCI bridges are supported by OpenBIOS yet (probably not as an XXX comment says in qemu/hw/pci-host/uninorth.c) but if not then it would not work on real hardware anyway, would it?
Things get a lot more interesting if you have an IOMMU, too. DMA is evil. Scared yet? You should be.
I could enclose the enabling bus mastering part in a check for CONFIG_QEMU if that would make it safer. What do you think?
Regards, BALATON Zoltan