
On Tue, 2017-01-10 at 03:38 -0500, Laine Stump wrote: [...]
- if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VIRTIO_MMIO)) { - qemuDomainPrimeVirtioDeviceAddresses( - def, VIR_DOMAIN_DEVICE_ADDRESS_TYPE_VIRTIO_MMIO); + /* We use virtio-mmio by default on mach-virt guests only if they already + * have at least one virtio-mmio device: in all other cases, we prefer + * virtio-pci */ + if (qemuDomainMachineHasPCIeRoot(def) && + !qemuDomainHasVirtioMMIODevices(def)) { + qemuDomainPrimeVirtioDeviceAddresses(def, + VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI); I'm having trouble remembering, and it's too early in the morning to go looking in the code - it seems like priming the addresses with PCI might not be necessary - as long as we simply *don't* prime them with virtio-mmio. I could be misremembering though. ACK either way.
It looks like that's indeed the case from changing the code accordingly and running the test suite. However, a cursory look (it's morning here as well ;) at the code didn't give me enough confidence that it's working by design rather than pure chance, and with the freeze coming up shortly I decided to push the possibly slightly suboptimal code instead. I will go back to this and remove it if it turns out to be safe to do so after 3.0.0 is out.
(ACK is based on the assumption that all concerned ARM parties have agreed that it's time to do this. I *think* that is the case :-)
It's been agreed a while ago that the only thing stopping us from changing the default was poor guest support; as mentioned in the commit message, that's no longer a concern, so onwards to the future we go! :) Thanks for the review. -- Andrea Bolognani / Red Hat / Virtualization