On Tue, Aug 23, 2016 at 08:28:06PM +0200, Alexander Gordeev wrote: > On Wed, Aug 17, 2016 at 04:26:54PM +0200, Andrew Jones wrote: > > And now for bad news. I imported your branch and tested it. It works > > great over TCG, but hits the "No PCI resource found for a device" > > assert when running with KVM on an AArch64 server. I've only tried on > > a mustang so far. > > Unlike TCG, KVM on an AArch64 reports pci-testdev's BAR #4 value of 0xC. > It denotes to 64 bit prefetch memory, which is absent. What is more, > BAR #4 is not implemented in pci-testdev. Only two BARs are expected > (qemu hw/misc/pci-testdev.c): > > pci_register_bar(pci_dev, 0, PCI_BASE_ADDRESS_SPACE_MEMORY, &d->mmio); > pci_register_bar(pci_dev, 1, PCI_BASE_ADDRESS_SPACE_IO, &d->portio); > > So the assert sounds about right and the question is why BAR #4 is there. I finally had a chance to take a look at this. There's no BAR#4 being exposed from pci-testdev. QEMU is adding a default virtio-net-pci device, which does have a BAR#4. Adjusting the QEMU env like this export QEMU="$QEMU -nodefaults" which removes default devices, allows the new unit test to run and pass. kvm-unit-tests shouldn't be asserting and dying when it's presented a valid virtio-net-pci device though. It should handle the probing correctly, or at least just warn that it doesn't know how to, and then ignore it. Alex, can you consider what might need to be tweaked in this series to do that? That said, as kvm-unit-tests isn't going to drive non-testdev devices anyway, then just removing default devices is a reasonable thing to do too. I'll submit a patch adding '-nodefaults -nodefconfig' to the arm QEMU command line. Thanks, drew -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html