* [PULL 0/8] Linux user for 6.1 patches
@ 2021-07-08 10:07 Laurent Vivier
2021-07-08 10:07 ` [PULL 1/8] linux-user/elfload: Implement ELF_HWCAP for RISC-V Laurent Vivier
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: Laurent Vivier @ 2021-07-08 10:07 UTC (permalink / raw)
To: qemu-devel; +Cc: Laurent Vivier
The following changes since commit 9aef0954195cc592e86846dbbe7f3c2c5603690a:
Merge remote-tracking branch 'remotes/bonzini-gitlab/tags/for-upstream' into staging (2021-07-06 11:24:58 +0100)
are available in the Git repository at:
git://github.com/vivier/qemu.git tags/linux-user-for-6.1-pull-request
for you to fetch changes up to c632ea1dd90313bc360b9de9d5014c2167f4d038:
linux-user/syscall: Remove hardcoded tabs (code style) (2021-07-07 21:34:21 +0200)
----------------------------------------------------------------
linux-user pull request 20210708
Code and style cleanup
Add ppid in self/stat
ELF_HWCAP for RISC-V
----------------------------------------------------------------
Andreas Schwab (1):
linux-user: fill ppid field in /proc/self/stat
Kito Cheng (1):
linux-user/elfload: Implement ELF_HWCAP for RISC-V
Philippe Mathieu-Daudé (5):
linux-user/alpha: Handle TARGET_EWOULDBLOCK as TARGET_EAGAIN
linux-user/hppa: Handle TARGET_EWOULDBLOCK as TARGET_EAGAIN
linux-user/mips: Handle TARGET_EWOULDBLOCK as TARGET_EAGAIN
linux-user/alpha: Remove hardcoded tabs (code style)
linux-user/syscall: Remove hardcoded tabs (code style)
Richard Henderson (1):
linux-user: Fix style problems in linuxload.c
linux-user/alpha/target_syscall.h | 198 ++++++++++++++---------------
linux-user/elfload.c | 13 ++
linux-user/hppa/target_syscall.h | 2 +
linux-user/linuxload.c | 42 +++---
linux-user/mips/target_syscall.h | 2 +
linux-user/mips64/target_syscall.h | 2 +
linux-user/syscall.c | 191 ++++++++++++++--------------
7 files changed, 235 insertions(+), 215 deletions(-)
--
2.31.1
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PULL 1/8] linux-user/elfload: Implement ELF_HWCAP for RISC-V
2021-07-08 10:07 [PULL 0/8] Linux user for 6.1 patches Laurent Vivier
@ 2021-07-08 10:07 ` Laurent Vivier
2021-07-08 10:07 ` [PULL 2/8] linux-user: fill ppid field in /proc/self/stat Laurent Vivier
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Laurent Vivier @ 2021-07-08 10:07 UTC (permalink / raw)
To: qemu-devel; +Cc: Kito Cheng, Richard Henderson, Laurent Vivier
From: Kito Cheng <kito.cheng@sifive.com>
Set I, M, A, F, D and C bit for hwcap if misa is set.
Signed-off-by: Kito Cheng <kito.cheng@sifive.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20210706035015.122899-1-kito.cheng@sifive.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
linux-user/elfload.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/linux-user/elfload.c b/linux-user/elfload.c
index 598ab8aa1396..42ef2a114855 100644
--- a/linux-user/elfload.c
+++ b/linux-user/elfload.c
@@ -1434,6 +1434,19 @@ static void elf_core_copy_regs(target_elf_gregset_t *regs,
#define ELF_CLASS ELFCLASS64
#endif
+#define ELF_HWCAP get_elf_hwcap()
+
+static uint32_t get_elf_hwcap(void)
+{
+#define MISA_BIT(EXT) (1 << (EXT - 'A'))
+ RISCVCPU *cpu = RISCV_CPU(thread_cpu);
+ uint32_t mask = MISA_BIT('I') | MISA_BIT('M') | MISA_BIT('A')
+ | MISA_BIT('F') | MISA_BIT('D') | MISA_BIT('C');
+
+ return cpu->env.misa & mask;
+#undef MISA_BIT
+}
+
static inline void init_thread(struct target_pt_regs *regs,
struct image_info *infop)
{
--
2.31.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PULL 2/8] linux-user: fill ppid field in /proc/self/stat
2021-07-08 10:07 [PULL 0/8] Linux user for 6.1 patches Laurent Vivier
2021-07-08 10:07 ` [PULL 1/8] linux-user/elfload: Implement ELF_HWCAP for RISC-V Laurent Vivier
@ 2021-07-08 10:07 ` Laurent Vivier
2021-07-08 10:07 ` [PULL 3/8] linux-user: Fix style problems in linuxload.c Laurent Vivier
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Laurent Vivier @ 2021-07-08 10:07 UTC (permalink / raw)
To: qemu-devel; +Cc: Andreas Schwab, Laurent Vivier
From: Andreas Schwab <schwab@suse.de>
Signed-off-by: Andreas Schwab <schwab@suse.de>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <mvmwnqnef5g.fsf@suse.de>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
linux-user/syscall.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 64bbf331b282..3bc06d178e83 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -7956,6 +7956,9 @@ static int open_self_stat(void *cpu_env, int fd)
gchar *bin = g_strrstr(ts->bprm->argv[0], "/");
bin = bin ? bin + 1 : ts->bprm->argv[0];
g_string_printf(buf, "(%.15s) ", bin);
+ } else if (i == 3) {
+ /* ppid */
+ g_string_printf(buf, FMT_pid " ", getppid());
} else if (i == 27) {
/* stack bottom */
g_string_printf(buf, TARGET_ABI_FMT_ld " ", ts->info->start_stack);
--
2.31.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PULL 3/8] linux-user: Fix style problems in linuxload.c
2021-07-08 10:07 [PULL 0/8] Linux user for 6.1 patches Laurent Vivier
2021-07-08 10:07 ` [PULL 1/8] linux-user/elfload: Implement ELF_HWCAP for RISC-V Laurent Vivier
2021-07-08 10:07 ` [PULL 2/8] linux-user: fill ppid field in /proc/self/stat Laurent Vivier
@ 2021-07-08 10:07 ` Laurent Vivier
2021-07-08 10:07 ` [PULL 4/8] linux-user/alpha: Handle TARGET_EWOULDBLOCK as TARGET_EAGAIN Laurent Vivier
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Laurent Vivier @ 2021-07-08 10:07 UTC (permalink / raw)
To: qemu-devel; +Cc: Richard Henderson, Laurent Vivier, Philippe Mathieu-Daudé
From: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20210706234932.356913-3-richard.henderson@linaro.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
linux-user/linuxload.c | 42 ++++++++++++++++++++----------------------
1 file changed, 20 insertions(+), 22 deletions(-)
diff --git a/linux-user/linuxload.c b/linux-user/linuxload.c
index a27e1d0d8bc2..9d4eb5e94b9b 100644
--- a/linux-user/linuxload.c
+++ b/linux-user/linuxload.c
@@ -1,59 +1,57 @@
/* Code for loading Linux executables. Mostly linux kernel code. */
#include "qemu/osdep.h"
-
#include "qemu.h"
#define NGROUPS 32
/* ??? This should really be somewhere else. */
-abi_long memcpy_to_target(abi_ulong dest, const void *src,
- unsigned long len)
+abi_long memcpy_to_target(abi_ulong dest, const void *src, unsigned long len)
{
void *host_ptr;
host_ptr = lock_user(VERIFY_WRITE, dest, len, 0);
- if (!host_ptr)
+ if (!host_ptr) {
return -TARGET_EFAULT;
+ }
memcpy(host_ptr, src, len);
unlock_user(host_ptr, dest, 1);
return 0;
}
-static int count(char ** vec)
+static int count(char **vec)
{
- int i;
+ int i;
- for(i = 0; *vec; i++) {
+ for (i = 0; *vec; i++) {
vec++;
}
-
- return(i);
+ return i;
}
static int prepare_binprm(struct linux_binprm *bprm)
{
- struct stat st;
+ struct stat st;
int mode;
int retval;
- if(fstat(bprm->fd, &st) < 0) {
- return(-errno);
+ if (fstat(bprm->fd, &st) < 0) {
+ return -errno;
}
mode = st.st_mode;
- if(!S_ISREG(mode)) { /* Must be regular file */
- return(-EACCES);
+ if (!S_ISREG(mode)) { /* Must be regular file */
+ return -EACCES;
}
- if(!(mode & 0111)) { /* Must have at least one execute bit set */
- return(-EACCES);
+ if (!(mode & 0111)) { /* Must have at least one execute bit set */
+ return -EACCES;
}
bprm->e_uid = geteuid();
bprm->e_gid = getegid();
/* Set-uid? */
- if(mode & S_ISUID) {
+ if (mode & S_ISUID) {
bprm->e_uid = st.st_uid;
}
@@ -125,8 +123,8 @@ abi_ulong loader_build_argptr(int envc, int argc, abi_ulong sp,
}
int loader_exec(int fdexec, const char *filename, char **argv, char **envp,
- struct target_pt_regs * regs, struct image_info *infop,
- struct linux_binprm *bprm)
+ struct target_pt_regs *regs, struct image_info *infop,
+ struct linux_binprm *bprm)
{
int retval;
@@ -139,7 +137,7 @@ int loader_exec(int fdexec, const char *filename, char **argv, char **envp,
retval = prepare_binprm(bprm);
- if(retval>=0) {
+ if (retval >= 0) {
if (bprm->buf[0] == 0x7f
&& bprm->buf[1] == 'E'
&& bprm->buf[2] == 'L'
@@ -157,11 +155,11 @@ int loader_exec(int fdexec, const char *filename, char **argv, char **envp,
}
}
- if(retval>=0) {
+ if (retval >= 0) {
/* success. Initialize important registers */
do_init_thread(regs, infop);
return retval;
}
- return(retval);
+ return retval;
}
--
2.31.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PULL 4/8] linux-user/alpha: Handle TARGET_EWOULDBLOCK as TARGET_EAGAIN
2021-07-08 10:07 [PULL 0/8] Linux user for 6.1 patches Laurent Vivier
` (2 preceding siblings ...)
2021-07-08 10:07 ` [PULL 3/8] linux-user: Fix style problems in linuxload.c Laurent Vivier
@ 2021-07-08 10:07 ` Laurent Vivier
2021-07-08 10:07 ` [PULL 5/8] linux-user/hppa: " Laurent Vivier
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Laurent Vivier @ 2021-07-08 10:07 UTC (permalink / raw)
To: qemu-devel; +Cc: Richard Henderson, Laurent Vivier, Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé <f4bug@amsat.org>
Linux kernel defines EWOULDBLOCK as EAGAIN (since before v2.6.12-rc2).
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20210704183755.655002-2-f4bug@amsat.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
linux-user/alpha/target_syscall.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/linux-user/alpha/target_syscall.h b/linux-user/alpha/target_syscall.h
index fd389422e31e..4e6f93605660 100644
--- a/linux-user/alpha/target_syscall.h
+++ b/linux-user/alpha/target_syscall.h
@@ -44,6 +44,8 @@ struct target_pt_regs {
#define UNAME_MACHINE "alpha"
#define UNAME_MINIMUM_RELEASE "2.6.32"
+#undef TARGET_EWOULDBLOCK
+#define TARGET_EWOULDBLOCK TARGET_EAGAIN /* Operation would block */
#undef TARGET_EDEADLK
#define TARGET_EDEADLK 11
#undef TARGET_EAGAIN
--
2.31.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PULL 5/8] linux-user/hppa: Handle TARGET_EWOULDBLOCK as TARGET_EAGAIN
2021-07-08 10:07 [PULL 0/8] Linux user for 6.1 patches Laurent Vivier
` (3 preceding siblings ...)
2021-07-08 10:07 ` [PULL 4/8] linux-user/alpha: Handle TARGET_EWOULDBLOCK as TARGET_EAGAIN Laurent Vivier
@ 2021-07-08 10:07 ` Laurent Vivier
2021-07-08 10:07 ` [PULL 6/8] linux-user/mips: " Laurent Vivier
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Laurent Vivier @ 2021-07-08 10:07 UTC (permalink / raw)
To: qemu-devel; +Cc: Richard Henderson, Laurent Vivier, Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé <f4bug@amsat.org>
Linux kernel defines EWOULDBLOCK as EAGAIN (since before v2.6.12-rc2).
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20210704183755.655002-3-f4bug@amsat.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
linux-user/hppa/target_syscall.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/linux-user/hppa/target_syscall.h b/linux-user/hppa/target_syscall.h
index f34e05edb57b..97a095656d89 100644
--- a/linux-user/hppa/target_syscall.h
+++ b/linux-user/hppa/target_syscall.h
@@ -27,6 +27,8 @@ struct target_pt_regs {
#define TARGET_MCL_FUTURE 2
#define TARGET_MCL_ONFAULT 4
+#undef TARGET_EWOULDBLOCK
+#define TARGET_EWOULDBLOCK TARGET_EAGAIN /* Operation would block */
#undef TARGET_ENOMSG
#define TARGET_ENOMSG 35
#undef TARGET_EIDRM
--
2.31.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PULL 6/8] linux-user/mips: Handle TARGET_EWOULDBLOCK as TARGET_EAGAIN
2021-07-08 10:07 [PULL 0/8] Linux user for 6.1 patches Laurent Vivier
` (4 preceding siblings ...)
2021-07-08 10:07 ` [PULL 5/8] linux-user/hppa: " Laurent Vivier
@ 2021-07-08 10:07 ` Laurent Vivier
2021-07-08 10:07 ` [PULL 7/8] linux-user/alpha: Remove hardcoded tabs (code style) Laurent Vivier
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Laurent Vivier @ 2021-07-08 10:07 UTC (permalink / raw)
To: qemu-devel; +Cc: Richard Henderson, Laurent Vivier, Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé <f4bug@amsat.org>
Linux kernel defines EWOULDBLOCK as EAGAIN (since before v2.6.12-rc2).
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20210704183755.655002-4-f4bug@amsat.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
linux-user/mips/target_syscall.h | 2 ++
linux-user/mips64/target_syscall.h | 2 ++
2 files changed, 4 insertions(+)
diff --git a/linux-user/mips/target_syscall.h b/linux-user/mips/target_syscall.h
index dd6fd7af8eac..3e558fdb4b40 100644
--- a/linux-user/mips/target_syscall.h
+++ b/linux-user/mips/target_syscall.h
@@ -21,6 +21,8 @@ struct target_pt_regs {
};
/* Target errno definitions taken from asm-mips/errno.h */
+#undef TARGET_EWOULDBLOCK
+#define TARGET_EWOULDBLOCK TARGET_EAGAIN /* Operation would block */
#undef TARGET_ENOMSG
#define TARGET_ENOMSG 35 /* Identifier removed */
#undef TARGET_EIDRM
diff --git a/linux-user/mips64/target_syscall.h b/linux-user/mips64/target_syscall.h
index 8594955eec26..c54374c5a295 100644
--- a/linux-user/mips64/target_syscall.h
+++ b/linux-user/mips64/target_syscall.h
@@ -18,6 +18,8 @@ struct target_pt_regs {
};
/* Target errno definitions taken from asm-mips/errno.h */
+#undef TARGET_EWOULDBLOCK
+#define TARGET_EWOULDBLOCK TARGET_EAGAIN /* Operation would block */
#undef TARGET_ENOMSG
#define TARGET_ENOMSG 35 /* Identifier removed */
#undef TARGET_EIDRM
--
2.31.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PULL 7/8] linux-user/alpha: Remove hardcoded tabs (code style)
2021-07-08 10:07 [PULL 0/8] Linux user for 6.1 patches Laurent Vivier
` (5 preceding siblings ...)
2021-07-08 10:07 ` [PULL 6/8] linux-user/mips: " Laurent Vivier
@ 2021-07-08 10:07 ` Laurent Vivier
2021-07-08 10:07 ` [PULL 8/8] linux-user/syscall: " Laurent Vivier
2021-07-08 21:16 ` [PULL 0/8] Linux user for 6.1 patches Peter Maydell
8 siblings, 0 replies; 10+ messages in thread
From: Laurent Vivier @ 2021-07-08 10:07 UTC (permalink / raw)
To: qemu-devel; +Cc: Richard Henderson, Laurent Vivier, Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé <f4bug@amsat.org>
We are going to move this code, fix its style first.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20210704183755.655002-7-f4bug@amsat.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
linux-user/alpha/target_syscall.h | 196 +++++++++++++++---------------
1 file changed, 97 insertions(+), 99 deletions(-)
diff --git a/linux-user/alpha/target_syscall.h b/linux-user/alpha/target_syscall.h
index 4e6f93605660..13a71f35eaf3 100644
--- a/linux-user/alpha/target_syscall.h
+++ b/linux-user/alpha/target_syscall.h
@@ -47,196 +47,194 @@ struct target_pt_regs {
#undef TARGET_EWOULDBLOCK
#define TARGET_EWOULDBLOCK TARGET_EAGAIN /* Operation would block */
#undef TARGET_EDEADLK
-#define TARGET_EDEADLK 11
+#define TARGET_EDEADLK 11
#undef TARGET_EAGAIN
-#define TARGET_EAGAIN 35
+#define TARGET_EAGAIN 35
#undef TARGET_EINPROGRESS
-#define TARGET_EINPROGRESS 36
+#define TARGET_EINPROGRESS 36
#undef TARGET_EALREADY
-#define TARGET_EALREADY 37
+#define TARGET_EALREADY 37
#undef TARGET_ENOTSOCK
-#define TARGET_ENOTSOCK 38
+#define TARGET_ENOTSOCK 38
#undef TARGET_EDESTADDRREQ
-#define TARGET_EDESTADDRREQ 39
+#define TARGET_EDESTADDRREQ 39
#undef TARGET_EMSGSIZE
-#define TARGET_EMSGSIZE 40
+#define TARGET_EMSGSIZE 40
#undef TARGET_EPROTOTYPE
-#define TARGET_EPROTOTYPE 41
+#define TARGET_EPROTOTYPE 41
#undef TARGET_ENOPROTOOPT
-#define TARGET_ENOPROTOOPT 42
+#define TARGET_ENOPROTOOPT 42
#undef TARGET_EPROTONOSUPPORT
-#define TARGET_EPROTONOSUPPORT 43
+#define TARGET_EPROTONOSUPPORT 43
#undef TARGET_ESOCKTNOSUPPORT
-#define TARGET_ESOCKTNOSUPPORT 44
+#define TARGET_ESOCKTNOSUPPORT 44
#undef TARGET_EOPNOTSUPP
-#define TARGET_EOPNOTSUPP 45
+#define TARGET_EOPNOTSUPP 45
#undef TARGET_EPFNOSUPPORT
-#define TARGET_EPFNOSUPPORT 46
+#define TARGET_EPFNOSUPPORT 46
#undef TARGET_EAFNOSUPPORT
-#define TARGET_EAFNOSUPPORT 47
+#define TARGET_EAFNOSUPPORT 47
#undef TARGET_EADDRINUSE
-#define TARGET_EADDRINUSE 48
+#define TARGET_EADDRINUSE 48
#undef TARGET_EADDRNOTAVAIL
-#define TARGET_EADDRNOTAVAIL 49
+#define TARGET_EADDRNOTAVAIL 49
#undef TARGET_ENETDOWN
-#define TARGET_ENETDOWN 50
+#define TARGET_ENETDOWN 50
#undef TARGET_ENETUNREACH
-#define TARGET_ENETUNREACH 51
+#define TARGET_ENETUNREACH 51
#undef TARGET_ENETRESET
-#define TARGET_ENETRESET 52
+#define TARGET_ENETRESET 52
#undef TARGET_ECONNABORTED
-#define TARGET_ECONNABORTED 53
+#define TARGET_ECONNABORTED 53
#undef TARGET_ECONNRESET
-#define TARGET_ECONNRESET 54
+#define TARGET_ECONNRESET 54
#undef TARGET_ENOBUFS
-#define TARGET_ENOBUFS 55
+#define TARGET_ENOBUFS 55
#undef TARGET_EISCONN
-#define TARGET_EISCONN 56
+#define TARGET_EISCONN 56
#undef TARGET_ENOTCONN
-#define TARGET_ENOTCONN 57
+#define TARGET_ENOTCONN 57
#undef TARGET_ESHUTDOWN
-#define TARGET_ESHUTDOWN 58
+#define TARGET_ESHUTDOWN 58
#undef TARGET_ETOOMANYREFS
-#define TARGET_ETOOMANYREFS 59
+#define TARGET_ETOOMANYREFS 59
#undef TARGET_ETIMEDOUT
-#define TARGET_ETIMEDOUT 60
+#define TARGET_ETIMEDOUT 60
#undef TARGET_ECONNREFUSED
-#define TARGET_ECONNREFUSED 61
+#define TARGET_ECONNREFUSED 61
#undef TARGET_ELOOP
-#define TARGET_ELOOP 62
+#define TARGET_ELOOP 62
#undef TARGET_ENAMETOOLONG
-#define TARGET_ENAMETOOLONG 63
+#define TARGET_ENAMETOOLONG 63
#undef TARGET_EHOSTDOWN
-#define TARGET_EHOSTDOWN 64
+#define TARGET_EHOSTDOWN 64
#undef TARGET_EHOSTUNREACH
-#define TARGET_EHOSTUNREACH 65
+#define TARGET_EHOSTUNREACH 65
#undef TARGET_ENOTEMPTY
-#define TARGET_ENOTEMPTY 66
-// Unused 67
+#define TARGET_ENOTEMPTY 66
+/* Unused 67 */
#undef TARGET_EUSERS
-#define TARGET_EUSERS 68
+#define TARGET_EUSERS 68
#undef TARGET_EDQUOT
-#define TARGET_EDQUOT 69
+#define TARGET_EDQUOT 69
#undef TARGET_ESTALE
-#define TARGET_ESTALE 70
+#define TARGET_ESTALE 70
#undef TARGET_EREMOTE
-#define TARGET_EREMOTE 71
-// Unused 72-76
+#define TARGET_EREMOTE 71
+/* Unused 72-76 */
#undef TARGET_ENOLCK
-#define TARGET_ENOLCK 77
+#define TARGET_ENOLCK 77
#undef TARGET_ENOSYS
-#define TARGET_ENOSYS 78
-// Unused 79
+#define TARGET_ENOSYS 78
+/* Unused 79 */
#undef TARGET_ENOMSG
-#define TARGET_ENOMSG 80
+#define TARGET_ENOMSG 80
#undef TARGET_EIDRM
-#define TARGET_EIDRM 81
+#define TARGET_EIDRM 81
#undef TARGET_ENOSR
-#define TARGET_ENOSR 82
+#define TARGET_ENOSR 82
#undef TARGET_ETIME
-#define TARGET_ETIME 83
+#define TARGET_ETIME 83
#undef TARGET_EBADMSG
-#define TARGET_EBADMSG 84
+#define TARGET_EBADMSG 84
#undef TARGET_EPROTO
-#define TARGET_EPROTO 85
+#define TARGET_EPROTO 85
#undef TARGET_ENODATA
-#define TARGET_ENODATA 86
+#define TARGET_ENODATA 86
#undef TARGET_ENOSTR
-#define TARGET_ENOSTR 87
+#define TARGET_ENOSTR 87
#undef TARGET_ECHRNG
-#define TARGET_ECHRNG 88
+#define TARGET_ECHRNG 88
#undef TARGET_EL2NSYNC
-#define TARGET_EL2NSYNC 89
+#define TARGET_EL2NSYNC 89
#undef TARGET_EL3HLT
-#define TARGET_EL3HLT 90
+#define TARGET_EL3HLT 90
#undef TARGET_EL3RST
-#define TARGET_EL3RST 91
+#define TARGET_EL3RST 91
#undef TARGET_ENOPKG
-#define TARGET_ENOPKG 92
+#define TARGET_ENOPKG 92
#undef TARGET_ELNRNG
-#define TARGET_ELNRNG 93
+#define TARGET_ELNRNG 93
#undef TARGET_EUNATCH
-#define TARGET_EUNATCH 94
+#define TARGET_EUNATCH 94
#undef TARGET_ENOCSI
-#define TARGET_ENOCSI 95
+#define TARGET_ENOCSI 95
#undef TARGET_EL2HLT
-#define TARGET_EL2HLT 96
+#define TARGET_EL2HLT 96
#undef TARGET_EBADE
-#define TARGET_EBADE 97
+#define TARGET_EBADE 97
#undef TARGET_EBADR
-#define TARGET_EBADR 98
+#define TARGET_EBADR 98
#undef TARGET_EXFULL
-#define TARGET_EXFULL 99
+#define TARGET_EXFULL 99
#undef TARGET_ENOANO
-#define TARGET_ENOANO 100
+#define TARGET_ENOANO 100
#undef TARGET_EBADRQC
-#define TARGET_EBADRQC 101
+#define TARGET_EBADRQC 101
#undef TARGET_EBADSLT
-#define TARGET_EBADSLT 102
-// Unused 103
+#define TARGET_EBADSLT 102
+/* Unused 103 */
#undef TARGET_EBFONT
-#define TARGET_EBFONT 104
+#define TARGET_EBFONT 104
#undef TARGET_ENONET
-#define TARGET_ENONET 105
+#define TARGET_ENONET 105
#undef TARGET_ENOLINK
-#define TARGET_ENOLINK 106
+#define TARGET_ENOLINK 106
#undef TARGET_EADV
-#define TARGET_EADV 107
+#define TARGET_EADV 107
#undef TARGET_ESRMNT
-#define TARGET_ESRMNT 108
+#define TARGET_ESRMNT 108
#undef TARGET_ECOMM
-#define TARGET_ECOMM 109
+#define TARGET_ECOMM 109
#undef TARGET_EMULTIHOP
-#define TARGET_EMULTIHOP 110
+#define TARGET_EMULTIHOP 110
#undef TARGET_EDOTDOT
-#define TARGET_EDOTDOT 111
+#define TARGET_EDOTDOT 111
#undef TARGET_EOVERFLOW
-#define TARGET_EOVERFLOW 112
+#define TARGET_EOVERFLOW 112
#undef TARGET_ENOTUNIQ
-#define TARGET_ENOTUNIQ 113
+#define TARGET_ENOTUNIQ 113
#undef TARGET_EBADFD
-#define TARGET_EBADFD 114
+#define TARGET_EBADFD 114
#undef TARGET_EREMCHG
-#define TARGET_EREMCHG 115
+#define TARGET_EREMCHG 115
#undef TARGET_EILSEQ
-#define TARGET_EILSEQ 116
-
-// Same as default 117-121
-
+#define TARGET_EILSEQ 116
+/* Same as default 117-121 */
#undef TARGET_ELIBACC
-#define TARGET_ELIBACC 122
+#define TARGET_ELIBACC 122
#undef TARGET_ELIBBAD
-#define TARGET_ELIBBAD 123
+#define TARGET_ELIBBAD 123
#undef TARGET_ELIBSCN
-#define TARGET_ELIBSCN 124
+#define TARGET_ELIBSCN 124
#undef TARGET_ELIBMAX
-#define TARGET_ELIBMAX 125
+#define TARGET_ELIBMAX 125
#undef TARGET_ELIBEXEC
-#define TARGET_ELIBEXEC 126
+#define TARGET_ELIBEXEC 126
#undef TARGET_ERESTART
-#define TARGET_ERESTART 127
+#define TARGET_ERESTART 127
#undef TARGET_ESTRPIPE
-#define TARGET_ESTRPIPE 128
+#define TARGET_ESTRPIPE 128
#undef TARGET_ENOMEDIUM
-#define TARGET_ENOMEDIUM 129
+#define TARGET_ENOMEDIUM 129
#undef TARGET_EMEDIUMTYPE
-#define TARGET_EMEDIUMTYPE 130
+#define TARGET_EMEDIUMTYPE 130
#undef TARGET_ECANCELED
-#define TARGET_ECANCELED 131
+#define TARGET_ECANCELED 131
#undef TARGET_ENOKEY
-#define TARGET_ENOKEY 132
+#define TARGET_ENOKEY 132
#undef TARGET_EKEYEXPIRED
-#define TARGET_EKEYEXPIRED 133
+#define TARGET_EKEYEXPIRED 133
#undef TARGET_EKEYREVOKED
-#define TARGET_EKEYREVOKED 134
+#define TARGET_EKEYREVOKED 134
#undef TARGET_EKEYREJECTED
-#define TARGET_EKEYREJECTED 135
+#define TARGET_EKEYREJECTED 135
#undef TARGET_EOWNERDEAD
-#define TARGET_EOWNERDEAD 136
+#define TARGET_EOWNERDEAD 136
#undef TARGET_ENOTRECOVERABLE
-#define TARGET_ENOTRECOVERABLE 137
+#define TARGET_ENOTRECOVERABLE 137
#undef TARGET_ERFKILL
-#define TARGET_ERFKILL 138
+#define TARGET_ERFKILL 138
#undef TARGET_EHWPOISON
#define TARGET_EHWPOISON 139
--
2.31.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PULL 8/8] linux-user/syscall: Remove hardcoded tabs (code style)
2021-07-08 10:07 [PULL 0/8] Linux user for 6.1 patches Laurent Vivier
` (6 preceding siblings ...)
2021-07-08 10:07 ` [PULL 7/8] linux-user/alpha: Remove hardcoded tabs (code style) Laurent Vivier
@ 2021-07-08 10:07 ` Laurent Vivier
2021-07-08 21:16 ` [PULL 0/8] Linux user for 6.1 patches Peter Maydell
8 siblings, 0 replies; 10+ messages in thread
From: Laurent Vivier @ 2021-07-08 10:07 UTC (permalink / raw)
To: qemu-devel; +Cc: Laurent Vivier, Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé <f4bug@amsat.org>
We are going to move this code, fix its style first.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20210704183755.655002-12-f4bug@amsat.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
linux-user/syscall.c | 188 +++++++++++++++++++++----------------------
1 file changed, 94 insertions(+), 94 deletions(-)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 3bc06d178e83..2e826206d227 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -519,112 +519,112 @@ static uint16_t target_to_host_errno_table[ERRNO_TABLE_SIZE] = {
* minus the errnos that are not actually generic to all archs.
*/
static uint16_t host_to_target_errno_table[ERRNO_TABLE_SIZE] = {
- [EAGAIN] = TARGET_EAGAIN,
- [EIDRM] = TARGET_EIDRM,
- [ECHRNG] = TARGET_ECHRNG,
- [EL2NSYNC] = TARGET_EL2NSYNC,
- [EL3HLT] = TARGET_EL3HLT,
- [EL3RST] = TARGET_EL3RST,
- [ELNRNG] = TARGET_ELNRNG,
- [EUNATCH] = TARGET_EUNATCH,
- [ENOCSI] = TARGET_ENOCSI,
- [EL2HLT] = TARGET_EL2HLT,
- [EDEADLK] = TARGET_EDEADLK,
- [ENOLCK] = TARGET_ENOLCK,
- [EBADE] = TARGET_EBADE,
- [EBADR] = TARGET_EBADR,
- [EXFULL] = TARGET_EXFULL,
- [ENOANO] = TARGET_ENOANO,
- [EBADRQC] = TARGET_EBADRQC,
- [EBADSLT] = TARGET_EBADSLT,
- [EBFONT] = TARGET_EBFONT,
- [ENOSTR] = TARGET_ENOSTR,
- [ENODATA] = TARGET_ENODATA,
- [ETIME] = TARGET_ETIME,
- [ENOSR] = TARGET_ENOSR,
- [ENONET] = TARGET_ENONET,
- [ENOPKG] = TARGET_ENOPKG,
- [EREMOTE] = TARGET_EREMOTE,
- [ENOLINK] = TARGET_ENOLINK,
- [EADV] = TARGET_EADV,
- [ESRMNT] = TARGET_ESRMNT,
- [ECOMM] = TARGET_ECOMM,
- [EPROTO] = TARGET_EPROTO,
- [EDOTDOT] = TARGET_EDOTDOT,
- [EMULTIHOP] = TARGET_EMULTIHOP,
- [EBADMSG] = TARGET_EBADMSG,
- [ENAMETOOLONG] = TARGET_ENAMETOOLONG,
- [EOVERFLOW] = TARGET_EOVERFLOW,
- [ENOTUNIQ] = TARGET_ENOTUNIQ,
- [EBADFD] = TARGET_EBADFD,
- [EREMCHG] = TARGET_EREMCHG,
- [ELIBACC] = TARGET_ELIBACC,
- [ELIBBAD] = TARGET_ELIBBAD,
- [ELIBSCN] = TARGET_ELIBSCN,
- [ELIBMAX] = TARGET_ELIBMAX,
- [ELIBEXEC] = TARGET_ELIBEXEC,
- [EILSEQ] = TARGET_EILSEQ,
- [ENOSYS] = TARGET_ENOSYS,
- [ELOOP] = TARGET_ELOOP,
- [ERESTART] = TARGET_ERESTART,
- [ESTRPIPE] = TARGET_ESTRPIPE,
- [ENOTEMPTY] = TARGET_ENOTEMPTY,
- [EUSERS] = TARGET_EUSERS,
- [ENOTSOCK] = TARGET_ENOTSOCK,
- [EDESTADDRREQ] = TARGET_EDESTADDRREQ,
- [EMSGSIZE] = TARGET_EMSGSIZE,
- [EPROTOTYPE] = TARGET_EPROTOTYPE,
- [ENOPROTOOPT] = TARGET_ENOPROTOOPT,
- [EPROTONOSUPPORT] = TARGET_EPROTONOSUPPORT,
- [ESOCKTNOSUPPORT] = TARGET_ESOCKTNOSUPPORT,
- [EOPNOTSUPP] = TARGET_EOPNOTSUPP,
- [EPFNOSUPPORT] = TARGET_EPFNOSUPPORT,
- [EAFNOSUPPORT] = TARGET_EAFNOSUPPORT,
- [EADDRINUSE] = TARGET_EADDRINUSE,
- [EADDRNOTAVAIL] = TARGET_EADDRNOTAVAIL,
- [ENETDOWN] = TARGET_ENETDOWN,
- [ENETUNREACH] = TARGET_ENETUNREACH,
- [ENETRESET] = TARGET_ENETRESET,
- [ECONNABORTED] = TARGET_ECONNABORTED,
- [ECONNRESET] = TARGET_ECONNRESET,
- [ENOBUFS] = TARGET_ENOBUFS,
- [EISCONN] = TARGET_EISCONN,
- [ENOTCONN] = TARGET_ENOTCONN,
- [EUCLEAN] = TARGET_EUCLEAN,
- [ENOTNAM] = TARGET_ENOTNAM,
- [ENAVAIL] = TARGET_ENAVAIL,
- [EISNAM] = TARGET_EISNAM,
- [EREMOTEIO] = TARGET_EREMOTEIO,
+ [EAGAIN] = TARGET_EAGAIN,
+ [EIDRM] = TARGET_EIDRM,
+ [ECHRNG] = TARGET_ECHRNG,
+ [EL2NSYNC] = TARGET_EL2NSYNC,
+ [EL3HLT] = TARGET_EL3HLT,
+ [EL3RST] = TARGET_EL3RST,
+ [ELNRNG] = TARGET_ELNRNG,
+ [EUNATCH] = TARGET_EUNATCH,
+ [ENOCSI] = TARGET_ENOCSI,
+ [EL2HLT] = TARGET_EL2HLT,
+ [EDEADLK] = TARGET_EDEADLK,
+ [ENOLCK] = TARGET_ENOLCK,
+ [EBADE] = TARGET_EBADE,
+ [EBADR] = TARGET_EBADR,
+ [EXFULL] = TARGET_EXFULL,
+ [ENOANO] = TARGET_ENOANO,
+ [EBADRQC] = TARGET_EBADRQC,
+ [EBADSLT] = TARGET_EBADSLT,
+ [EBFONT] = TARGET_EBFONT,
+ [ENOSTR] = TARGET_ENOSTR,
+ [ENODATA] = TARGET_ENODATA,
+ [ETIME] = TARGET_ETIME,
+ [ENOSR] = TARGET_ENOSR,
+ [ENONET] = TARGET_ENONET,
+ [ENOPKG] = TARGET_ENOPKG,
+ [EREMOTE] = TARGET_EREMOTE,
+ [ENOLINK] = TARGET_ENOLINK,
+ [EADV] = TARGET_EADV,
+ [ESRMNT] = TARGET_ESRMNT,
+ [ECOMM] = TARGET_ECOMM,
+ [EPROTO] = TARGET_EPROTO,
+ [EDOTDOT] = TARGET_EDOTDOT,
+ [EMULTIHOP] = TARGET_EMULTIHOP,
+ [EBADMSG] = TARGET_EBADMSG,
+ [ENAMETOOLONG] = TARGET_ENAMETOOLONG,
+ [EOVERFLOW] = TARGET_EOVERFLOW,
+ [ENOTUNIQ] = TARGET_ENOTUNIQ,
+ [EBADFD] = TARGET_EBADFD,
+ [EREMCHG] = TARGET_EREMCHG,
+ [ELIBACC] = TARGET_ELIBACC,
+ [ELIBBAD] = TARGET_ELIBBAD,
+ [ELIBSCN] = TARGET_ELIBSCN,
+ [ELIBMAX] = TARGET_ELIBMAX,
+ [ELIBEXEC] = TARGET_ELIBEXEC,
+ [EILSEQ] = TARGET_EILSEQ,
+ [ENOSYS] = TARGET_ENOSYS,
+ [ELOOP] = TARGET_ELOOP,
+ [ERESTART] = TARGET_ERESTART,
+ [ESTRPIPE] = TARGET_ESTRPIPE,
+ [ENOTEMPTY] = TARGET_ENOTEMPTY,
+ [EUSERS] = TARGET_EUSERS,
+ [ENOTSOCK] = TARGET_ENOTSOCK,
+ [EDESTADDRREQ] = TARGET_EDESTADDRREQ,
+ [EMSGSIZE] = TARGET_EMSGSIZE,
+ [EPROTOTYPE] = TARGET_EPROTOTYPE,
+ [ENOPROTOOPT] = TARGET_ENOPROTOOPT,
+ [EPROTONOSUPPORT] = TARGET_EPROTONOSUPPORT,
+ [ESOCKTNOSUPPORT] = TARGET_ESOCKTNOSUPPORT,
+ [EOPNOTSUPP] = TARGET_EOPNOTSUPP,
+ [EPFNOSUPPORT] = TARGET_EPFNOSUPPORT,
+ [EAFNOSUPPORT] = TARGET_EAFNOSUPPORT,
+ [EADDRINUSE] = TARGET_EADDRINUSE,
+ [EADDRNOTAVAIL] = TARGET_EADDRNOTAVAIL,
+ [ENETDOWN] = TARGET_ENETDOWN,
+ [ENETUNREACH] = TARGET_ENETUNREACH,
+ [ENETRESET] = TARGET_ENETRESET,
+ [ECONNABORTED] = TARGET_ECONNABORTED,
+ [ECONNRESET] = TARGET_ECONNRESET,
+ [ENOBUFS] = TARGET_ENOBUFS,
+ [EISCONN] = TARGET_EISCONN,
+ [ENOTCONN] = TARGET_ENOTCONN,
+ [EUCLEAN] = TARGET_EUCLEAN,
+ [ENOTNAM] = TARGET_ENOTNAM,
+ [ENAVAIL] = TARGET_ENAVAIL,
+ [EISNAM] = TARGET_EISNAM,
+ [EREMOTEIO] = TARGET_EREMOTEIO,
[EDQUOT] = TARGET_EDQUOT,
- [ESHUTDOWN] = TARGET_ESHUTDOWN,
- [ETOOMANYREFS] = TARGET_ETOOMANYREFS,
- [ETIMEDOUT] = TARGET_ETIMEDOUT,
- [ECONNREFUSED] = TARGET_ECONNREFUSED,
- [EHOSTDOWN] = TARGET_EHOSTDOWN,
- [EHOSTUNREACH] = TARGET_EHOSTUNREACH,
- [EALREADY] = TARGET_EALREADY,
- [EINPROGRESS] = TARGET_EINPROGRESS,
- [ESTALE] = TARGET_ESTALE,
- [ECANCELED] = TARGET_ECANCELED,
- [ENOMEDIUM] = TARGET_ENOMEDIUM,
- [EMEDIUMTYPE] = TARGET_EMEDIUMTYPE,
+ [ESHUTDOWN] = TARGET_ESHUTDOWN,
+ [ETOOMANYREFS] = TARGET_ETOOMANYREFS,
+ [ETIMEDOUT] = TARGET_ETIMEDOUT,
+ [ECONNREFUSED] = TARGET_ECONNREFUSED,
+ [EHOSTDOWN] = TARGET_EHOSTDOWN,
+ [EHOSTUNREACH] = TARGET_EHOSTUNREACH,
+ [EALREADY] = TARGET_EALREADY,
+ [EINPROGRESS] = TARGET_EINPROGRESS,
+ [ESTALE] = TARGET_ESTALE,
+ [ECANCELED] = TARGET_ECANCELED,
+ [ENOMEDIUM] = TARGET_ENOMEDIUM,
+ [EMEDIUMTYPE] = TARGET_EMEDIUMTYPE,
#ifdef ENOKEY
- [ENOKEY] = TARGET_ENOKEY,
+ [ENOKEY] = TARGET_ENOKEY,
#endif
#ifdef EKEYEXPIRED
- [EKEYEXPIRED] = TARGET_EKEYEXPIRED,
+ [EKEYEXPIRED] = TARGET_EKEYEXPIRED,
#endif
#ifdef EKEYREVOKED
- [EKEYREVOKED] = TARGET_EKEYREVOKED,
+ [EKEYREVOKED] = TARGET_EKEYREVOKED,
#endif
#ifdef EKEYREJECTED
- [EKEYREJECTED] = TARGET_EKEYREJECTED,
+ [EKEYREJECTED] = TARGET_EKEYREJECTED,
#endif
#ifdef EOWNERDEAD
- [EOWNERDEAD] = TARGET_EOWNERDEAD,
+ [EOWNERDEAD] = TARGET_EOWNERDEAD,
#endif
#ifdef ENOTRECOVERABLE
- [ENOTRECOVERABLE] = TARGET_ENOTRECOVERABLE,
+ [ENOTRECOVERABLE] = TARGET_ENOTRECOVERABLE,
#endif
#ifdef ENOMSG
[ENOMSG] = TARGET_ENOMSG,
--
2.31.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PULL 0/8] Linux user for 6.1 patches
2021-07-08 10:07 [PULL 0/8] Linux user for 6.1 patches Laurent Vivier
` (7 preceding siblings ...)
2021-07-08 10:07 ` [PULL 8/8] linux-user/syscall: " Laurent Vivier
@ 2021-07-08 21:16 ` Peter Maydell
8 siblings, 0 replies; 10+ messages in thread
From: Peter Maydell @ 2021-07-08 21:16 UTC (permalink / raw)
To: Laurent Vivier; +Cc: QEMU Developers
On Thu, 8 Jul 2021 at 11:10, Laurent Vivier <laurent@vivier.eu> wrote:
>
> The following changes since commit 9aef0954195cc592e86846dbbe7f3c2c5603690a:
>
> Merge remote-tracking branch 'remotes/bonzini-gitlab/tags/for-upstream' into staging (2021-07-06 11:24:58 +0100)
>
> are available in the Git repository at:
>
> git://github.com/vivier/qemu.git tags/linux-user-for-6.1-pull-request
>
> for you to fetch changes up to c632ea1dd90313bc360b9de9d5014c2167f4d038:
>
> linux-user/syscall: Remove hardcoded tabs (code style) (2021-07-07 21:34:21 +0200)
>
> ----------------------------------------------------------------
> linux-user pull request 20210708
>
> Code and style cleanup
> Add ppid in self/stat
> ELF_HWCAP for RISC-V
>
> ----------------------------------------------------------------
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/6.1
for any user-visible changes.
-- PMM
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2021-07-08 21:18 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-08 10:07 [PULL 0/8] Linux user for 6.1 patches Laurent Vivier
2021-07-08 10:07 ` [PULL 1/8] linux-user/elfload: Implement ELF_HWCAP for RISC-V Laurent Vivier
2021-07-08 10:07 ` [PULL 2/8] linux-user: fill ppid field in /proc/self/stat Laurent Vivier
2021-07-08 10:07 ` [PULL 3/8] linux-user: Fix style problems in linuxload.c Laurent Vivier
2021-07-08 10:07 ` [PULL 4/8] linux-user/alpha: Handle TARGET_EWOULDBLOCK as TARGET_EAGAIN Laurent Vivier
2021-07-08 10:07 ` [PULL 5/8] linux-user/hppa: " Laurent Vivier
2021-07-08 10:07 ` [PULL 6/8] linux-user/mips: " Laurent Vivier
2021-07-08 10:07 ` [PULL 7/8] linux-user/alpha: Remove hardcoded tabs (code style) Laurent Vivier
2021-07-08 10:07 ` [PULL 8/8] linux-user/syscall: " Laurent Vivier
2021-07-08 21:16 ` [PULL 0/8] Linux user for 6.1 patches Peter Maydell
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.