On Wednesday 12 November 2014 16:52:25 Paolo Bonzini wrote: > On 12/11/2014 16:39, Peter Maydell wrote: > > > Definitely, I think having the OS manually program the BARs only makes > > > sense > > > in an environment where you don't have a full-featured boot loader or you > > > don't trust it. In servers and virtual machines, the PCI bus should > > > always come > > > fully set up. This also implies that the OS should not have to deal with > > > registers for setting up the translation between PCI and system address > > > ranges. > > > > It seems to me like complicated stuff like that definitely belongs > > in the UEFI/bootloader blob, though. I'd rather QEMU just modelled > > the hardware and let the guest (or the firmware, which is guest > > code from QEMU's point of view) set it up however it wants. > > It definitely doesn't belong in QEMU!
The easiest option would probably be not make all PCI devices have fixed BARs and not even allow them to be changed. I believe this is what kvmtool does, but I can see how supporting both modes is much harder than either one. How does it work on x86 with qemu? Arnd