nutanix / libvfio-user

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

fix compilation for i386 and ppc64 #709

Closed tmakatos closed 1 year ago

tmakatos commented 2 years ago

Signed-off-by: Thanos Makatos thanos.makatos@nutanix.com

jlevon commented 2 years ago

I really hate PRix64 and friends, they make code so unreadable. Can't we just use %llx and cast the arg instead?

Also, if we want to support these (I'm surprised i686 is still relevant), we need some CI to at least build + test them.

tmakatos commented 2 years ago

I really hate PRix64 and friends, they make code so unreadable. Can't we just use %llx and cast the arg instead?

Sure.

Also, if we want to support these (I'm surprised i686 is still relevant), we need some CI to at least build + test them.

Indeed.

jlevon commented 2 years ago

BTW, someone pointed me to: https://lore.kernel.org/lkml/alpine.DEB.2.22.394.2208251435370.104368@digraph.polyomino.org.uk/

Looking forward to that!!

jlevon commented 2 years ago

why do we need our own vfio_user_region_info?

tmakatos commented 2 years ago

why do we need our own vfio_user_region_info?

We don't, that was from the first version where I was working around the different typedef for u64 between x86_64 and i386.

tmakatos commented 2 years ago

Also, if we want to support these (I'm surprised i686 is still relevant), we need some CI to at least build + test them.

Indeed.

From a quick look I had at https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners, it doesn't look like GitHub provides a 32-bit VM. Not sure we can/want to provide our own-hosted 32-bit runner. Alternatively we'd have to enable cross-compilation somehow.

tmakatos commented 2 years ago

Next, I'll test on PPC and then will mark PR ready for review.

jlevon commented 1 year ago

Cross-compilation doesn't help too much, since we couldn't run tests.

tmakatos commented 1 year ago

I've added a few more fixes