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

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

No code change.

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20180519092956.15134-4-laurent@vivier.eu>

+97 -42
+2 -42
linux-user/socket.h
··· 1 1 2 - #if defined(TARGET_MIPS) || defined(TARGET_HPPA) || defined(TARGET_ALPHA) 2 + #if defined(TARGET_MIPS) || defined(TARGET_HPPA) || defined(TARGET_ALPHA) || \ 3 + defined(TARGET_SPARC) 3 4 #include "sockbits.h" 4 5 #else 5 - 6 - #if defined(TARGET_SPARC) 7 - /** sock_type - Socket types 8 - * 9 - * Please notice that for binary compat reasons SPARC has to 10 - * override the enum sock_type in include/linux/net.h, so 11 - * we define ARCH_HAS_SOCKET_TYPES here. 12 - * 13 - * @SOCK_DGRAM - datagram (conn.less) socket 14 - * @SOCK_STREAM - stream (connection) socket 15 - * @SOCK_RAW - raw socket 16 - * @SOCK_RDM - reliably-delivered message 17 - * @SOCK_SEQPACKET - sequential packet socket 18 - * @SOCK_DCCP - Datagram Congestion Control Protocol socket 19 - * @SOCK_PACKET - linux specific way of getting packets at the dev level. 20 - * For writing rarp and other similar things on the user 21 - * level. 22 - * @SOCK_CLOEXEC - sets the close-on-exec (FD_CLOEXEC) flag. 23 - * @SOCK_NONBLOCK - sets the O_NONBLOCK file status flag. 24 - */ 25 - 26 - #define ARCH_HAS_SOCKET_TYPES 1 27 - 28 - enum sock_type { 29 - TARGET_SOCK_STREAM = 1, 30 - TARGET_SOCK_DGRAM = 2, 31 - TARGET_SOCK_RAW = 3, 32 - TARGET_SOCK_RDM = 4, 33 - TARGET_SOCK_SEQPACKET = 5, 34 - TARGET_SOCK_DCCP = 6, 35 - TARGET_SOCK_PACKET = 10, 36 - TARGET_SOCK_CLOEXEC = 020000000, 37 - TARGET_SOCK_NONBLOCK = 040000, 38 - }; 39 - 40 - #define TARGET_SOCK_MAX (TARGET_SOCK_PACKET + 1) 41 - #define TARGET_SOCK_TYPE_MASK 0xf /* Covers up to TARGET_SOCK_MAX-1. */ 42 - 43 - #define TARGET_SO_PASSSEC 31 44 - #else 45 6 #define TARGET_SO_PASSSEC 34 46 - #endif 47 7 48 8 /* For setsockopt(2) */ 49 9 #define TARGET_SOL_SOCKET 1
+94
linux-user/sparc/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 SPARC_SOCKBITS_H 9 + #define SPARC_SOCKBITS_H 10 + 11 + /** sock_type - Socket types 12 + * 13 + * Please notice that for binary compat reasons SPARC has to 14 + * override the enum sock_type in include/linux/net.h, so 15 + * we define ARCH_HAS_SOCKET_TYPES here. 16 + * 17 + * @SOCK_DGRAM - datagram (conn.less) socket 18 + * @SOCK_STREAM - stream (connection) socket 19 + * @SOCK_RAW - raw socket 20 + * @SOCK_RDM - reliably-delivered message 21 + * @SOCK_SEQPACKET - sequential packet socket 22 + * @SOCK_DCCP - Datagram Congestion Control Protocol socket 23 + * @SOCK_PACKET - linux specific way of getting packets at the dev level. 24 + * For writing rarp and other similar things on the user 25 + * level. 26 + * @SOCK_CLOEXEC - sets the close-on-exec (FD_CLOEXEC) flag. 27 + * @SOCK_NONBLOCK - sets the O_NONBLOCK file status flag. 28 + */ 29 + 30 + #define ARCH_HAS_SOCKET_TYPES 1 31 + 32 + enum sock_type { 33 + TARGET_SOCK_STREAM = 1, 34 + TARGET_SOCK_DGRAM = 2, 35 + TARGET_SOCK_RAW = 3, 36 + TARGET_SOCK_RDM = 4, 37 + TARGET_SOCK_SEQPACKET = 5, 38 + TARGET_SOCK_DCCP = 6, 39 + TARGET_SOCK_PACKET = 10, 40 + TARGET_SOCK_CLOEXEC = 020000000, 41 + TARGET_SOCK_NONBLOCK = 040000, 42 + }; 43 + 44 + #define TARGET_SOCK_MAX (TARGET_SOCK_PACKET + 1) 45 + #define TARGET_SOCK_TYPE_MASK 0xf /* Covers up to TARGET_SOCK_MAX-1. */ 46 + 47 + #define TARGET_SO_PASSSEC 31 48 + 49 + /* For setsockopt(2) */ 50 + #define TARGET_SOL_SOCKET 1 51 + 52 + #define TARGET_SO_DEBUG 1 53 + #define TARGET_SO_REUSEADDR 2 54 + #define TARGET_SO_TYPE 3 55 + #define TARGET_SO_ERROR 4 56 + #define TARGET_SO_DONTROUTE 5 57 + #define TARGET_SO_BROADCAST 6 58 + #define TARGET_SO_SNDBUF 7 59 + #define TARGET_SO_RCVBUF 8 60 + #define TARGET_SO_SNDBUFFORCE 32 61 + #define TARGET_SO_RCVBUFFORCE 33 62 + #define TARGET_SO_KEEPALIVE 9 63 + #define TARGET_SO_OOBINLINE 10 64 + #define TARGET_SO_NO_CHECK 11 65 + #define TARGET_SO_PRIORITY 12 66 + #define TARGET_SO_LINGER 13 67 + #define TARGET_SO_BSDCOMPAT 14 68 + /* To add :#define TARGET_SO_REUSEPORT 15 */ 69 + #define TARGET_SO_PASSCRED 16 70 + #define TARGET_SO_PEERCRED 17 71 + #define TARGET_SO_RCVLOWAT 18 72 + #define TARGET_SO_SNDLOWAT 19 73 + #define TARGET_SO_RCVTIMEO 20 74 + #define TARGET_SO_SNDTIMEO 21 75 + 76 + /* Security levels - as per NRL IPv6 - don't actually do anything */ 77 + #define TARGET_SO_SECURITY_AUTHENTICATION 22 78 + #define TARGET_SO_SECURITY_ENCRYPTION_TRANSPORT 23 79 + #define TARGET_SO_SECURITY_ENCRYPTION_NETWORK 24 80 + 81 + #define TARGET_SO_BINDTODEVICE 25 82 + 83 + /* Socket filtering */ 84 + #define TARGET_SO_ATTACH_FILTER 26 85 + #define TARGET_SO_DETACH_FILTER 27 86 + 87 + #define TARGET_SO_PEERNAME 28 88 + #define TARGET_SO_TIMESTAMP 29 89 + #define TARGET_SCM_TIMESTAMP TARGET_SO_TIMESTAMP 90 + 91 + #define TARGET_SO_ACCEPTCONN 30 92 + 93 + #define TARGET_SO_PEERSEC 31 94 + #endif
+1
linux-user/sparc64/sockbits.h
··· 1 + #include "../sparc/sockbits.h"