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

linux-user: move sparc/sparc64 fcntl definitions to sparc/target_fcntl.h

No code change.

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20180529194207.31503-8-laurent@vivier.eu>

+34 -39
+34
linux-user/sparc/target_fcntl.h
··· 7 7 8 8 #ifndef SPARC_TARGET_FCNTL_H 9 9 #define SPARC_TARGET_FCNTL_H 10 + 11 + #define TARGET_O_APPEND 0x0008 12 + #define TARGET_FASYNC 0x0040 /* fcntl, for BSD compatibility */ 13 + #define TARGET_O_CREAT 0x0200 /* not fcntl */ 14 + #define TARGET_O_TRUNC 0x0400 /* not fcntl */ 15 + #define TARGET_O_EXCL 0x0800 /* not fcntl */ 16 + #define TARGET_O_DSYNC 0x2000 17 + #define TARGET_O_NONBLOCK 0x4000 18 + # ifdef TARGET_SPARC64 19 + # define TARGET_O_NDELAY 0x0004 20 + # else 21 + # define TARGET_O_NDELAY (0x0004 | TARGET_O_NONBLOCK) 22 + # endif 23 + #define TARGET_O_NOCTTY 0x8000 /* not fcntl */ 24 + #define TARGET_O_LARGEFILE 0x40000 25 + #define TARGET_O_DIRECT 0x100000 /* direct disk access hint */ 26 + #define TARGET_O_NOATIME 0x200000 27 + #define TARGET_O_CLOEXEC 0x400000 28 + #define TARGET___O_SYNC 0x800000 29 + #define TARGET_O_PATH 0x1000000 30 + #define TARGET___O_TMPFILE 0x2000000 31 + 32 + #define TARGET_F_RDLCK 1 33 + #define TARGET_F_WRLCK 2 34 + #define TARGET_F_UNLCK 3 35 + #define TARGET_F_GETOWN 5 /* for sockets. */ 36 + #define TARGET_F_SETOWN 6 /* for sockets. */ 37 + #define TARGET_F_GETLK 7 38 + #define TARGET_F_SETLK 8 39 + #define TARGET_F_SETLKW 9 40 + 41 + #define TARGET_ARCH_FLOCK_PAD abi_short __unused; 42 + #define TARGET_ARCH_FLOCK64_PAD abi_short __unused; 43 + 10 44 #include "../generic/fcntl.h" 11 45 #endif
-39
linux-user/syscall_defs.h
··· 2407 2407 }; 2408 2408 #endif 2409 2409 2410 - #if defined(TARGET_SPARC) 2411 - #define TARGET_F_RDLCK 1 2412 - #define TARGET_F_WRLCK 2 2413 - #define TARGET_F_UNLCK 3 2414 - #define TARGET_F_GETOWN 5 /* for sockets. */ 2415 - #define TARGET_F_SETOWN 6 /* for sockets. */ 2416 - #define TARGET_F_GETLK 7 2417 - #define TARGET_F_SETLK 8 2418 - #define TARGET_F_SETLKW 9 2419 - #endif 2420 - 2421 2410 #define TARGET_F_LINUX_SPECIFIC_BASE 1024 2422 2411 #define TARGET_F_SETLEASE (TARGET_F_LINUX_SPECIFIC_BASE + 0) 2423 2412 #define TARGET_F_GETLEASE (TARGET_F_LINUX_SPECIFIC_BASE + 1) ··· 2425 2414 #define TARGET_F_SETPIPE_SZ (TARGET_F_LINUX_SPECIFIC_BASE + 7) 2426 2415 #define TARGET_F_GETPIPE_SZ (TARGET_F_LINUX_SPECIFIC_BASE + 8) 2427 2416 #define TARGET_F_NOTIFY (TARGET_F_LINUX_SPECIFIC_BASE+2) 2428 - 2429 - #if defined (TARGET_SPARC) 2430 - #define TARGET_O_APPEND 0x0008 2431 - #define TARGET_FASYNC 0x0040 /* fcntl, for BSD compatibility */ 2432 - #define TARGET_O_CREAT 0x0200 /* not fcntl */ 2433 - #define TARGET_O_TRUNC 0x0400 /* not fcntl */ 2434 - #define TARGET_O_EXCL 0x0800 /* not fcntl */ 2435 - #define TARGET_O_DSYNC 0x2000 2436 - #define TARGET_O_NONBLOCK 0x4000 2437 - # ifdef TARGET_SPARC64 2438 - # define TARGET_O_NDELAY 0x0004 2439 - # else 2440 - # define TARGET_O_NDELAY (0x0004 | TARGET_O_NONBLOCK) 2441 - # endif 2442 - #define TARGET_O_NOCTTY 0x8000 /* not fcntl */ 2443 - #define TARGET_O_LARGEFILE 0x40000 2444 - #define TARGET_O_DIRECT 0x100000 /* direct disk access hint */ 2445 - #define TARGET_O_NOATIME 0x200000 2446 - #define TARGET_O_CLOEXEC 0x400000 2447 - #define TARGET___O_SYNC 0x800000 2448 - #define TARGET_O_PATH 0x1000000 2449 - #define TARGET___O_TMPFILE 0x2000000 2450 - #endif 2451 - 2452 - #if defined(TARGET_SPARC) 2453 - #define TARGET_ARCH_FLOCK_PAD abi_short __unused; 2454 - #define TARGET_ARCH_FLOCK64_PAD abi_short __unused; 2455 - #endif 2456 2417 2457 2418 #include "target_fcntl.h" 2458 2419