qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] linux-user: correctly pack target_epoll_event for i


From: Icenowy Zheng
Subject: [Qemu-devel] [PATCH] linux-user: correctly pack target_epoll_event for i386 target
Date: Fri, 22 Jul 2016 10:30:50 +0800

According to comments in /usr/include/linux/eventpoll.h, x86_64 have
the same memory layout of struct target_epoll_event as i386. So on a
aligned host, if x86_64 should be packed, i386 will also need.

This has been tested with a i386 guest on an arm host: without the
patch, wineserver crashes (core).

Signed-off-by: Icenowy Zheng <address@hidden>
---
 linux-user/syscall_defs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
index b43966e..7380bf5 100644
--- a/linux-user/syscall_defs.h
+++ b/linux-user/syscall_defs.h
@@ -2547,7 +2547,7 @@ struct target_mq_attr {
 #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_I386)
 #define TARGET_EPOLL_PACKED QEMU_PACKED
 #else
 #define TARGET_EPOLL_PACKED
-- 
2.9.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]