rust-vmm / vfio

13 stars 20 forks source link

vfio-ioctls: LittleEndian in enable_irq() #38

Closed juru1234 closed 1 week ago

juru1234 commented 10 months ago

Hi,

I'm using the vfio-ioctls crate on a big endian machine and enable_irq() doesn't work because it uses LittleEndian::write_u32(fd, event_fd.as_raw_fd() as u32);. Why is this explicit LittleEndian::write_u32 used? Can we change it to a normal write?

juru1234 commented 2 weeks ago

Maybe we can just change this to NativeEndian instead of LittleEndian?

juru1234 commented 2 weeks ago

@epilys @jiangliu We would really like to use this crate on IBM Z which runs big endian Linux. Are there any active mailing list where I can send a patch?

epilys commented 2 weeks ago

@juru1234 I'm not sure about this, but it might have been used because the kernel used to assume LE until 2018 (? 07fd7ef3a1c25a11015bb5821c9c5982f722d4a2). We accept PRs.

juru1234 commented 1 week ago

See #53