Hello, This is an attempt a couple bugs exposed by FEX-Emu. The first one is pretty trivial and should be uncontroversial, since it's just a missing padding field in one of our uAPI structs. We are getting away with it on arm32 because of the alignment rules provided by the Arm ABI, but x86 has relaxed constraints for u64 fields, and this bug is definitely hit when running a 32-bit x86 mesa binary under FEX Emu.
The second fix is addressing a problem we have because FEX-Emu is an aarch64 process executing 32-bit x86 code, meaning the check we do on the is-32bit-task check we do to figure out the MMIO offset seen by the user won't work. In order to fix that, we add an ioctl to let the user explicitly set this offset. The offset can only be set early on, if no MMIO range has been mapped before. With those, and the mesa MR at [1], I managed to run a 32-bit x86 glmark2 through FEX without using the host mesa (if we were to use the thunked mesa lib, both the kernel and mesa would use MMIO_OFFSET_64BIT, and the problem doesn't exist anymore). Regards, Boris [1]https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34573 Boris Brezillon (2): drm/panthor: Fix missing explicit padding in drm_panthor_gpu_info drm/panthor: Fix the user MMIO offset logic for emulators drivers/gpu/drm/panthor/panthor_device.h | 18 +++++++ drivers/gpu/drm/panthor/panthor_drv.c | 60 +++++++++++++++++++----- include/uapi/drm/panthor_drm.h | 44 +++++++++++++++++ 3 files changed, 109 insertions(+), 13 deletions(-) -- 2.49.0