qemu with hax to log dma reads & writes jcs.org/2018/11/12/vfio

linux-user: move socket.h generic definitions to generic/sockbits.h

and include the file from architectures without specific definitions

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20180519092956.15134-5-laurent@vivier.eu>

+82 -61
+1
linux-user/aarch64/sockbits.h
··· 1 + #include "../generic/sockbits.h"
+1
linux-user/arm/sockbits.h
··· 1 + #include "../generic/sockbits.h"
+1
linux-user/cris/sockbits.h
··· 1 + #include "../generic/sockbits.h"
+67
linux-user/generic/sockbits.h
··· 1 + /* 2 + * This program is free software; you can redistribute it and/or modify 3 + * it under the terms of the GNU General Public License version 2 as 4 + * published by the Free Software Foundation, or (at your option) any 5 + * later version. See the COPYING file in the top-level directory. 6 + */ 7 + 8 + #ifndef GENERIC_SOCKBITS_H 9 + #define GENERIC_SOCKBITS_H 10 + 11 + #define TARGET_SO_PASSSEC 34 12 + 13 + /* For setsockopt(2) */ 14 + #define TARGET_SOL_SOCKET 1 15 + 16 + #define TARGET_SO_DEBUG 1 17 + #define TARGET_SO_REUSEADDR 2 18 + #define TARGET_SO_TYPE 3 19 + #define TARGET_SO_ERROR 4 20 + #define TARGET_SO_DONTROUTE 5 21 + #define TARGET_SO_BROADCAST 6 22 + #define TARGET_SO_SNDBUF 7 23 + #define TARGET_SO_RCVBUF 8 24 + #define TARGET_SO_SNDBUFFORCE 32 25 + #define TARGET_SO_RCVBUFFORCE 33 26 + #define TARGET_SO_KEEPALIVE 9 27 + #define TARGET_SO_OOBINLINE 10 28 + #define TARGET_SO_NO_CHECK 11 29 + #define TARGET_SO_PRIORITY 12 30 + #define TARGET_SO_LINGER 13 31 + #define TARGET_SO_BSDCOMPAT 14 32 + /* To add :#define TARGET_SO_REUSEPORT 15 */ 33 + #if defined(TARGET_PPC) 34 + #define TARGET_SO_RCVLOWAT 16 35 + #define TARGET_SO_SNDLOWAT 17 36 + #define TARGET_SO_RCVTIMEO 18 37 + #define TARGET_SO_SNDTIMEO 19 38 + #define TARGET_SO_PASSCRED 20 39 + #define TARGET_SO_PEERCRED 21 40 + #else 41 + #define TARGET_SO_PASSCRED 16 42 + #define TARGET_SO_PEERCRED 17 43 + #define TARGET_SO_RCVLOWAT 18 44 + #define TARGET_SO_SNDLOWAT 19 45 + #define TARGET_SO_RCVTIMEO 20 46 + #define TARGET_SO_SNDTIMEO 21 47 + #endif 48 + 49 + /* Security levels - as per NRL IPv6 - don't actually do anything */ 50 + #define TARGET_SO_SECURITY_AUTHENTICATION 22 51 + #define TARGET_SO_SECURITY_ENCRYPTION_TRANSPORT 23 52 + #define TARGET_SO_SECURITY_ENCRYPTION_NETWORK 24 53 + 54 + #define TARGET_SO_BINDTODEVICE 25 55 + 56 + /* Socket filtering */ 57 + #define TARGET_SO_ATTACH_FILTER 26 58 + #define TARGET_SO_DETACH_FILTER 27 59 + 60 + #define TARGET_SO_PEERNAME 28 61 + #define TARGET_SO_TIMESTAMP 29 62 + #define TARGET_SCM_TIMESTAMP TARGET_SO_TIMESTAMP 63 + 64 + #define TARGET_SO_ACCEPTCONN 30 65 + 66 + #define TARGET_SO_PEERSEC 31 67 + #endif
+1
linux-user/i386/sockbits.h
··· 1 + #include "../generic/sockbits.h"
+1
linux-user/m68k/sockbits.h
··· 1 + #include "../generic/sockbits.h"
+1
linux-user/microblaze/sockbits.h
··· 1 + #include "../generic/sockbits.h"
+1
linux-user/nios2/sockbits.h
··· 1 + #include "../generic/sockbits.h"
+1
linux-user/openrisc/sockbits.h
··· 1 + #include "../generic/sockbits.h"
+1
linux-user/ppc/sockbits.h
··· 1 + #include "../generic/sockbits.h"
+1
linux-user/riscv/sockbits.h
··· 1 + #include "../generic/sockbits.h"
+1
linux-user/s390x/sockbits.h
··· 1 + #include "../generic/sockbits.h"
+1
linux-user/sh4/sockbits.h
··· 1 + #include "../generic/sockbits.h"
-61
linux-user/socket.h
··· 1 1 2 - #if defined(TARGET_MIPS) || defined(TARGET_HPPA) || defined(TARGET_ALPHA) || \ 3 - defined(TARGET_SPARC) 4 2 #include "sockbits.h" 5 - #else 6 - #define TARGET_SO_PASSSEC 34 7 - 8 - /* For setsockopt(2) */ 9 - #define TARGET_SOL_SOCKET 1 10 - 11 - #define TARGET_SO_DEBUG 1 12 - #define TARGET_SO_REUSEADDR 2 13 - #define TARGET_SO_TYPE 3 14 - #define TARGET_SO_ERROR 4 15 - #define TARGET_SO_DONTROUTE 5 16 - #define TARGET_SO_BROADCAST 6 17 - #define TARGET_SO_SNDBUF 7 18 - #define TARGET_SO_RCVBUF 8 19 - #define TARGET_SO_SNDBUFFORCE 32 20 - #define TARGET_SO_RCVBUFFORCE 33 21 - #define TARGET_SO_KEEPALIVE 9 22 - #define TARGET_SO_OOBINLINE 10 23 - #define TARGET_SO_NO_CHECK 11 24 - #define TARGET_SO_PRIORITY 12 25 - #define TARGET_SO_LINGER 13 26 - #define TARGET_SO_BSDCOMPAT 14 27 - /* To add :#define TARGET_SO_REUSEPORT 15 */ 28 - #if defined(TARGET_PPC) 29 - #define TARGET_SO_RCVLOWAT 16 30 - #define TARGET_SO_SNDLOWAT 17 31 - #define TARGET_SO_RCVTIMEO 18 32 - #define TARGET_SO_SNDTIMEO 19 33 - #define TARGET_SO_PASSCRED 20 34 - #define TARGET_SO_PEERCRED 21 35 - #else 36 - #define TARGET_SO_PASSCRED 16 37 - #define TARGET_SO_PEERCRED 17 38 - #define TARGET_SO_RCVLOWAT 18 39 - #define TARGET_SO_SNDLOWAT 19 40 - #define TARGET_SO_RCVTIMEO 20 41 - #define TARGET_SO_SNDTIMEO 21 42 - #endif 43 - 44 - /* Security levels - as per NRL IPv6 - don't actually do anything */ 45 - #define TARGET_SO_SECURITY_AUTHENTICATION 22 46 - #define TARGET_SO_SECURITY_ENCRYPTION_TRANSPORT 23 47 - #define TARGET_SO_SECURITY_ENCRYPTION_NETWORK 24 48 - 49 - #define TARGET_SO_BINDTODEVICE 25 50 - 51 - /* Socket filtering */ 52 - #define TARGET_SO_ATTACH_FILTER 26 53 - #define TARGET_SO_DETACH_FILTER 27 54 - 55 - #define TARGET_SO_PEERNAME 28 56 - #define TARGET_SO_TIMESTAMP 29 57 - #define TARGET_SCM_TIMESTAMP TARGET_SO_TIMESTAMP 58 - 59 - #define TARGET_SO_ACCEPTCONN 30 60 - 61 - #define TARGET_SO_PEERSEC 31 62 - 63 - #endif 64 3 65 4 #ifndef ARCH_HAS_SOCKET_TYPES 66 5 /** sock_type - Socket types - default values
+1
linux-user/tilegx/sockbits.h
··· 1 + #include "../generic/sockbits.h"
+1
linux-user/x86_64/sockbits.h
··· 1 + #include "../generic/sockbits.h"
+1
linux-user/xtensa/sockbits.h
··· 1 + #include "../generic/sockbits.h"