nutanix / libvfio-user

framework for emulating devices in userspace
BSD 3-Clause "New" or "Revised" License
168 stars 51 forks source link

Support 64 bits and prefetchable BARs #792

Closed jfgd closed 7 months ago

jfgd commented 8 months ago

Add two new flags for lib user to request 64bits and/or prefetchable BARs.

Tested with a vfio-user client patched QEMU.

jlevon commented 8 months ago

Thanks for the patch! As Thanos said, do you mind taking a look at adding a simple test in test/py/ ?

Can you share your qemu client patches?

Did you need further changes? Do you care about very large BAR sizes, or just locating them past 4g?

jfgd commented 8 months ago

Thanks for the patch! As Thanos said, do you mind taking a look at adding a simple test in test/py/ ?

Ok, I'll have a look at it

Can you share your qemu client patches?

I simply used the branch vfio-user-p3.1 from https://github.com/oracle/qemu.git, no changes needed there

Did you need further changes? Do you care about very large BAR sizes, or just locating them past 4g?

No, my use case was to expose a very large BAR of 2GiB (located above 4G), this patch is enough for this. Setting the PCI_BASE_ADDRESS_MEM_TYPE_64 bit made QEMU and the PCI host driver happy.

jlevon commented 7 months ago

Thanks for the contribution!