[Qemu-devel] [PULL v2 6/6] linux-user: ioctl() command type is int

2015-06-16 Thread riku . voipio
e case of the target command type instead of abi_long. Signed-off-by: Laurent Vivier Signed-off-by: Riku Voipio --- linux-user/syscall.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 5cf265c..f62c698 100644 ---

[Qemu-devel] [PULL v2 4/6] linux-user: use __get_user and __put_user in cmsg conversions

2015-06-16 Thread riku . voipio
using __put_user() rather than __get_user() for the SCM_CREDENTIALS conversion, which meant it wasn't getting the benefit of the misalignment handling.) Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/syscall.c | 20 +++- 1 file changed, 11 insertions(

[Qemu-devel] [PULL v2 5/6] linux-user: fix the breakpoint inheritance in spawned threads

2015-06-16 Thread riku . voipio
From: Thierry Bultel When a thread is spawned, cpu_copy re-initializes the bp & wp lists of current thread, instead of the ones of the new thread. The effect is that breakpoints are no longer hit. Signed-off-by: Thierry Bultel Signed-off-by: Riku Voipio --- linux-user/main.c | 4 ++-- 1

[Qemu-devel] [PULL v2 1/6] linux-user: Allocate thunk size dynamically

2015-06-16 Thread riku . voipio
ander Graf Signed-off-by: Riku Voipio --- include/exec/user/thunk.h | 4 +++- linux-user/syscall.c | 3 +++ thunk.c | 16 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/include/exec/user/thunk.h b/include/exec/user/thunk.h index 87025c

[Qemu-devel] [PULL v2 2/6] linux-user: Use abi_ulong for TARGET_ELF_PAGESTART

2015-06-16 Thread riku . voipio
-by: Riku Voipio --- linux-user/elfload.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/linux-user/elfload.c b/linux-user/elfload.c index b71e866..1788368 100644 --- a/linux-user/elfload.c +++ b/linux-user/elfload.c @@ -1256,7 +1256,8 @@ struct exec /* Necessary parameters

[Qemu-devel] [PULL v2 0/6] linux-user patches for 2.4 softfreeze

2015-06-16 Thread riku . voipio
From: Riku Voipio The following changes since commit 0a2df857a7038c75379cc575de5d4be4c0ac629e: Merge remote-tracking branch 'remotes/stefanha/tags/net-pull-request' into staging (2015-06-12 15:39:05 +0100) are available in the git repository at: git://git.linaro.org/people/r

[Qemu-devel] [PULL v2 3/6] linux-user: Fix length handling in host_to_target_cmsg

2015-06-16 Thread riku . voipio
to fix these issues, and add a comment in target_to_host_cmsg to explain why the overflow logging it does is a QEMU bug, not a guest issue. Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/syscall.c | 69 ++-- 1 file changed,

Re: [Qemu-devel] [PATCH v2] linux-user: ioctl() command type is int

2015-06-15 Thread Riku Voipio
On 16 June 2015 at 01:35, Laurent Vivier wrote: > When executing a 64bit target chroot on 64bit host, > the ioctl() command can mismatch. > > It seems the previous commit doesn't solve the problem in > my case: > > 9c6bf9c7 linux-user: Fix ioctl cmd type mismatch on 64-bit targets > > For

[Qemu-devel] [PULL 4/6] linux-user: Fix length handling in host_to_target_cmsg

2015-06-15 Thread riku . voipio
to fix these issues, and add a comment in target_to_host_cmsg to explain why the overflow logging it does is a QEMU bug, not a guest issue. Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/syscall.c | 69 ++-- 1 file changed,

[Qemu-devel] [PULL 0/6] linux-user patches for 2.4 softfreeze

2015-06-15 Thread riku . voipio
From: Riku Voipio The following changes since commit 0a2df857a7038c75379cc575de5d4be4c0ac629e: Merge remote-tracking branch 'remotes/stefanha/tags/net-pull-request' into staging (2015-06-12 15:39:05 +0100) are available in the git repository at: git://git.linaro.org/people/r

[Qemu-devel] [PULL 3/6] linux-user: ioctl() command type is int

2015-06-15 Thread riku . voipio
es int in the case of the target command type instead of abi_long (and for consistency, update IOCTLEntry). Signed-off-by: Laurent Vivier Reviewed-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/syscall.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff

[Qemu-devel] [PULL 1/6] linux-user: Allocate thunk size dynamically

2015-06-15 Thread riku . voipio
ander Graf Signed-off-by: Riku Voipio --- include/exec/user/thunk.h | 4 +++- linux-user/syscall.c | 3 +++ thunk.c | 16 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/include/exec/user/thunk.h b/include/exec/user/thunk.h index 87025c

[Qemu-devel] [PULL 6/6] linux-user: fix the breakpoint inheritance in spawned threads

2015-06-15 Thread riku . voipio
From: Thierry Bultel When a thread is spawned, cpu_copy re-initializes the bp & wp lists of current thread, instead of the ones of the new thread. The effect is that breakpoints are no longer hit. Signed-off-by: Thierry Bultel Signed-off-by: Riku Voipio --- linux-user/main.c | 4 ++-- 1

[Qemu-devel] [PULL 2/6] linux-user: Use abi_ulong for TARGET_ELF_PAGESTART

2015-06-15 Thread riku . voipio
-by: Riku Voipio --- linux-user/elfload.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/linux-user/elfload.c b/linux-user/elfload.c index b71e866..1788368 100644 --- a/linux-user/elfload.c +++ b/linux-user/elfload.c @@ -1256,7 +1256,8 @@ struct exec /* Necessary parameters

[Qemu-devel] [PULL 5/6] linux-user: use __get_user and __put_user in cmsg conversions

2015-06-15 Thread riku . voipio
using __put_user() rather than __get_user() for the SCM_CREDENTIALS conversion, which meant it wasn't getting the benefit of the misalignment handling.) Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/syscall.c | 20 +++- 1 file changed, 11 insertions(

Re: [Qemu-devel] [PATCH 0/2] sh4 linux-user cpu and hwcap

2015-06-12 Thread Riku Voipio
=shortlog;h=refs/heads/sh4-next A bit late, but I'm ok for merging these patches via sh4 tree. If you still going to edit branch, you can add my Acked-by: Riku Voipio Riku

Re: [Qemu-devel] [PATCH v2] linux-user: ioctl() command type is int

2015-06-12 Thread Riku Voipio
On Saturday, May 23, 2015 4:17:05 PM EEST, Laurent Vivier wrote: When executing a 64bit target chroot on 64bit host, the ioctl() command can mismatch. It seems the previous commit doesn't solve the problem in my case: 9c6bf9c7 linux-user: Fix ioctl cmd type mismatch on 64-bit targets F

Re: [Qemu-devel] [PATCH v2] linux-user: Allocate thunk size dynamically

2015-06-12 Thread Riku Voipio
On 7 May 2015 at 00:47, Alexander Graf wrote: > We store all struct types in an array of static size without ever > checking whether we overrun it. Of course some day someone (like me > in another, ancient ALSA enabling patch set) will run into the limit > without realizing it. > > So let's make t

Re: [Qemu-devel] [PATCH] linux-user: Use abi_ulong for TARGET_ELF_PAGESTART

2015-06-12 Thread Riku Voipio
Hi, Applied to linux-user que, thanks Riku On Tuesday, June 2, 2015 12:12:21 PM EEST, Yongbok Kim wrote: ping! On 20/04/2015 16:15, Yongbok Kim wrote: TARGET_ELF_PAGESTART is required to use abi_ulong to correctly handle addresses for different target bits width. This patch fixes a problem w

Re: [Qemu-devel] [PATCH 0/2] linux-user: Fix length handling in cmsg conversions

2015-06-06 Thread Riku Voipio
On Jun 5, 2015 6:03 PM, Peter Maydell wrote: > > Ping? I'll collect and review linux-user patches from the list on monday. Riku > > thanks > -- PMM > > On 26 May 2015 at 19:46, Peter Maydell wrote: > > This patchset fixes some problems in conversions of cmsg structures > > in target_to_ho

Re: [Qemu-devel] [PULL 2/2] linux-user: Fix up timer id handling

2015-03-23 Thread Riku Voipio
Hi, Sorry for these two patches, please ignore. Riku

[Qemu-devel] [PULL 3/3] linux-user: fix broken cpu_copy()

2015-03-23 Thread riku . voipio
From: Leon Alrae New threads always point at the same env which is incorrect and usually leads to a crash. Signed-off-by: Leon Alrae Reviewed-by: Andreas Färber Signed-off-by: Riku Voipio --- linux-user/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-user

[Qemu-devel] [PULL 1/2] linux-user: Do not subtract offset from end address

2015-03-23 Thread riku . voipio
From: Tom Musta When computing the upper address of a program segment, do not subtract the offset from the virtual address; instead compute the sum of the virtual address and the memory size. Signed-off-by: Tom Musta Signed-off-by: Riku Voipio --- linux-user/elfload.c | 2 +- 1 file changed

[Qemu-devel] [PULL 0/3] linux-user patches for 2.3-rc1

2015-03-23 Thread riku . voipio
From: Riku Voipio The following changes since commit 3c6c9fe034c0c07b77f272e4a53d7735220a16a4: Merge remote-tracking branch 'remotes/ehabkost/tags/x86-pull-request' into staging (2015-03-20 12:26:09 +) are available in the git repository at: git://git.linaro.org/people/r

[Qemu-devel] [PULL 2/3] linux-user: fix emulation of splice syscall

2015-03-23 Thread riku . voipio
From: Andreas Schwab The second and fourth argument are in/out parameters, store them back after the syscall. Also, the fourth argument was mishandled, and EFAULT handling was missing. Signed-off-by: Andreas Schwab Reviewed-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user

[Qemu-devel] [PULL 1/3] linux-user/main.c: Remove redundant end_exclusive() in arm_kernel_cmpxchg64_helper()

2015-03-23 Thread riku . voipio
RM 64 bit cmpxchg kernel helper". Signed-off-by: Chen Gang Signed-off-by: Riku Voipio --- linux-user/main.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/linux-user/main.c b/linux-user/main.c index 6e446de..31eb60f 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -525,8 +525

[Qemu-devel] [PULL 2/2] linux-user: Fix up timer id handling

2015-03-23 Thread riku . voipio
t_timer_id typedef that is s32, just like Linux has it. It also changes the magic offset to a value that makes all timer ids be positive. Reported-by: Tom Musta Signed-off-by: Alexander Graf Reviewed-by: Peter Maydell Reviewed-by: Tom Musta Tested-by: Tom Musta Signed-off-by: Riku Voipio ---

Re: [Qemu-devel] [PATCH] linux-user: fix broken cpu_copy()

2015-03-23 Thread Riku Voipio
On Monday, March 23, 2015 3:02:29 PM EET, Andreas Färber wrote: Am 23.03.2015 um 13:55 schrieb Leon Alrae: New threads always point at the same env which is incorrect and usually leads to a crash. Signed-off-by: Leon Alrae --- Hi, ... Clearly my fault and might explain some breakage in our

Re: [Qemu-devel] [PATCH] linux-user/syscall.c: Let all lock_user_struct() and unlock_user_struct() paired with each other

2015-01-28 Thread Riku Voipio
Hi, First of all, thanks Chen for taking time to improve the linux-user codebase in qemu! On Mon, Jan 26, 2015 at 03:01:52PM +, Peter Maydell wrote: > On 26 January 2015 at 14:59, Chen Gang S wrote: > > On 1/26/15 06:10, Peter Maydell wrote: > >> I would just like the commit message to be cl

[Qemu-devel] [PULL 07/11] linux-user: translate resource also for prlimit64

2015-01-27 Thread riku . voipio
From: Felix Janda The resource argument is translated from host to target for [gs]etprlimit but not for prlimit64. Fix this. Signed-off-by: Felix Janda Signed-off-by: Riku Voipio --- linux-user/syscall.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/linux-user

[Qemu-devel] [PULL 06/11] linux-user/signal.c: Remove unnecessary wrapper copy_siginfo_to_user

2015-01-27 Thread riku . voipio
configs. Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/signal.c | 28 +++- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/linux-user/signal.c b/linux-user/signal.c index fa955ef..8065710 100644 --- a/linux-user/signal.c +++ b

[Qemu-devel] [PULL 05/11] linux-user/main.c: Mark end_exclusive() as possibly unused

2015-01-27 Thread riku . voipio
From: Peter Maydell The function end_exclusive() isn't used on all targets; mark it as such to avoid a clang warning. Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-user/main.c b/

[Qemu-devel] [PULL 08/11] linux-user: Fix ioctl cmd type mismatch on 64-bit targets

2015-01-27 Thread riku . voipio
, causing the comparison to fail and resulting in lots of spurious "Unsupported ioctl" errors. Changing the target_cmd field in the ioctl_entries list to a signed int causes those values to be sign-extended as well during the comparison. Signed-off-by: Ed Swierk Signed-off-by: Riku Voipio

[Qemu-devel] [PULL 00/11] linux-user-updates

2015-01-27 Thread riku . voipio
From: Riku Voipio The following changes since commit b00c92e3ef59b78f6029d66353aaf995ceaa6605: Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging (2015-01-27 13:17:30 +) are available in the git repository at: git://git.linaro.org/people/riku.voipi

[Qemu-devel] [PULL 04/11] linux-user/main.c: Call cpu_exec_start/end on all target archs

2015-01-27 Thread riku . voipio
ned-off-by: Riku Voipio --- linux-user/main.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/linux-user/main.c b/linux-user/main.c index 8c70be4..95e8a51 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -283,7 +283,9 @@ void cpu_loop(CPUX86State *env) target_sigi

[Qemu-devel] [PULL 10/11] linux-user: Fix broken m68k signal handling on 64 bit hosts

2015-01-27 Thread riku . voipio
e intended retaddr+0,retaddr+2, resulting in a guest crash when it tried to execute the invalid zero-bytes at retaddr+0. Fix by using uint32_t instead; also use uint16_t rather than short for consistency. This fixes bug LP:1404690. Reported-by: Michel Boaventura Signed-off-by: Peter Maydell Signed-of

[Qemu-devel] [PULL 01/11] linux-user/signal.c: Remove current_exec_domain_sig()

2015-01-27 Thread riku . voipio
mains will be better served by adding the correct code from scratch based on the kernel sources at that time. This change also fixes some clang warnings about the function being defined but not used for some target architectures. Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio --- linu

[Qemu-devel] [PULL 09/11] mips64-linux-user: Fix definition of struct sigaltstack

2015-01-27 Thread riku . voipio
From: Ed Swierk Without this fix, qemu segfaults when emulating the sigaltstack syscall, because it incorrectly treats the ss_flags field as 64 bits rather than 32 bits. Signed-off-by: Ed Swierk Signed-off-by: Riku Voipio --- linux-user/mips64/target_signal.h | 2 +- 1 file changed, 1

[Qemu-devel] [PULL 02/11] linux-user/alpha: Add define for NR_shmat to enable shmat syscall

2015-01-27 Thread riku . voipio
chard Henderson Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/alpha/syscall_nr.h | 4 1 file changed, 4 insertions(+) diff --git a/linux-user/alpha/syscall_nr.h b/linux-user/alpha/syscall_nr.h index 625f301..dde8d5c 100644 --- a/linux-user/alpha/syscall_nr.h +++ b/l

[Qemu-devel] [PULL 11/11] linux-user: support target-to-host SCM_CREDENTIALS

2015-01-27 Thread riku . voipio
From: Alex Suykov When passing ancillary data through a unix socket, handle credentials properly instead of doing a simple copy and issuing a warning. Signed-off-by: Alex Suykov Signed-off-by: Riku Voipio --- linux-user/syscall.c | 18 ++ 1 file changed, 14 insertions(+), 4

[Qemu-devel] [PULL 03/11] linux-user/arm/nwfpe: Delete unused aCC array

2015-01-27 Thread riku . voipio
From: Peter Maydell The aCC array in fpopcode.c is completely unused in QEMU; delete it (silencing a clang warning). Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/arm/nwfpe/fpopcode.c | 22 -- 1 file changed, 22 deletions(-) diff --git a/linux

Re: [Qemu-devel] [PATCH 0/6] linux-user: Fix various clang warnings

2015-01-21 Thread Riku Voipio
Hi, On Tue, Jan 20, 2015 at 02:54:20PM +, Peter Maydell wrote: > Ping! I've just updated my linux-user-for-upstream tree. I'll get it reviewed/tested tonight. > thanks > -- PMM > > On 8 January 2015 at 12:19, Peter Maydell wrote: > > This patchset fixes warnings produced by clang in the li

[Qemu-devel] [PULL 2/2] linux-user: Fix up timer id handling

2014-11-10 Thread riku . voipio
t_timer_id typedef that is s32, just like Linux has it. It also changes the magic offset to a value that makes all timer ids be positive. Reported-by: Tom Musta Signed-off-by: Alexander Graf Reviewed-by: Peter Maydell Reviewed-by: Tom Musta Tested-by: Tom Musta Signed-off-by: Riku Voipio ---

[Qemu-devel] [PULL 0/2] linux-user fixes after -rc0

2014-11-10 Thread riku . voipio
From: Riku Voipio The following changes since commit 558c2c8ddfb165a36eb95dc93125c04829d68aa7: Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging (2014-11-10 16:28:51 +) are available in the git repository at: git://git.linaro.org/people/riku.voipi

[Qemu-devel] [PULL 1/2] linux-user: Do not subtract offset from end address

2014-11-10 Thread riku . voipio
From: Tom Musta When computing the upper address of a program segment, do not subtract the offset from the virtual address; instead compute the sum of the virtual address and the memory size. Signed-off-by: Tom Musta Signed-off-by: Riku Voipio --- linux-user/elfload.c | 2 +- 1 file changed

Re: [Qemu-devel] [PATCH] linux-user: Do not subtract offset from end address

2014-11-06 Thread Riku Voipio
On Thu, Nov 06, 2014 at 01:43:13PM -0600, Tom Musta wrote: > When computing the upper address of a program segment, do not subtract the > offset from the virtual address; instead compute the sum of the virtual > address > and the memory size. Thanks, I'll test this and try to get it applied ASAP.

[Qemu-devel] [PULL 1/3] linux-user: Let user specify random seed

2014-11-03 Thread riku . voipio
From: Magnus Reftel This patch introduces the -seed command line option and the QEMU_RAND_SEED environment variable for setting the random seed, which is used for the AT_RANDOM ELF aux entry. Signed-off-by: Magnus Reftel Reviewed-by: Eric Blake Signed-off-by: Riku Voipio --- linux-user

[Qemu-devel] [PULL 2/3] linux-user: Fix fault address truncation AArch64

2014-11-03 Thread riku . voipio
From: Riku Voipio On AArch64 the si_addr field of siginfo_t is truncated to 32 bits because the fault address passes through an uint32_t variable. Follow Peters suggestion and drop the uint32_t variable since its only used once in the Aarch64 loop. Reported-by: Amanieu d'Antras Review

[Qemu-devel] [PULL 0/3] linux-user changes for 2.2

2014-11-03 Thread riku . voipio
From: Riku Voipio The following changes since commit 0a2923f8488498000eec54871456aa64a4391da4: tcg/mips: fix store softmmu slow path (2014-11-02 13:30:00 +0100) are available in the git repository at: git://git.linaro.org/people/riku.voipio/qemu.git tags/pull-linux-user-20141101 for you

[Qemu-devel] [PULL 3/3] elf: take phdr offset into account when calculating the program load address

2014-11-03 Thread riku . voipio
From: Jonas Maebe The first program header does not necessarily start at offset 0. This change corresponds to what the Linux kernel does in load_elf_binary(). Signed-off-by: Jonas Maebe Signed-off-by: Riku Voipio --- linux-user/elfload.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[Qemu-devel] [PATCH] linux-user: Fix fault address truncation AArch64

2014-10-23 Thread riku . voipio
From: Riku Voipio On AArch64 the si_addr field of siginfo_t is truncated to 32 bits because the fault address passes through an uint32_t variable. This is fixed by changing the variable to uint64_t. v2 by Riku - follow Peters suggestion and drop the addr variable since its only used once in the

Re: [Qemu-devel] [PATCH v5] linux-user: Let user specify random seed

2014-10-23 Thread Riku Voipio
On Wed, Oct 22, 2014 at 03:17:33PM +0200, Magnus Reftel wrote: > On Tue, Oct 14, 2014 at 5:18 PM, Magnus Reftel wrote: > > linux-user uses the rand function for generating the value of the AT_RANDOM > > elf > > aux vector entry, and explicitly seeds the random number generator with the > > curren

[Qemu-devel] [PULL v2 4/5] linux-user: don't include timerfd if not needed

2014-10-06 Thread riku . voipio
From: Riku Voipio Without this, builds on older systems fail with: qemu/linux-user/syscall.c:61:25: warning: sys/timerfd.h: No such file or directory v2: fix the usual case where CONFIG_TIMERFD is enabled.. Signed-off-by: Riku Voipio --- linux-user/syscall.c | 4 +++- 1 file changed, 3

[Qemu-devel] [PULL v2 0/5] linux-user patches for 2.2

2014-10-06 Thread riku . voipio
From: Riku Voipio The following changes since commit 2472b6c07bb50179019589af1c22f43935ab7f5c: gdbstub: Allow target CPUs to specify watchpoint STOP_BEFORE_ACCESS flag (2014-10-06 14:25:43 +0100) are available in the git repository at: git://git.linaro.org/people/riku.voipio/qemu.git

[Qemu-devel] [PULL v2 5/5] translate-all.c: memory walker initial address miscalculation

2014-10-06 Thread riku . voipio
mpile. The issue led to incorrect debug output of memory maps and a mis-formed coredumped file. Signed-off-by: Mikhail Ilyin Signed-off-by: Riku Voipio --- include/exec/cpu-all.h | 4 ++-- linux-user/elfload.c | 18 +- translate-all.c| 33

[Qemu-devel] [PULL v2 1/5] linux-user: Enable epoll_pwait syscall for ARM

2014-10-06 Thread riku . voipio
From: Peter Maydell We have support for the epoll_pwait syscall, but it wasn't enabled for ARM guests because we hadn't defined the syscall number; correct this deficiency. Reported-by: Dave Flogeras Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/arm/syscal

[Qemu-devel] [PULL v2 3/5] linux-user: Simplify timerid checks on g_posix_timers range

2014-10-06 Thread riku . voipio
masked it. We can safely remove the masking. For the negativity check we can just treat the timerid as unsigned and only check for upper boundaries. Signed-off-by: Alexander Graf Signed-off-by: Riku Voipio --- linux-user/syscall.c | 30 +- 1 file changed, 17 inserti

[Qemu-devel] [PULL v2 2/5] linux-user: Convert blkpg to use a special subop handler

2014-10-06 Thread riku . voipio
From: Alexander Graf The blkpg ioctl can take different payloads depending on the opcode in its payload structure. Create a new special ioctl handler that can only deal with partition style ones for now. This patch fixes running parted for me. Signed-off-by: Alexander Graf Signed-off-by: Riku

Re: [Qemu-devel] [PULL 0/5] linux-user patches for 2.2

2014-10-06 Thread Riku Voipio
On Mon, Oct 06, 2014 at 05:49:14PM +0100, Peter Maydell wrote: > On 6 October 2014 15:59, Peter Maydell wrote: > > Hi. I'm afraid this doesn't compile on my ARM box: > > > > /root/qemu/linux-user/syscall.c: In function ‘do_syscall’: > > /root/qemu/linux-user/syscall.c:9695:9: error: implicit decla

[Qemu-devel] [PULL 1/5] linux-user: Enable epoll_pwait syscall for ARM

2014-10-06 Thread riku . voipio
From: Peter Maydell We have support for the epoll_pwait syscall, but it wasn't enabled for ARM guests because we hadn't defined the syscall number; correct this deficiency. Reported-by: Dave Flogeras Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/arm/syscal

[Qemu-devel] [PULL 2/5] linux-user: Convert blkpg to use a special subop handler

2014-10-06 Thread riku . voipio
From: Alexander Graf The blkpg ioctl can take different payloads depending on the opcode in its payload structure. Create a new special ioctl handler that can only deal with partition style ones for now. This patch fixes running parted for me. Signed-off-by: Alexander Graf Signed-off-by: Riku

[Qemu-devel] [PULL 0/5] linux-user patches for 2.2

2014-10-06 Thread riku . voipio
From: Riku Voipio The following changes since commit 1831e150606a221898bf46ffaf0453e9952cbbc4: Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging (2014-09-30 16:45:35 +0100) are available in the git repository at: git://git.linaro.org/people/r

[Qemu-devel] [PULL 4/5] linux-user: don't include timerfd if not needed

2014-10-06 Thread riku . voipio
From: Riku Voipio Without this, builds on older systems fail with: qemu/linux-user/syscall.c:61:25: warning: sys/timerfd.h: No such file or directory Signed-off-by: Riku Voipio --- linux-user/syscall.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/linux-user/syscall.c b/linux-user

[Qemu-devel] [PULL 5/5] translate-all.c: memory walker initial address miscalculation

2014-10-06 Thread riku . voipio
mpile. The issue led to incorrect debug output of memory maps and a mis-formed coredumped file. Signed-off-by: Mikhail Ilyin Signed-off-by: Riku Voipio --- include/exec/cpu-all.h | 4 ++-- linux-user/elfload.c | 18 +- translate-all.c| 33

[Qemu-devel] [PULL 3/5] linux-user: Simplify timerid checks on g_posix_timers range

2014-10-06 Thread riku . voipio
masked it. We can safely remove the masking. For the negativity check we can just treat the timerid as unsigned and only check for upper boundaries. Signed-off-by: Alexander Graf Signed-off-by: Riku Voipio --- linux-user/syscall.c | 30 +- 1 file changed, 17 inserti

Re: [Qemu-devel] [PATCH] translate-all.c: memory walker initial address miscalculation

2014-10-01 Thread Riku Voipio
Hi, Applied to linux-user tree, I'll send a pull req after a bit of testing. Riku On Tue, Sep 30, 2014 at 05:58:43PM +0400, Mikhail Ilin wrote: > ping > > http://patchwork.ozlabs.org/patch/386918/ > > On 22.09.2014 13:04, Mikhail Ilin wrote: > >ping > > > >http://patchwork.ozlabs.org/patch/386

Re: [Qemu-devel] linux-user: enabling binfmt P flag

2014-09-01 Thread Riku Voipio
On Mon, Sep 01, 2014 at 10:12:18AM +0100, Peter Maydell wrote: > On 1 September 2014 09:51, Paolo Bonzini wrote: > > Il 29/08/2014 20:01, Peter Maydell ha scritto: > >> [cc'ing MJT for more distro opinion since I think fundamentally > >> the choice we ought to make upstream is "what's not going to

Re: [Qemu-devel] [12/16] linux-user: support {name_to, open_by}_handle_at syscalls

2014-08-28 Thread Riku Voipio
Hi, On Tue, Aug 26, 2014 at 03:21:30PM +0100, Paul Burton wrote: > On Tue, Aug 26, 2014 at 03:30:41PM +0300, Riku Voipio wrote: > > On Sun, Jun 15, 2014 at 05:18:29PM +0100, Paul Burton wrote: > > > Implement support for the name_to_handle_at and open_by_handle_at > > &g

Re: [Qemu-devel] [12/16] linux-user: support {name_to, open_by}_handle_at syscalls

2014-08-26 Thread Riku Voipio
Hi Paul, On Sun, Jun 15, 2014 at 05:18:29PM +0100, Paul Burton wrote: > Implement support for the name_to_handle_at and open_by_handle_at > syscalls, allowing their use by the target program. What was your testcase for these syscalls? I usually use LTP for testing syscalls, but there is no testc

Re: [Qemu-devel] linux-user: enabling binfmt P flag

2014-08-25 Thread Riku Voipio
On Mon, Aug 25, 2014 at 04:30:40PM +0200, Joakim Tjernlund wrote: > Riku Voipio wrote on 2014/08/25 15:55:55: > > > > Hi, > > > > On Mon, Aug 25, 2014 at 03:39:19PM +0200, Joakim Tjernlund wrote: > > > Then consider when you run a LXC without P flag. > &

Re: [Qemu-devel] linux-user: enabling binfmt P flag

2014-08-25 Thread Riku Voipio
Hi, On Mon, Aug 25, 2014 at 03:39:19PM +0200, Joakim Tjernlund wrote: > Then consider when you run a LXC without P flag. Please remember that your usecase of running Qemu in LXC is a new feature, never before supported. Adding new features is always nice. However, it must not happen with expense

Re: [Qemu-devel] linux-user: enabling binfmt P flag

2014-08-25 Thread Riku Voipio
On Mon, Aug 25, 2014 at 02:46:21PM +0200, Alexander Graf wrote: > > > On 25.08.14 14:42, Riku Voipio wrote: > > On Mon, Aug 25, 2014 at 11:14:58AM +0200, Alexander Graf wrote: > >> > >> > >> On 25.08.14 11:09, Riku Voipio wrote: > >>> Hi, &g

Re: [Qemu-devel] linux-user: enabling binfmt P flag

2014-08-25 Thread Riku Voipio
On Mon, Aug 25, 2014 at 11:14:58AM +0200, Alexander Graf wrote: > > > On 25.08.14 11:09, Riku Voipio wrote: > > Hi, > > > > After weekend, I think the solution to using the P flag is to > > go back to Joakim's original patch: > > > > ht

[Qemu-devel] linux-user: enabling binfmt P flag

2014-08-25 Thread Riku Voipio
Hi, After weekend, I think the solution to using the P flag is to go back to Joakim's original patch: http://lists.gnu.org/archive/html/qemu-devel/2014-07/msg02269.html With this, we get: If you continue to use qemu-x-static in your binfmt_misc registration, nothing changes - both old and new q

[Qemu-devel] [PULL v3 17/22] linux-user: Move get_ppc64_abi

2014-08-22 Thread riku . voipio
Musta Signed-off-by: Riku Voipio --- linux-user/elfload.c| 9 - linux-user/ppc/target_cpu.h | 10 ++ 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/linux-user/elfload.c b/linux-user/elfload.c index 60777fe..bea803b 100644 --- a/linux-user/elfload.c +++ b

[Qemu-devel] [PULL v3 14/22] linux-user: Detect Negative Message Sizes in msgsnd System Call

2014-08-22 Thread riku . voipio
From: Tom Musta The msgsnd system call takes an argument that describes the message size (msgsz) and is of type size_t. The system call should set errno to EINVAL in the event that a negative message size is passed. Signed-off-by: Tom Musta Reviewed-by: Peter Maydell Signed-off-by: Riku

[Qemu-devel] [PULL v3 22/22] linux-user: check return value of malloc()

2014-08-22 Thread riku . voipio
From: zhanghailiang Signed-off-by: zhanghailiang Acked-by: Riku Voipio Signed-off-by: Riku Voipio --- linux-user/syscall.c | 4 1 file changed, 4 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index ebdc70e..7ff7c21 100644 --- a/linux-user/syscall.c +++ b/linux

[Qemu-devel] [PULL v3 11/22] linux-user: Properly Handle semun Structure In Cross-Endian Situations

2014-08-22 Thread riku . voipio
: Tom Musta Signed-off-by: Riku Voipio --- linux-user/syscall.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 08fdd94..39ab4c7 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -2652,9 +2652,18

[Qemu-devel] [PULL v3 15/22] linux-user: Handle NULL sched_param argument to sched_*

2014-08-22 Thread riku . voipio
From: Tom Musta The sched_getparam, sched_setparam and sched_setscheduler system calls take a pointer argument to a sched_param structure. When this pointer is null, errno should be set to EINVAL. Signed-off-by: Tom Musta Signed-off-by: Riku Voipio --- linux-user/syscall.c | 10

[Qemu-devel] [PULL v3 20/22] linux-user: Support target-to-host translation of mlockall argument

2014-08-22 Thread riku . voipio
Intel platforms (0x1 and 0x2, respectively) Signed-off-by: Tom Musta Signed-off-by: Riku Voipio --- linux-user/aarch64/syscall.h| 2 ++ linux-user/alpha/syscall.h | 2 ++ linux-user/arm/syscall.h| 2 ++ linux-user/cris/syscall.h | 2 ++ linux-user/i386/syscall.h | 2

[Qemu-devel] [PULL v3 12/22] linux-user: Make ipc syscall's third argument an abi_long

2014-08-22 Thread riku . voipio
declared as abit_long. In fact, it makes more sense for all of the arguments to be declaried as abi_long (except call). Signed-off-by: Tom Musta Signed-off-by: Riku Voipio --- linux-user/syscall.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/linux-user/syscall.c b

[Qemu-devel] [PULL v3 13/22] linux-user: Conditionally Pass Attribute Pointer to mq_open()

2014-08-22 Thread riku . voipio
the code to properly handle the case when NULL is passed in the arg4 position. Signed-off-by: Tom Musta Reviewed-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/syscall.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/linux-user/syscall.c b/linux-user

[Qemu-devel] [PULL v3 21/22] linux-user: writev Partial Writes

2014-08-22 Thread riku . voipio
. Signed-off-by: Tom Musta Reviewed-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/syscall.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 1da216e..ebdc70e 100644 --- a/linux-user/syscall.c

[Qemu-devel] [PULL v3 04/22] linux-user: Fix conversion of sigevent argument to timer_create

2014-08-22 Thread riku . voipio
rious other structs. This allows the test program in bug LP:1042388 to run. Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/syscall.c | 38 ++ 1 file changed, 30 insertions(+), 8 deletions(-) diff --git a/linux-user/syscall.c b/linux

[Qemu-devel] [PULL v3 19/22] linux-user: clock_nanosleep errno Handling on PPC

2014-08-22 Thread riku . voipio
generic handling to do this for syscalls with standard return values. Add special case code for clock_nanosleep to handle CR0 properly. Signed-off-by: Tom Musta Reviewed-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/syscall.c | 8 1 file changed, 8 insertions(+) diff --git a

[Qemu-devel] [PULL v3 16/22] linux-user: Detect fault in sched_rr_get_interval

2014-08-22 Thread riku . voipio
From: Tom Musta Properly detect a fault when attempting to store into an invalid struct timespec pointer. Signed-off-by: Tom Musta Reviewed-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/syscall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-user

[Qemu-devel] [PULL v3 10/22] linux-user: Dereference Pointer Argument to ipc/semctl Sys Call

2014-08-22 Thread riku . voipio
-by: Riku Voipio --- linux-user/syscall.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index fba7fd2..08fdd94 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -3140,9 +3140,15 @@ static abi_long do_ipc

[Qemu-devel] [PULL v3 09/22] linux-user: PPC64 semid_ds Doesnt Include _unused1 and _unused2

2014-08-22 Thread riku . voipio
From: Tom Musta The 64 bit PowerPC platforms eliminate the _unused1 and _unused2 elements of the semid_ds structure from . So eliminate these from the target_semid_ds structure. Signed-off-by: Tom Musta Signed-off-by: Riku Voipio --- linux-user/syscall.c | 4 1 file changed, 4

[Qemu-devel] [PULL v3 06/22] linux-user: support timerfd_{create, gettime, settime} syscalls

2014-08-22 Thread riku . voipio
From: Riku Voipio Adds support for the timerfd_create, timerfd_gettime & timerfd_settime syscalls, allowing use of timerfds by target programs. v2: By Riku - added configure check for timerfd and ifdefs for benefit of old distributions like RHEL5. Signed-off-by: Paul Burton Signed-of

[Qemu-devel] [PULL v3 18/22] linux-user: Minimum Sig Handler Stack Size for PPC64 ELF V2

2014-08-22 Thread riku . voipio
From: Tom Musta The ELF V2 ABI for PPC64 defines MINSIGSTKSZ as 4096 bytes whereas it was 2048 previously. Signed-off-by: Tom Musta Signed-off-by: Riku Voipio --- linux-user/aarch64/syscall.h| 1 + linux-user/alpha/syscall.h | 1 + linux-user/arm/syscall.h| 2 ++ linux

[Qemu-devel] [PULL v3 08/22] linux-user: add setns and unshare

2014-08-22 Thread riku . voipio
From: Riku Voipio Add support for the setns and unshare syscalls, trivially passed through to the host. Based on patches by Paul Burton, added configure check. Signed-off-by: Paul Burton Signed-off-by: Riku Voipio --- configure | 20 linux-user/strace.list

[Qemu-devel] [PULL v3 05/22] linux-user: fix readlink handling with magic exe symlink

2014-08-22 Thread riku . voipio
uot;, buf, len, ret); } return 0; } Now compare the output of the native: $ gcc test.c -o /tmp/x $ /tmp/x $ strace /tmp/x With what qemu does: $ armv7a-cros-linux-gnueabi-gcc test.c -o /tmp/x -static $ qemu-arm /tmp/x $ qemu-arm -strace /tmp/x Signed-off-by: Mike Frysinger Signed-off

[Qemu-devel] [PULL v3 02/22] linux-user: redirect openat calls

2014-08-22 Thread riku . voipio
From: Riku Voipio While Mikhail fixed /proc/self/maps, it was noticed openat calls are not redirected currently. Some archs don't have open at all, so openat needs to be redirected. Fix this by consolidating open/openat code to do_openat - open is implemented using openat(AT_FDCWD, ... ),

[Qemu-devel] [PULL v3 01/22] linux-user: /proc/self/maps content

2014-08-22 Thread riku . voipio
From: Mikhail Ilyin Build /proc/self/maps doing a match against guest memory translation table. Output only that map records which are valid for guest memory layout. Signed-off-by: Mikhail Ilyin Signed-off-by: Riku Voipio --- include/exec/cpu-all.h | 2 ++ linux-user/syscall.c | 25

[Qemu-devel] [PULL v3 03/22] linux-user: Fix syscall instruction usermode emulation on X86_64

2014-08-22 Thread riku . voipio
not expected. Sometimes it is tragic. User mode syscall insn emulation is not used MSR, so the action should be same to INT 0x80. INT 0x80 will update EIP in do_interrupt(), ditto for syscall() for consistency. Signed-off-by: Jincheng Miao Reviewed-by: Richard Henderson Signed-off-by: Riku Voi

[Qemu-devel] [PULL v3 07/22] linux-user: support ioprio_{get, set} syscalls

2014-08-22 Thread riku . voipio
From: Paul Burton Add support for the ioprio_get & ioprio_set syscalls, allowing their use by target programs. Signed-off-by: Paul Burton Signed-off-by: Riku Voipio --- linux-user/syscall.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/linux-user/syscall.c b/l

[Qemu-devel] [PULL v3 00/22] Linux-user updates

2014-08-22 Thread riku . voipio
From: Riku Voipio A usual set of improvements and bugfixes. New patches coming in and I didn't have time to fix and test properly _handle_at calls so dropping them too from the round. v1 -> v2: dropped "make binfmt flag O require P" has been dropped. v2 -> v3: dropped &quo

Re: [Qemu-devel] [PULL v2 00/23] linux-user updates

2014-08-19 Thread Riku Voipio
On 19 August 2014 14:59, Peter Maydell wrote: > Hi. I'm afraid this doesn't build on my ARM board: > > /root/qemu/linux-user/syscall.c: In function 'do_open_by_handle_at': > /root/qemu/linux-user/syscall.c:5475:16: error: 'p' may be used > uninitialized in this function [-Werror=uninitialized] >

[Qemu-devel] [PULL v2 19/23] linux-user: Minimum Sig Handler Stack Size for PPC64 ELF V2

2014-08-19 Thread riku . voipio
From: Tom Musta The ELF V2 ABI for PPC64 defines MINSIGSTKSZ as 4096 bytes whereas it was 2048 previously. Signed-off-by: Tom Musta Signed-off-by: Riku Voipio --- linux-user/aarch64/syscall.h| 1 + linux-user/alpha/syscall.h | 1 + linux-user/arm/syscall.h| 2 ++ linux

[Qemu-devel] [PULL v2 21/23] linux-user: Support target-to-host translation of mlockall argument

2014-08-19 Thread riku . voipio
Intel platforms (0x1 and 0x2, respectively) Signed-off-by: Tom Musta Signed-off-by: Riku Voipio --- linux-user/aarch64/syscall.h| 2 ++ linux-user/alpha/syscall.h | 2 ++ linux-user/arm/syscall.h| 2 ++ linux-user/cris/syscall.h | 2 ++ linux-user/i386/syscall.h | 2

<    1   2   3   4   5   6   7   8   9   10   >