The or1k epoll_event structure - unlike other architectures - is packed, so we need to define it as packed in qemu-user, otherwise it leads to infinite loop due to missing file descriptor in the returned data:

--- qemu-20230327/linux-user/syscall_defs.h.orig 2023-03-27 15:41:42.000000000 +0200 +++ qemu-20230327/linux-user/syscall_defs.h 2023-06-30 17:29:39.034322213 +0200
@@ -2714,7 +2709,7 @@
#define FUTEX_CMD_MASK ~(FUTEX_PRIVATE_FLAG | FUTEX_CLOCK_REALTIME)

 #ifdef CONFIG_EPOLL
-#if defined(TARGET_X86_64)
+#if defined(TARGET_X86_64) || defined(TARGET_OPENRISC)
 #define TARGET_EPOLL_PACKED QEMU_PACKED
 #else
 #define TARGET_EPOLL_PACKED

Reply via email to