summaryrefslogtreecommitdiffstats
path: root/linux-user/syscall_defs.h
diff options
context:
space:
mode:
authorPeter Maydell2017-11-21 11:44:44 +0100
committerPeter Maydell2017-11-21 11:44:44 +0100
commit1b4e6e8cf8d8ff6ba3fd71eb41051ac2621ace7e (patch)
tree70c2412a1fa690704940af86d2c71d19ee626b63 /linux-user/syscall_defs.h
parentMerge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20171120'... (diff)
parentlinux-user: Fix calculation of auxv length (diff)
downloadqemu-1b4e6e8cf8d8ff6ba3fd71eb41051ac2621ace7e.tar.gz
qemu-1b4e6e8cf8d8ff6ba3fd71eb41051ac2621ace7e.tar.xz
qemu-1b4e6e8cf8d8ff6ba3fd71eb41051ac2621ace7e.zip
Merge remote-tracking branch 'remotes/riku/tags/pull-linux-user-20171120' into staging
late linux-user fixes for Qemu 2.11 # gpg: Signature made Mon 20 Nov 2017 21:19:00 GMT # gpg: using RSA key 0xB44890DEDE3C9BC0 # gpg: Good signature from "Riku Voipio <riku.voipio@iki.fi>" # gpg: aka "Riku Voipio <riku.voipio@linaro.org>" # Primary key fingerprint: FF82 03C8 C391 98AE 0581 41EF B448 90DE DE3C 9BC0 * remotes/riku/tags/pull-linux-user-20171120: linux-user: Fix calculation of auxv length linux-user: Handle rt_sigaction correctly for SPARC linux-user/sparc: Put address for data faults where linux-user expects it linux-user/ppc: Report correct fault address for data faults linux-user/s390x: Mask si_addr for SIGSEGV linux-user: return EINVAL from prctl(PR_*_SECCOMP) linux-user: fix 'finshed' typo in comment linux-user/syscall.c: Handle SH4's exceptional alignment for p{read, write}64 linux-user: Handle TARGET_MAP_STACK and TARGET_MAP_HUGETLB linux-user/hppa: Fix TARGET_F_RDLCK, TARGET_F_WRLCK, TARGET_F_UNLCK linux-user/hppa: Fix TARGET_MAP_TYPE linux-user/hppa: Fix typo for TARGET_NR_epoll_wait linux-user/hppa: Fix cpu_clone_regs linux-user/hppa: Fix TARGET_SA_* defines linux-user: Restrict usage of sa_restorer Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'linux-user/syscall_defs.h')
-rw-r--r--linux-user/syscall_defs.h40
1 files changed, 39 insertions, 1 deletions
diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
index 450960bb54..bec3680b94 100644
--- a/linux-user/syscall_defs.h
+++ b/linux-user/syscall_defs.h
@@ -445,6 +445,7 @@ int do_sigaction(int sig, const struct target_sigaction *act,
#define TARGET_SA_RESTART 2u
#define TARGET_SA_NODEFER 0x20u
#define TARGET_SA_RESETHAND 4u
+#define TARGET_ARCH_HAS_SA_RESTORER 1
#elif defined(TARGET_MIPS)
#define TARGET_SA_NOCLDSTOP 0x00000001
#define TARGET_SA_NOCLDWAIT 0x00010000
@@ -472,6 +473,14 @@ int do_sigaction(int sig, const struct target_sigaction *act,
#define TARGET_SA_RESETHAND 0x00000010
#define TARGET_SA_NOCLDWAIT 0x00000020 /* not supported yet */
#define TARGET_SA_SIGINFO 0x00000040
+#elif defined(TARGET_HPPA)
+#define TARGET_SA_ONSTACK 0x00000001
+#define TARGET_SA_RESETHAND 0x00000004
+#define TARGET_SA_NOCLDSTOP 0x00000008
+#define TARGET_SA_SIGINFO 0x00000010
+#define TARGET_SA_NODEFER 0x00000020
+#define TARGET_SA_RESTART 0x00000040
+#define TARGET_SA_NOCLDWAIT 0x00000080
#else
#define TARGET_SA_NOCLDSTOP 0x00000001
#define TARGET_SA_NOCLDWAIT 0x00000002 /* not supported yet */
@@ -483,6 +492,10 @@ int do_sigaction(int sig, const struct target_sigaction *act,
#define TARGET_SA_RESTORER 0x04000000
#endif
+#ifdef TARGET_SA_RESTORER
+#define TARGET_ARCH_HAS_SA_RESTORER 1
+#endif
+
#if defined(TARGET_ALPHA)
#define TARGET_SIGHUP 1
@@ -718,19 +731,27 @@ struct target_sigaction {
abi_ulong _sa_handler;
#endif
target_sigset_t sa_mask;
+#ifdef TARGET_ARCH_HAS_SA_RESTORER
+ /* ??? This is always present, but ignored unless O32. */
+ abi_ulong sa_restorer;
+#endif
};
#else
struct target_old_sigaction {
abi_ulong _sa_handler;
abi_ulong sa_mask;
abi_ulong sa_flags;
+#ifdef TARGET_ARCH_HAS_SA_RESTORER
abi_ulong sa_restorer;
+#endif
};
struct target_sigaction {
abi_ulong _sa_handler;
abi_ulong sa_flags;
+#ifdef TARGET_ARCH_HAS_SA_RESTORER
abi_ulong sa_restorer;
+#endif
target_sigset_t sa_mask;
};
#endif
@@ -1315,7 +1336,11 @@ struct target_winsize {
/* Common */
#define TARGET_MAP_SHARED 0x01 /* Share changes */
#define TARGET_MAP_PRIVATE 0x02 /* Changes are private */
-#define TARGET_MAP_TYPE 0x0f /* Mask for type of mapping */
+#if defined(TARGET_HPPA)
+#define TARGET_MAP_TYPE 0x03 /* Mask for type of mapping */
+#else
+#define TARGET_MAP_TYPE 0x0f /* Mask for type of mapping */
+#endif
/* Target specific */
#if defined(TARGET_MIPS)
@@ -1328,6 +1353,8 @@ struct target_winsize {
#define TARGET_MAP_NORESERVE 0x0400 /* don't check for reservations */
#define TARGET_MAP_POPULATE 0x10000 /* populate (prefault) pagetables */
#define TARGET_MAP_NONBLOCK 0x20000 /* do not block on IO */
+#define TARGET_MAP_STACK 0x40000 /* ignored */
+#define TARGET_MAP_HUGETLB 0x80000 /* create a huge page mapping */
#elif defined(TARGET_PPC)
#define TARGET_MAP_FIXED 0x10 /* Interpret addr exactly */
#define TARGET_MAP_ANONYMOUS 0x20 /* don't use a file */
@@ -1338,6 +1365,8 @@ struct target_winsize {
#define TARGET_MAP_NORESERVE 0x0040 /* don't check for reservations */
#define TARGET_MAP_POPULATE 0x8000 /* populate (prefault) pagetables */
#define TARGET_MAP_NONBLOCK 0x10000 /* do not block on IO */
+#define TARGET_MAP_STACK 0x20000 /* ignored */
+#define TARGET_MAP_HUGETLB 0x40000 /* create a huge page mapping */
#elif defined(TARGET_ALPHA)
#define TARGET_MAP_ANONYMOUS 0x10 /* don't use a file */
#define TARGET_MAP_FIXED 0x100 /* Interpret addr exactly */
@@ -1348,6 +1377,8 @@ struct target_winsize {
#define TARGET_MAP_NORESERVE 0x10000 /* no check for reservations */
#define TARGET_MAP_POPULATE 0x20000 /* pop (prefault) pagetables */
#define TARGET_MAP_NONBLOCK 0x40000 /* do not block on IO */
+#define TARGET_MAP_STACK 0x80000 /* ignored */
+#define TARGET_MAP_HUGETLB 0x100000 /* create a huge page mapping */
#elif defined(TARGET_HPPA)
#define TARGET_MAP_ANONYMOUS 0x10 /* don't use a file */
#define TARGET_MAP_FIXED 0x04 /* Interpret addr exactly */
@@ -1358,6 +1389,8 @@ struct target_winsize {
#define TARGET_MAP_NORESERVE 0x04000 /* no check for reservations */
#define TARGET_MAP_POPULATE 0x10000 /* pop (prefault) pagetables */
#define TARGET_MAP_NONBLOCK 0x20000 /* do not block on IO */
+#define TARGET_MAP_STACK 0x40000 /* ignored */
+#define TARGET_MAP_HUGETLB 0x80000 /* create a huge page mapping */
#else
#define TARGET_MAP_FIXED 0x10 /* Interpret addr exactly */
#define TARGET_MAP_ANONYMOUS 0x20 /* don't use a file */
@@ -1368,6 +1401,8 @@ struct target_winsize {
#define TARGET_MAP_NORESERVE 0x4000 /* don't check for reservations */
#define TARGET_MAP_POPULATE 0x8000 /* populate (prefault) pagetables */
#define TARGET_MAP_NONBLOCK 0x10000 /* do not block on IO */
+#define TARGET_MAP_STACK 0x20000 /* ignored */
+#define TARGET_MAP_HUGETLB 0x40000 /* create a huge page mapping */
#define TARGET_MAP_UNINITIALIZED 0x4000000 /* for anonymous mmap, memory could be uninitialized */
#endif
@@ -2336,6 +2371,9 @@ struct target_statfs64 {
#define TARGET_F_SETOWN 24 /* for sockets. */
#define TARGET_F_GETOWN 23 /* for sockets. */
#elif defined(TARGET_HPPA)
+#define TARGET_F_RDLCK 1
+#define TARGET_F_WRLCK 2
+#define TARGET_F_UNLCK 3
#define TARGET_F_GETLK 5
#define TARGET_F_SETLK 6
#define TARGET_F_SETLKW 7