From 437fd90c0250dee670290f9b714253671a990160 Mon Sep 17 00:00:00 2001 From: José Pekkarinen Date: Wed, 18 May 2016 13:18:31 +0300 Subject: These changes are the raw update to qemu-2.6. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Collission happened in the following patches: migration: do cleanup operation after completion(738df5b9) Bug fix.(1750c932f86) kvmclock: add a new function to update env->tsc.(b52baab2) The code provided by the patches was already in the upstreamed version. Change-Id: I3cc11841a6a76ae20887b2e245710199e1ea7f9a Signed-off-by: José Pekkarinen --- qemu/linux-user/x86_64/syscall.h | 102 ------------------------------ qemu/linux-user/x86_64/syscall_nr.h | 15 ++++- qemu/linux-user/x86_64/target_syscall.h | 107 ++++++++++++++++++++++++++++++++ 3 files changed, 121 insertions(+), 103 deletions(-) delete mode 100644 qemu/linux-user/x86_64/syscall.h create mode 100644 qemu/linux-user/x86_64/target_syscall.h (limited to 'qemu/linux-user/x86_64') diff --git a/qemu/linux-user/x86_64/syscall.h b/qemu/linux-user/x86_64/syscall.h deleted file mode 100644 index 88b3c3fe3..000000000 --- a/qemu/linux-user/x86_64/syscall.h +++ /dev/null @@ -1,102 +0,0 @@ -#define __USER_CS (0x33) -#define __USER_DS (0x2B) - -struct target_pt_regs { - abi_ulong r15; - abi_ulong r14; - abi_ulong r13; - abi_ulong r12; - abi_ulong rbp; - abi_ulong rbx; -/* arguments: non interrupts/non tracing syscalls only save up to here */ - abi_ulong r11; - abi_ulong r10; - abi_ulong r9; - abi_ulong r8; - abi_ulong rax; - abi_ulong rcx; - abi_ulong rdx; - abi_ulong rsi; - abi_ulong rdi; - abi_ulong orig_rax; -/* end of arguments */ -/* cpu exception frame or undefined */ - abi_ulong rip; - abi_ulong cs; - abi_ulong eflags; - abi_ulong rsp; - abi_ulong ss; -/* top of stack page */ -}; - -/* Maximum number of LDT entries supported. */ -#define TARGET_LDT_ENTRIES 8192 -/* The size of each LDT entry. */ -#define TARGET_LDT_ENTRY_SIZE 8 - -#define TARGET_GDT_ENTRIES 16 -#define TARGET_GDT_ENTRY_TLS_ENTRIES 3 -#define TARGET_GDT_ENTRY_TLS_MIN 12 -#define TARGET_GDT_ENTRY_TLS_MAX 14 - -#if 0 // Redefine this -struct target_modify_ldt_ldt_s { - unsigned int entry_number; - abi_ulong base_addr; - unsigned int limit; - unsigned int seg_32bit:1; - unsigned int contents:2; - unsigned int read_exec_only:1; - unsigned int limit_in_pages:1; - unsigned int seg_not_present:1; - unsigned int useable:1; - unsigned int lm:1; -}; -#else -struct target_modify_ldt_ldt_s { - unsigned int entry_number; - abi_ulong base_addr; - unsigned int limit; - unsigned int flags; -}; -#endif - -struct target_ipc64_perm -{ - int key; - uint32_t uid; - uint32_t gid; - uint32_t cuid; - uint32_t cgid; - unsigned short mode; - unsigned short __pad1; - unsigned short seq; - unsigned short __pad2; - abi_ulong __unused1; - abi_ulong __unused2; -}; - -struct target_msqid64_ds { - struct target_ipc64_perm msg_perm; - unsigned int msg_stime; /* last msgsnd time */ - unsigned int msg_rtime; /* last msgrcv time */ - unsigned int msg_ctime; /* last change time */ - abi_ulong msg_cbytes; /* current number of bytes on queue */ - abi_ulong msg_qnum; /* number of messages in queue */ - abi_ulong msg_qbytes; /* max number of bytes on queue */ - unsigned int msg_lspid; /* pid of last msgsnd */ - unsigned int msg_lrpid; /* last receive pid */ - abi_ulong __unused4; - abi_ulong __unused5; -}; - -#define UNAME_MACHINE "x86_64" -#define UNAME_MINIMUM_RELEASE "2.6.32" - -#define TARGET_ARCH_SET_GS 0x1001 -#define TARGET_ARCH_SET_FS 0x1002 -#define TARGET_ARCH_GET_FS 0x1003 -#define TARGET_ARCH_GET_GS 0x1004 -#define TARGET_MINSIGSTKSZ 2048 -#define TARGET_MLOCKALL_MCL_CURRENT 1 -#define TARGET_MLOCKALL_MCL_FUTURE 2 diff --git a/qemu/linux-user/x86_64/syscall_nr.h b/qemu/linux-user/x86_64/syscall_nr.h index 7c59e3a09..16397b3e8 100644 --- a/qemu/linux-user/x86_64/syscall_nr.h +++ b/qemu/linux-user/x86_64/syscall_nr.h @@ -281,7 +281,7 @@ #define TARGET_NR_utimensat 280 #define TARGET_NR_epoll_pwait 281 #define TARGET_NR_signalfd 282 -#define TARGET_NR_timerfd 283 +#define TARGET_NR_timerfd_create 283 #define TARGET_NR_eventfd 284 #define TARGET_NR_fallocate 285 #define TARGET_NR_timerfd_settime 286 @@ -312,3 +312,16 @@ #define TARGET_NR_process_vm_writev 311 #define TARGET_NR_kcmp 312 #define TARGET_NR_finit_module 313 +#define TARGET_NR_sched_setattr 314 +#define TARGET_NR_sched_getattr 315 +#define TARGET_NR_renameat2 316 +#define TARGET_NR_seccomp 317 +#define TARGET_NR_getrandom 318 +#define TARGET_NR_memfd_create 319 +#define TARGET_NR_kexec_file_load 320 +#define TARGET_NR_bpf 321 +#define TARGET_NR_execveat 322 +#define TARGET_NR_userfaultfd 323 +#define TARGET_NR_membarrier 324 +#define TARGET_NR_mlock2 325 +#define TARGET_NR_copy_file_range 326 diff --git a/qemu/linux-user/x86_64/target_syscall.h b/qemu/linux-user/x86_64/target_syscall.h new file mode 100644 index 000000000..feecd32d5 --- /dev/null +++ b/qemu/linux-user/x86_64/target_syscall.h @@ -0,0 +1,107 @@ +#ifndef TARGET_SYSCALL_H +#define TARGET_SYSCALL_H + +#define __USER_CS (0x33) +#define __USER_DS (0x2B) + +struct target_pt_regs { + abi_ulong r15; + abi_ulong r14; + abi_ulong r13; + abi_ulong r12; + abi_ulong rbp; + abi_ulong rbx; +/* arguments: non interrupts/non tracing syscalls only save up to here */ + abi_ulong r11; + abi_ulong r10; + abi_ulong r9; + abi_ulong r8; + abi_ulong rax; + abi_ulong rcx; + abi_ulong rdx; + abi_ulong rsi; + abi_ulong rdi; + abi_ulong orig_rax; +/* end of arguments */ +/* cpu exception frame or undefined */ + abi_ulong rip; + abi_ulong cs; + abi_ulong eflags; + abi_ulong rsp; + abi_ulong ss; +/* top of stack page */ +}; + +/* Maximum number of LDT entries supported. */ +#define TARGET_LDT_ENTRIES 8192 +/* The size of each LDT entry. */ +#define TARGET_LDT_ENTRY_SIZE 8 + +#define TARGET_GDT_ENTRIES 16 +#define TARGET_GDT_ENTRY_TLS_ENTRIES 3 +#define TARGET_GDT_ENTRY_TLS_MIN 12 +#define TARGET_GDT_ENTRY_TLS_MAX 14 + +#if 0 // Redefine this +struct target_modify_ldt_ldt_s { + unsigned int entry_number; + abi_ulong base_addr; + unsigned int limit; + unsigned int seg_32bit:1; + unsigned int contents:2; + unsigned int read_exec_only:1; + unsigned int limit_in_pages:1; + unsigned int seg_not_present:1; + unsigned int useable:1; + unsigned int lm:1; +}; +#else +struct target_modify_ldt_ldt_s { + unsigned int entry_number; + abi_ulong base_addr; + unsigned int limit; + unsigned int flags; +}; +#endif + +struct target_ipc64_perm +{ + int key; + uint32_t uid; + uint32_t gid; + uint32_t cuid; + uint32_t cgid; + unsigned short mode; + unsigned short __pad1; + unsigned short seq; + unsigned short __pad2; + abi_ulong __unused1; + abi_ulong __unused2; +}; + +struct target_msqid64_ds { + struct target_ipc64_perm msg_perm; + unsigned int msg_stime; /* last msgsnd time */ + unsigned int msg_rtime; /* last msgrcv time */ + unsigned int msg_ctime; /* last change time */ + abi_ulong msg_cbytes; /* current number of bytes on queue */ + abi_ulong msg_qnum; /* number of messages in queue */ + abi_ulong msg_qbytes; /* max number of bytes on queue */ + unsigned int msg_lspid; /* pid of last msgsnd */ + unsigned int msg_lrpid; /* last receive pid */ + abi_ulong __unused4; + abi_ulong __unused5; +}; + +#define UNAME_MACHINE "x86_64" +#define UNAME_MINIMUM_RELEASE "2.6.32" + +#define TARGET_ARCH_SET_GS 0x1001 +#define TARGET_ARCH_SET_FS 0x1002 +#define TARGET_ARCH_GET_FS 0x1003 +#define TARGET_ARCH_GET_GS 0x1004 +#define TARGET_MINSIGSTKSZ 2048 +#define TARGET_MLOCKALL_MCL_CURRENT 1 +#define TARGET_MLOCKALL_MCL_FUTURE 2 + +#endif /* TARGET_SYSCALL_H */ -- cgit 1.2.3-korg