[PATCH rc5 16/32] target/avr: Add instruction translation - CPU main translation function

2020-02-06 Thread Aleksandar Markovic
From: Michael Rolnik Add the core of translation mechanism. Co-developed-by: Richard Henderson Co-developed-by: Michael Rolnik Signed-off-by: Michael Rolnik Signed-off-by: Richard Henderson Signed-off-by: Aleksandar Markovic Tested-by: Philippe Mathieu-Daudé Reviewed-by: Aleksandar

[PATCH rc5 06/32] target/avr: CPU class: Add GDB support

2020-02-06 Thread Aleksandar Markovic
From: Michael Rolnik This includes GDB hooks for reading from wnd wrtiting to AVR registers, and xml register definition file as well. [AM: Split a larger AVR introduction patch into logical units] Suggested-by: Aleksandar Markovic Co-developed-by: Michael Rolnik Co-developed-by: Sarah Harris

[PATCH rc5 14/32] target/avr: Add instruction translation - Bit and Bit-test Instructions

2020-02-06 Thread Aleksandar Markovic
From: Michael Rolnik This includes: - LSR, ROR - ASR - SWAP - SBI, CBI - BST, BLD - BSET, BCLR Signed-off-by: Michael Rolnik Signed-off-by: Richard Henderson Signed-off-by: Aleksandar Markovic Tested-by: Philippe Mathieu-Daudé Reviewed-by: Aleksandar Markovic

[PATCH rc5 22/32] target/avr: Register AVR support with the rest of QEMU

2020-02-06 Thread Aleksandar Markovic
From: Michael Rolnik Add AVR related definitions into QEMU. [AM: Remove word 'Atmel' from filenames and all elements of code] Suggested-by: Aleksandar Markovic Signed-off-by: Michael Rolnik Signed-off-by: Richard Henderson Signed-off-by: Aleksandar Markovic Tested-by: Philippe Mat

[PATCH rc5 18/32] target/avr: Add support for disassembling via option '-d in_asm'

2020-02-06 Thread Aleksandar Markovic
0x04c0: OUT $2, r24 0x04c2: RET ... ``` Suggested-by: Richard Henderson Suggested-by: Philippe Mathieu-Daudé Suggested-by: Aleksandar Markovic Signed-off-by: Michael Rolnik [rth: Fix spacing and const mnemonic arrays] Signed-off-by: Richard Henderson Signed-off-by: Aleksandar

[PATCH rc5 27/32] tests/machine-none: Add AVR support

2020-02-06 Thread Aleksandar Markovic
From: Michael Rolnik Add a single code line that will automatically provide 'machine none' test. Signed-off-by: Michael Rolnik Signed-off-by: Richard Henderson Signed-off-by: Aleksandar Markovic Tested-by: Philippe Mathieu-Daudé Reviewed-by: Aleksandar Markovic Reviewed-by: T

[PATCH rc5 12/32] target/avr: Add instruction translation - Branch Instructions

2020-02-06 Thread Aleksandar Markovic
From: Michael Rolnik This includes: - RJMP, IJMP, EIJMP, JMP - RCALL, ICALL, EICALL, CALL - RET, RETI - CPSE, CP, CPC, CPI - SBRC, SBRS, SBIC, SBIS - BRBC, BRBS Signed-off-by: Michael Rolnik Signed-off-by: Richard Henderson Signed-off-by: Aleksandar Markovic Tested-by

[PATCH rc5 30/32] .travis.yml: Run the AVR acceptance tests

2020-02-06 Thread Aleksandar Markovic
| CANCEL 0 JOB TIME : 2.30 s Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson Signed-off-by: Aleksandar Markovic Reviewed-by: Aleksandar Markovic --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 6c0ec6c

[PATCH rc5 10/32] target/avr: Add instruction translation - Register definitions

2020-02-06 Thread Aleksandar Markovic
From: Michael Rolnik Start implementation of instructions by adding register definitions. Signed-off-by: Michael Rolnik Signed-off-by: Richard Henderson Signed-off-by: Aleksandar Markovic Tested-by: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Aleksandar Markovic

[PATCH rc5 21/32] hw/misc: avr: Add limited support for power reduction device

2020-02-06 Thread Aleksandar Markovic
ggested-by: Aleksandar Markovic Signed-off-by: Michael Rolnik Signed-off-by: Philippe Mathieu-Daudé [rth: Squash include fix and file rename from f4bug] Signed-off-by: Richard Henderson Signed-off-by: Aleksandar Markovic Reviewed-by: Alex Bennée --- include/hw/misc/avr_power.h | 46 +

[PATCH rc5 23/32] hw/avr: Add support for loading ELF/raw binaries

2020-02-06 Thread Aleksandar Markovic
From: Philippe Mathieu-Daudé Add avr_load_firmware() function to load firmware in ELF or raw binary format. [AM: Corrected the type of the variable containing e_flags] [AM: Moved definition of e_flags conversion function to boot.c] Suggested-by: Aleksandar Markovic Signed-off-by: Philippe

[PATCH rc5 31/32] target/avr: Simplify sections in MAINTAINERS file

2020-02-06 Thread Aleksandar Markovic
From: Michael Rolnik Simplify sections for AVR maintanenance in MAINTAINERS file. Signed-off-by: Michael Rolnik Signed-off-by: Philippe Mathieu-Daudé [rth: Squash ordering fixes from f4bug] Signed-off-by: Richard Henderson Signed-off-by: Aleksandar Markovic Reviewed-by: Aleksandar Markovic

[PATCH rc5 09/32] target/avr: Add instruction helpers

2020-02-06 Thread Aleksandar Markovic
the lack of peripherals to generate wake interrupts. Memory access instructions are implemented here because some address ranges actually refer to CPU registers. Signed-off-by: Michael Rolnik Signed-off-by: Richard Henderson Signed-off-by: Aleksandar Markovic Tested-by: Philippe Mathieu-Daudé

[PATCH rc5 11/32] target/avr: Add instruction translation - Arithmetic and Logic Instructions

2020-02-06 Thread Aleksandar Markovic
From: Michael Rolnik This includes: - ADD, ADC, ADIW - SBIW, SUB, SUBI, SBC, SBCI - AND, ANDI - OR, ORI, EOR - COM, NEG - INC, DEC - MUL, MULS, MULSU - FMUL, FMULS, FMULSU - DES Signed-off-by: Michael Rolnik Signed-off-by: Richard Henderson Signed-off-by: Aleksandar Markovic Tested-by

[PATCH rc5 28/32] tests/boot-serial: Test some Arduino boards (AVR based)

2020-02-06 Thread Aleksandar Markovic
Henderson Signed-off-by: Richard Henderson Signed-off-by: Aleksandar Markovic Acked-by: Thomas Huth Tested-by: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé --- tests/qtest/boot-serial-test.c | 11 +++ tests/qtest/Makefile.include | 2 ++ 2 files changed, 13 insertion

[PATCH rc5 32/32] target/avr: Add section into QEMU documentation

2020-02-06 Thread Aleksandar Markovic
From: Michael Rolnik The new section explains basic ways of using AVR target in QEMU. Signed-off-by: Michael Rolnik Signed-off-by: Richard Henderson [PMD: Fixed typos] Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Aleksandar Markovic Reviewed-by: Aleksandar Markovic --- qemu

[PATCH rc5 29/32] tests/acceptance: Test the Arduino MEGA2560 board

2020-02-06 Thread Aleksandar Markovic
ned-off-by: Philippe Mathieu-Daudé [rth: Squash multiple avocado fixups from f4bug] Signed-off-by: Richard Henderson Signed-off-by: Aleksandar Markovic Tested-by: Richard Henderson Tested-by: Philippe Mathieu-Daudé Acked-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé --- MAINTAINERS

[PATCH rc5 24/32] hw/avr: Add some ATmega microcontrollers

2020-02-06 Thread Aleksandar Markovic
[AM: Remove word 'Atmel' from filenames and all elements of code] Suggested-by: Aleksandar Markovic Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson Signed-off-by: Aleksandar Markovic --- hw/avr/atmega.h | 48 ++ hw/avr/atmega.c

[PATCH rc5 26/32] target/avr: Update build system

2020-02-06 Thread Aleksandar Markovic
From: Michael Rolnik Make AVR support buildable. [AM: Remove word 'Atmel' from filenames and all elements of code] Suggested-by: Aleksandar Markovic Signed-off-by: Michael Rolnik Signed-off-by: Richard Henderson Signed-off-by: Aleksandar Markovic Tested-by: Philippe Mathieu-Daudé

[PATCH rc5 13/32] target/avr: Add instruction translation - Data Transfer Instructions

2020-02-06 Thread Aleksandar Markovic
: Richard Henderson Signed-off-by: Aleksandar Markovic Tested-by: Philippe Mathieu-Daudé Reviewed-by: Aleksandar Markovic --- target/avr/insn.decode | 56 +++ target/avr/translate.c | 992 + 2 files changed, 1048 insertions(+) diff --git a/target/avr

[PATCH rc5 19/32] hw/char: avr: Add limited support for USART peripheral

2020-02-06 Thread Aleksandar Markovic
: Remove word 'Atmel' from filenames and all elements of code] Suggested-by: Aleksandar Markovic Signed-off-by: Michael Rolnik Signed-off-by: Sarah Harris Signed-off-by: Philippe Mathieu-Daudé [rth: Squash I/O size fix and file rename from f4bug] Signed-off-by: Richard Henderson Sig

[PATCH rc5 20/32] hw/timer: avr: Add limited support for 16-bit timer peripheral

2020-02-06 Thread Aleksandar Markovic
: Remove word 'Atmel' from filenames and all elements of code] Suggested-by: Aleksandar Markovic Signed-off-by: Sarah Harris Signed-off-by: Ed Robbins Signed-off-by: Philippe Mathieu-Daudé [rth: Squash info mtree fixes and a file rename from f4bug] Signed-off-by: Richard Henderson

[PATCH rc5 25/32] hw/avr: Add limited support for some Arduino boards

2020-02-06 Thread Aleksandar Markovic
'Atmel' from filenames and all elements of code] Suggested-by: Aleksandar Markovic Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson Signed-off-by: Aleksandar Markovic Reviewed-by: Igor Mammedov Reviewed-by: Joaquin de Andres --- hw/avr/arduino.c

Re: [PATCH] !fixup "target/avr: Add defintions of AVR core types"

2020-02-07 Thread Aleksandar Markovic
On Friday, February 7, 2020, Philippe Mathieu-Daudé wrote: > These cores have unresolved review comment: > https://www.mail-archive.com/qemu-devel@nongnu.org/msg674105.html > https://www.mail-archive.com/qemu-devel@nongnu.org/msg674259.html > and: > https://www.mail-archive.com/qemu-devel@nongnu.

Re: [PATCH rc4 06/29] target/avr: Add defintions of AVR core types

2020-02-07 Thread Aleksandar Markovic
On Sunday, February 2, 2020, Joaquin de Andres wrote: > On 1/31/20 1:02 AM, Aleksandar Markovic wrote: > >> From: Michael Rolnik >> >> AVR core types are: >> >>- avr1 >>- avr2 >>- avr25 >>- avr3 >>- avr31 >&g

Re: [PATCH] !fixup "target/avr: Add defintions of AVR core types"

2020-02-08 Thread Aleksandar Markovic
On Sat, Feb 8, 2020 at 3:06 PM Philippe Mathieu-Daudé wrote: > > Hi Aleksandar, > > On 2/8/20 8:10 AM, Aleksandar Markovic wrote: > > On Friday, February 7, 2020, Philippe Mathieu-Daudé > <mailto:phi...@redhat.com>> wrote: > > > > These cores hav

Re: [PATCH 00/29] Convert QAPI doc comments to generate rST instead of texinfo

2020-02-09 Thread Aleksandar Markovic
On Thursday, February 6, 2020, Peter Maydell wrote: > > > This series switches all our QAPI doc > > > comments over from > > texinfo format to rST. > > Regardeless of the outcome of the discussions over this series, I just want to say that I support it as a potential user of the document (there i

[Qemu-devel] [PATCH 1/3] linux-user: Add support for adjtimex() syscall

2016-08-29 Thread Aleksandar Markovic
From: Aleksandar Markovic This patch implements Qemu user mode adjtimex() syscall support. Syscall adjtimex() reads and optionally sets parameters for a clock adjustment algorithm used in network synchonization or similar scenarios. The implementation is based on invocation of host's adj

[Qemu-devel] [PATCH 3/3] linux-user: Add support for ustat() syscall

2016-08-29 Thread Aleksandar Markovic
From: Aleksandar Markovic This patch implements Qemu user mode ustat() syscall support. Syscall ustat() returns information about a mounted filesystem. The implementation is similar to the implementations of statfs(), fstatfs() and other related syscalls. It is based on invocation of host&#

[Qemu-devel] [PATCH 2/3] linux-user: Add support for sysfs() syscall

2016-08-29 Thread Aleksandar Markovic
From: Aleksandar Markovic This patch implements Qemu user mode sysfs() syscall support. Syscall sysfs() involves returning information about the filesystem types currently present in the kernel, and can operate in three distinct flavors, depending on its first argument. The implementation is

[Qemu-devel] [PATCH 0/3] linux-user: Add support for adjtimex(), sysfs(), and ustat() syscalls

2016-08-29 Thread Aleksandar Markovic
From: Aleksandar Markovic This patch series adds support for three syscalls to the Qemu user mode. Each patch fixes certain LTP test failures that occur if LTP tests are executed in Qemu user mode. This improvement will be in effect for all platforms supported by Qemu. Altogether, there are 10

[Qemu-devel] [PATCH 0/3] linux-user: Fix miscelaneous Mips-specific issues

2016-08-29 Thread Aleksandar Markovic
From: Aleksandar Markovic This series fixes several wrong definitions of preprocessor constants and structures in Qemu user mode. All patches are completely isolated Mips issues. The serias fixes certain number of LTP test failures, if executed in Qemu user mode for Mips platform. Aleksandar

[Qemu-devel] [PATCH 1/3] linux-user: Fix preprocessor constant TARGET_F_GETOWN for Mips

2016-08-29 Thread Aleksandar Markovic
From: Aleksandar Markovic For some reason, Qemu's TARGET_F_GETOWN constant for Mips does not match the correct value of correspondant F_GETOWN. This patch fixes this problem. For reference, see Mips' F_GETOWN definition in Linux kernel at arch/mips/include/uapi/asm/fcntl.h#L44. This

[Qemu-devel] [PATCH 3/3] linux-user: Fix structure target_semid64_ds definition for Mips

2016-08-29 Thread Aleksandar Markovic
From: Aleksandar Markovic This patch corrects target_semid64_ds structure definition for Mips. See, for example definition of semid64_ds for Mips in Linux kernel: arch/mips/include/uapi/asm/sembuf.h#L13. This patch will also fix certain semaphore-related LTP tests for Mips, if they are

[Qemu-devel] [PATCH 2/3] linux-user: Fix structure target_flock definition for Mips

2016-08-29 Thread Aleksandar Markovic
From: Aleksandar Markovic Structure flock is defined for Mips in a way defferent than any other platform. For reference, see Linux kernel files: arch/mips/include/uapi/asm/fcntl.h#L63 (for Mips) include/uapi/asm-generic/fcntl.h#L195 (for all other platforms) This patch fix this problem, by

Re: [Qemu-devel] ?==?utf-8?q? ?==?utf-8?q? [PATCH 3/3]?==?utf-8?q? linux-user: Fix structure target_semid64_ds definition for Mips

2016-08-30 Thread Aleksandar Markovic
Original Message Subject: Re: [Qemu-devel] [PATCH 3/3] linux-user: Fix structure target_semid64_ds definition for Mips Date: Monday, August 29, 2016 23:41 CEST From: Peter Maydell To: Aleksandar Markovic CC: Riku Voipio , QEMU Developers , Petar Jovanovic , Aleksandar

[Qemu-devel] [PATCH 3/4] linux-user: Fix structure target_flock definition for Mips

2016-09-01 Thread Aleksandar Markovic
From: Aleksandar Markovic Structure flock is defined for Mips in a way different from any other platform. For reference, see Linux kernel source code files: arch/mips/include/uapi/asm/fcntl.h#L63 (for Mips) include/uapi/asm-generic/fcntl.h#L195 (for all other platforms) This patch fix this

[Qemu-devel] [PATCH 1/4] linux-user: Fix TARGET_SIOCATMARK definition for Mips

2016-09-01 Thread Aleksandar Markovic
From: Aleksandar Markovic This patch fixes wrong definition of TARGET_SIOCATMARK for Mips. The current definition is: #define SIOCATMARK 0x8905 while the correct definition is: #define SIOCATMARK TARGET_IOR('s', 7, int) See Linux kernel source file arch/mips/includ

[Qemu-devel] [PATCH 0/3] linux-user: Fix miscellaneous Mips-specific issues

2016-09-01 Thread Aleksandar Markovic
From: Aleksandar Markovic v1 -> v2: - Improved a comment in the patch about target_semid64_ds. - Added a patch that fixes TARGET_SIOCATMARK for Mips. This series fixes several wrong definitions of preprocessor constants and structures in Qemu user mode. It also fixes certain number of

[Qemu-devel] [PATCH 4/4] linux-user: Fix structure target_semid64_ds definition for Mips

2016-09-01 Thread Aleksandar Markovic
From: Aleksandar Markovic This patch corrects target_semid64_ds structure definition for Mips. See, for example definition of semid64_ds for Mips in Linux kernel: arch/mips/include/uapi/asm/sembuf.h#L13. This patch will also fix certain semaphore-related LTP tests for Mips, if they are

[Qemu-devel] [PATCH 2/4] linux-user: Fix TARGET_F_GETOWN definition for Mips

2016-09-01 Thread Aleksandar Markovic
From: Aleksandar Markovic For some reason, Qemu's TARGET_F_GETOWN constant for Mips does not match the correct value of correspondant F_GETOWN. This patch fixes this problem. For reference, see Mips' F_GETOWN definition in Linux kernel at arch/mips/include/uapi/asm/fcntl.h#L44. This

[Qemu-devel] [PATCH v2 0/3] linux-user: Add support for adjtimex(), sysfs(), and ustat() syscalls

2016-09-05 Thread Aleksandar Markovic
From: Aleksandar Markovic v1->v2: - added "#ifdef TARGET_NR_adjtimex" where appropriate in patch 1/3. This patch series adds support for three syscalls to the Qemu user mode. Each patch fixes certain LTP test failures that occur if LTP tests are executed in Qemu user mode. Thi

[Qemu-devel] [PATCH v4 0/5] linux-user: Fix miscellaneous Mips-specific issues

2016-09-05 Thread Aleksandar Markovic
From: Aleksandar Markovic v3->v4: - Added a patch on agrument rearangement. v2 -> v3: - Minor fixes in the commit messages. v1 -> v2: - Improved a comment in the patch about target_semid64_ds (now 4/4). - Added a patch that fixes TARGET_SIOCATMARK for Mips. - Changed

[Qemu-devel] [PATCH v4 1/5] linux-user: Fix TARGET_SIOCATMARK definition for Mips

2016-09-05 Thread Aleksandar Markovic
From: Aleksandar Markovic This patch fixes wrong definition of TARGET_SIOCATMARK for Mips. The current definition is: #define SIOCATMARK 0x8905 while the correct definition is: #define SIOCATMARK TARGET_IOR('s', 7, int) See Linux kernel source file arch/mips/includ

[Qemu-devel] [PATCH v4 4/5] linux-user: Fix structure target_semid64_ds definition for Mips

2016-09-05 Thread Aleksandar Markovic
From: Aleksandar Markovic This patch corrects target_semid64_ds structure definition for Mips. See, for example definition of semid64_ds for Mips in Linux kernel: arch/mips/include/uapi/asm/sembuf.h#L13. This patch will also fix certain semaphore-related LTP tests for Mips, if they are

[Qemu-devel] [PATCH v4 2/5] linux-user: Fix TARGET_F_GETOWN definition for Mips

2016-09-05 Thread Aleksandar Markovic
From: Aleksandar Markovic For some reason, Qemu's TARGET_F_GETOWN constant for Mips does not match the correct value of correspondant F_GETOWN. This patch fixes this problem. For reference, see Mips' F_GETOWN definition in Linux kernel at arch/mips/include/uapi/asm/fcntl.h#L44. This

[Qemu-devel] [PATCH v2 1/3] linux-user: Add support for adjtimex() syscall

2016-09-05 Thread Aleksandar Markovic
From: Aleksandar Markovic This patch implements Qemu user mode adjtimex() syscall support. Syscall adjtimex() reads and optionally sets parameters for a clock adjustment algorithm used in network synchonization or similar scenarios. The implementation is based on invocation of host's adj

[Qemu-devel] [PATCH v4 3/5] linux-user: Fix structure target_flock definition for Mips

2016-09-05 Thread Aleksandar Markovic
From: Aleksandar Markovic Structure flock is defined for Mips in a way different from any other platform. For reference, see Linux kernel source code files: arch/mips/include/uapi/asm/fcntl.h#L63 (for Mips) include/uapi/asm-generic/fcntl.h#L195 (for all other platforms) This patch fix this

[Qemu-devel] [PATCH v2 1/5] linux-user: Fix syslog() syscall emulation

2016-09-05 Thread Aleksandar Markovic
From: Aleksandar Markovic There are currently several problems related to syslog() support. For example, if the second argument "bufp" of target syslog() syscall is NULL, the current implementation always returns error code EFAULT. However, NULL is a perfectly valid value for

[Qemu-devel] [PATCH v2 2/5] linux-user: Fix msgrcv() and msgsnd() syscalls emulation

2016-09-05 Thread Aleksandar Markovic
From: Aleksandar Markovic If syscalls msgrcv() and msgsnd() fail, they return E2BIG, EACCES, EAGAIN, EFAULT, EIDRM, EINTR, EINVAL, ENOMEM, or ENOMSG. By examining negative scenarios of these syscalls for Mips, it was established that ENOMSG does not have the same value accross all platforms

[Qemu-devel] [PATCH v2 2/3] linux-user: Add support for sysfs() syscall

2016-09-05 Thread Aleksandar Markovic
From: Aleksandar Markovic This patch implements Qemu user mode sysfs() syscall support. Syscall sysfs() involves returning information about the filesystem types currently present in the kernel, and can operate in three distinct flavors, depending on its first argument. The implementation is

[Qemu-devel] [PATCH v2 0/5] linux user: Fix assorted Qemu user mode issues

2016-09-05 Thread Aleksandar Markovic
From: Aleksandar Markovic v1->v2: - improved usage of "#ifdefs" in patch on syslog() - removed EIDRM-related code from patch on msgrcv(), since this error code is already handled well - added three cleanup patches (also, v1 for some reason did not appear on qe

[Qemu-devel] [PATCH v2 3/5] linux-user: Remove tabs and trailing spaces from linux-user/main.c

2016-09-05 Thread Aleksandar Markovic
From: Aleksandar Markovic File main.c is frequently a starting point of debugging or analysing Qemu code for novice devevelopers, and it would be nice if it had format as clean as posible. This patch starts improving its format by removing tabs and trailing spaces. This patch is obtained in

[Qemu-devel] [PATCH v2 3/3] linux-user: Add support for ustat() syscall

2016-09-05 Thread Aleksandar Markovic
From: Aleksandar Markovic This patch implements Qemu user mode ustat() syscall support. Syscall ustat() returns information about a mounted filesystem. The implementation is similar to the implementations of statfs(), fstatfs() and other related syscalls. It is based on invocation of host&#

[Qemu-devel] [PATCH v2 4/5] linux-user: Remove a duplicate item from strace.list

2016-09-05 Thread Aleksandar Markovic
From: Aleksandar Markovic There is a duplicate item in strace.list. It is benign, but it shouldn't be there. It is the only duplicate in strace.list. This patch removes it. Signed-off-by: Aleksandar Markovic --- linux-user/strace.list |3 --- 1 file changed, 3 deletions(-) diff --

[Qemu-devel] [PATCH v4 5/5] linux-user: Fix certain argument alignment cases for Mips64

2016-09-05 Thread Aleksandar Markovic
From: Aleksandar Markovic The function that is changed in this patch is supposed to indicate that there was certaing argument rearangement related to 64-bit arguments on 32-bit platforms. The background on such rearangements can be found, for example, in the man page for syscall(2). However

[Qemu-devel] [PATCH v2 5/5] linux-user: Insert missing #ifdefs for some syscalls

2016-09-05 Thread Aleksandar Markovic
From: Aleksandar Markovic Not all syscall-specific code segments in main switch statement in do_syscall() are inclosed in appropriate "#ifdefs". This patch fixes some of these cases. Signed-off-by: Aleksandar Markovic --- linux-user/syscall.c | 12 1 file changed, 12

[Qemu-devel] [PATCH v3 06/10] linux-user: Fix syslog() syscall emulation

2016-09-12 Thread Aleksandar Markovic
From: Aleksandar Markovic There are currently several problems related to syslog() support. For example, if the second argument "bufp" of target syslog() syscall is NULL, the current implementation always returns error code EFAULT. However, NULL is a perfectly valid value for

[Qemu-devel] [PATCH v3 04/10] linux-user: Fix msgrcv() and msgsnd() syscalls emulation

2016-09-12 Thread Aleksandar Markovic
From: Aleksandar Markovic If syscalls msgrcv() and msgsnd() fail, they return E2BIG, EACCES, EAGAIN, EFAULT, EIDRM, EINTR, EINVAL, ENOMEM, or ENOMSG. By examining negative scenarios of these syscalls for Mips, it was established that ENOMSG does not have the same value accross all platforms

[Qemu-devel] [PATCH v3 00/10] linux user: Fix assorted Qemu user mode issues

2016-09-12 Thread Aleksandar Markovic
From: Aleksandar Markovic v2->v3: - rebased to the latest code - merged patches on adjtimex(), sysfs(), and ustat() from another series - added patch on socketcall() support (5/10) - cleanup patches reorganized v1->v2: - improved usage of "#ifdefs" in

[Qemu-devel] [PATCH v5 0/5] linux-user: Fix miscellaneous Mips-specific issues

2016-09-12 Thread Aleksandar Markovic
From: Aleksandar Markovic v4->v5: - Commit messages improved. v3->v4: - Added a patch on agrument rearangement. v2->v3: - Minor fixes in the commit messages. v1->v2: - Improved a comment in the patch about target_semid64_ds (now 4/4). - Added a patch that fixes TARGE

[Qemu-devel] [PATCH v3 05/10] linux-user: Fix socketcall() syscall emulation

2016-09-12 Thread Aleksandar Markovic
From: Aleksandar Markovic do_socketcall() function in Qemu's syscalls.c is implemented to mirror corespondant implementation of socketcall() in Linux kernel. (see kernel source file net/socket.c, definition of socketcall). However, error codes are wrong for the cases of invalid values o

[Qemu-devel] [PATCH v3 08/10] linux-user: Improve braces-related formatting in linux-user/main.c

2016-09-12 Thread Aleksandar Markovic
From: Aleksandar Markovic This patch removes all braces-related errors (reported by checkpatch.pl) from linux-user/main.c. Signed-off-by: Aleksandar Markovic --- linux-user/main.c | 188 +++--- 1 file changed, 108 insertions(+), 80 deletions

[Qemu-devel] [PATCH v5 1/5] linux-user: Fix TARGET_SIOCATMARK definition for Mips

2016-09-12 Thread Aleksandar Markovic
From: Aleksandar Markovic This patch fixes wrong definition of TARGET_SIOCATMARK for Mips. The current definition is: #define SIOCATMARK 0x8905 while the correct definition is: #define SIOCATMARK TARGET_IOR('s', 7, int) See Linux kernel source file arch/mips/includ

[Qemu-devel] [PATCH v3 01/10] linux-user: Add support for adjtimex() syscall

2016-09-12 Thread Aleksandar Markovic
From: Aleksandar Markovic This patch implements Qemu user mode adjtimex() syscall support. Syscall adjtimex() reads and optionally sets parameters for a clock adjustment algorithm used in network synchonization or similar scenarios. The implementation is based on invocation of host's adj

[Qemu-devel] [PATCH v5 5/5] linux-user: Fix certain argument alignment cases for Mips64

2016-09-12 Thread Aleksandar Markovic
From: Aleksandar Markovic The function that is changed in this patch is supposed to indicate that there was certaing argument rearangement related to 64-bit arguments on 32-bit platforms. The background on such rearangements can be found, for example, in the man page for syscall(2). However

[Qemu-devel] [PATCH v3 09/10] linux-user: Improve usage of spaces in linux-user/main.c

2016-09-12 Thread Aleksandar Markovic
From: Aleksandar Markovic This patch removes all spaces-related errors (reported by checkpatch.pl) from linux-user/main.c. Signed-off-by: Aleksandar Markovic --- linux-user/main.c | 96 +++ 1 file changed, 48 insertions(+), 48 deletions

[Qemu-devel] [PATCH v3 02/10] linux-user: Add support for sysfs() syscall

2016-09-12 Thread Aleksandar Markovic
From: Aleksandar Markovic This patch implements Qemu user mode sysfs() syscall support. Syscall sysfs() involves returning information about the filesystem types currently present in the kernel, and can operate in three distinct flavors, depending on its first argument. The implementation is

[Qemu-devel] [PATCH v5 2/5] linux-user: Fix TARGET_F_GETOWN definition for Mips

2016-09-12 Thread Aleksandar Markovic
From: Aleksandar Markovic For some reason, Qemu's TARGET_F_GETOWN constant for Mips does not match the correct value of correspondant F_GETOWN. This patch fixes this problem. For reference, see Mips' F_GETOWN definition in Linux kernel at arch/mips/include/uapi/asm/fcntl.h#L44. This

[Qemu-devel] [PATCH v3 07/10] linux-user: Remove tabs and trailing spaces from linux-user/main.c

2016-09-12 Thread Aleksandar Markovic
From: Aleksandar Markovic File main.c is frequently a starting point of debugging or analysing Qemu code for novice devevelopers, and it would be nice if it had format as clean as posible. This patch starts improving its format by removing tabs and trailing spaces. This patch is obtained in

[Qemu-devel] [PATCH v5 4/5] linux-user: Fix structure target_semid64_ds definition for Mips

2016-09-12 Thread Aleksandar Markovic
From: Aleksandar Markovic This patch corrects target_semid64_ds structure definition for Mips. See, for example definition of semid64_ds for Mips in Linux kernel: arch/mips/include/uapi/asm/sembuf.h#L13. This patch will also fix certain semaphore-related LTP tests for Mips, if they are

[Qemu-devel] [PATCH v3 03/10] linux-user: Add support for ustat() syscall

2016-09-12 Thread Aleksandar Markovic
From: Aleksandar Markovic This patch implements Qemu user mode ustat() syscall support. Syscall ustat() returns information about a mounted filesystem. The implementation is similar to the implementations of statfs(), fstatfs() and other related syscalls. It is based on invocation of host&#

[Qemu-devel] [PATCH v3 10/10] linux-user: Remove a duplicate item from strace.list

2016-09-12 Thread Aleksandar Markovic
From: Aleksandar Markovic There is a duplicate item in strace.list. It is benign, but it shouldn't be there. It is the only duplicate in strace.list. This patch removes it. Signed-off-by: Aleksandar Markovic --- linux-user/strace.list | 3 --- 1 file changed, 3 deletions(-) diff --

[Qemu-devel] [PATCH v5 3/5] linux-user: Fix structure target_flock definition for Mips

2016-09-12 Thread Aleksandar Markovic
From: Aleksandar Markovic Structure flock is defined for Mips in a way different from any other platform. For reference, see Linux kernel source code files: arch/mips/include/uapi/asm/fcntl.h#L63 (for Mips) include/uapi/asm-generic/fcntl.h#L195 (for all other platforms) This patch fix this

[Qemu-devel] [PATCH v4 01/11] linux-user: Add support for adjtimex() syscall

2016-09-14 Thread Aleksandar Markovic
From: Aleksandar Markovic This patch implements Qemu user mode adjtimex() syscall support. Syscall adjtimex() reads and optionally sets parameters for a clock adjustment algorithm used in network synchonization or similar scenarios. The implementation is based on invocation of host's adj

[Qemu-devel] [PATCH v4 00/11] linux user: Fix assorted Qemu user mode issues

2016-09-14 Thread Aleksandar Markovic
From: Aleksandar Markovic v3->v4: - rebased to the latest code - added patch on clock_adjtime() support - minor commit messages improvements v2->v3: - rebased to the latest code - merged patches on adjtimex(), sysfs(), and ustat() from another series - added pa

[Qemu-devel] [PATCH v4 04/11] linux-user: Add support for ustat() syscall

2016-09-14 Thread Aleksandar Markovic
From: Aleksandar Markovic This patch implements Qemu user mode ustat() syscall support. Syscall ustat() returns information about a mounted filesystem. The implementation is similar to the implementations of statfs(), fstatfs() and other related syscalls. It is based on invocation of host&#

[Qemu-devel] [PATCH v4 02/11] linux-user: Add support for clock_adjtime() syscall

2016-09-14 Thread Aleksandar Markovic
From: Aleksandar Markovic This patch implements Qemu user mode clock_adjtime() syscall support. The implementation is based on invocation of host's clock_adjtime(), and is very similar to the implementation of adjtimex() syscall support. The main difference is the presence of "

[Qemu-devel] [PATCH v4 06/11] linux-user: Fix socketcall() syscall support

2016-09-14 Thread Aleksandar Markovic
From: Aleksandar Markovic do_socketcall() function in Qemu's syscalls.c is implemented to mirror corespondant implementation of socketcall() in Linux kernel. (see kernel source file net/socket.c, definition of socketcall). However, error codes are wrong for the cases of invalid values o

[Qemu-devel] [PATCH v4 09/11] linux-user: Improve braces-related formatting in linux-user/main.c

2016-09-14 Thread Aleksandar Markovic
From: Aleksandar Markovic This patch removes all braces-related errors (reported by checkpatch.pl) from linux-user/main.c. Signed-off-by: Aleksandar Markovic --- linux-user/main.c | 188 +++--- 1 file changed, 108 insertions(+), 80 deletions

[Qemu-devel] [PATCH v4 07/11] linux-user: Fix syslog() syscall support

2016-09-14 Thread Aleksandar Markovic
From: Aleksandar Markovic There are currently several problems related to syslog() support. For example, if the second argument "bufp" of target syslog() syscall is NULL, the current implementation always returns error code EFAULT. However, NULL is a perfectly valid value for

[Qemu-devel] [PATCH v4 10/11] linux-user: Improve usage of spaces in linux-user/main.c

2016-09-14 Thread Aleksandar Markovic
From: Aleksandar Markovic This patch removes all spaces-related errors (reported by checkpatch.pl) from linux-user/main.c. Signed-off-by: Aleksandar Markovic --- linux-user/main.c | 96 +++ 1 file changed, 48 insertions(+), 48 deletions

[Qemu-devel] [PATCH v4 03/11] linux-user: Add support for sysfs() syscall

2016-09-14 Thread Aleksandar Markovic
From: Aleksandar Markovic This patch implements Qemu user mode sysfs() syscall support. Syscall sysfs() involves returning information about the filesystem types currently present in the kernel, and can operate in three distinct flavors, depending on its first argument. The implementation is

[Qemu-devel] [PATCH v4 08/11] linux-user: Remove tabs and trailing spaces from linux-user/main.c

2016-09-14 Thread Aleksandar Markovic
From: Aleksandar Markovic File main.c is frequently a starting point of debugging or analysing Qemu code for novice devevelopers, and it would be nice if it had format as clean as posible. This patch starts improving its format by removing tabs and trailing spaces. This patch is obtained in

[Qemu-devel] [PATCH v4 11/11] linux-user: Remove a duplicate item from strace.list

2016-09-14 Thread Aleksandar Markovic
From: Aleksandar Markovic There is a duplicate item in strace.list. It is benign, but it shouldn't be there. It is the only duplicate in strace.list. This patch removes it. Signed-off-by: Aleksandar Markovic --- linux-user/strace.list | 3 --- 1 file changed, 3 deletions(-) diff --

[Qemu-devel] [PATCH v4 05/11] linux-user: Fix msgrcv() and msgsnd() syscalls support

2016-09-14 Thread Aleksandar Markovic
From: Aleksandar Markovic If syscalls msgrcv() and msgsnd() fail, they return E2BIG, EACCES, EAGAIN, EFAULT, EIDRM, EINTR, EINVAL, ENOMEM, or ENOMSG. By examining negative scenarios of these syscalls for Mips, it was established that ENOMSG does not have the same value accross all platforms

Re: [Qemu-devel] [PATCH v4 00/11] linux user: Fix assorted Qemu user mode issues

2016-09-14 Thread Aleksandar Markovic
OK, these patches will be removed in v5, which is pending. Thanks. Aleksandar From: Peter Maydell [peter.mayd...@linaro.org] Sent: Wednesday, September 14, 2016 12:15 PM To: Aleksandar Markovic Cc: QEMU Developers; Riku Voipio; Petar Jovanovic; Miodrag

[Qemu-devel] [PATCH v5 0/8] linux user: Fix assorted Qemu user mode issues

2016-09-14 Thread Aleksandar Markovic
From: Aleksandar Markovic v4->v5: - removed three cleanup patches v3->v4: - rebased to the latest code - added patch on clock_adjtime() support - minor commit messages improvements v2->v3: - rebased to the latest code - merged patches on adjtimex(), sys

[Qemu-devel] [PATCH v5 1/8] linux-user: Add support for adjtimex() syscall

2016-09-14 Thread Aleksandar Markovic
From: Aleksandar Markovic This patch implements Qemu user mode adjtimex() syscall support. Syscall adjtimex() reads and optionally sets parameters for a clock adjustment algorithm used in network synchonization or similar scenarios. The implementation is based on invocation of host's adj

[Qemu-devel] [PATCH v5 2/8] linux-user: Add support for clock_adjtime() syscall

2016-09-14 Thread Aleksandar Markovic
From: Aleksandar Markovic This patch implements Qemu user mode clock_adjtime() syscall support. The implementation is based on invocation of host's clock_adjtime(), and is very similar to the implementation of adjtimex() syscall support. The main difference is the presence of "

[Qemu-devel] [PATCH v5 3/8] linux-user: Add support for sysfs() syscall

2016-09-14 Thread Aleksandar Markovic
From: Aleksandar Markovic This patch implements Qemu user mode sysfs() syscall support. Syscall sysfs() involves returning information about the filesystem types currently present in the kernel, and can operate in three distinct flavors, depending on its first argument. The implementation is

[Qemu-devel] [PATCH v5 5/8] linux-user: Fix msgrcv() and msgsnd() syscalls support

2016-09-14 Thread Aleksandar Markovic
From: Aleksandar Markovic If syscalls msgrcv() and msgsnd() fail, they return E2BIG, EACCES, EAGAIN, EFAULT, EIDRM, EINTR, EINVAL, ENOMEM, or ENOMSG. By examining negative scenarios of these syscalls for Mips, it was established that ENOMSG does not have the same value accross all platforms

[Qemu-devel] [PATCH v5 6/8] linux-user: Fix socketcall() syscall support

2016-09-14 Thread Aleksandar Markovic
From: Aleksandar Markovic do_socketcall() function in Qemu's syscalls.c is implemented to mirror corespondant implementation of socketcall() in Linux kernel. (see kernel source file net/socket.c, definition of socketcall). However, error codes are wrong for the cases of invalid values o

[Qemu-devel] [PATCH v5 8/8] linux-user: Remove a duplicate item from strace.list

2016-09-14 Thread Aleksandar Markovic
From: Aleksandar Markovic There is a duplicate item in strace.list. It is benign, but it shouldn't be there. It is the only duplicate in strace.list. This patch removes it. Signed-off-by: Aleksandar Markovic --- linux-user/strace.list | 3 --- 1 file changed, 3 deletions(-) diff --

[Qemu-devel] [PATCH v5 7/8] linux-user: Fix syslog() syscall support

2016-09-14 Thread Aleksandar Markovic
From: Aleksandar Markovic There are currently several problems related to syslog() support. For example, if the second argument "bufp" of target syslog() syscall is NULL, the current implementation always returns error code EFAULT. However, NULL is a perfectly valid value for

[Qemu-devel] [PATCH v5 4/8] linux-user: Add support for ustat() syscall

2016-09-14 Thread Aleksandar Markovic
From: Aleksandar Markovic This patch implements Qemu user mode ustat() syscall support. Syscall ustat() returns information about a mounted filesystem. The implementation is similar to the implementations of statfs(), fstatfs() and other related syscalls. It is based on invocation of host&#

Re: [Qemu-devel] [PATCH v5 3/5] linux-user: Fix structure target_flock definition for Mips

2016-09-16 Thread Aleksandar Markovic
You are correct. This is going to be fixed in v6, which will appear soon. Thanks! Aleksandar From: Leon Alrae Sent: Thursday, September 15, 2016 2:51 AM To: Aleksandar Markovic Cc: qemu-devel@nongnu.org; riku.voi...@iki.fi; peter.mayd...@linaro.org

[Qemu-devel] [PATCH v6 0/7] linux-user: Fix miscellaneous Mips-specific issues

2016-09-16 Thread Aleksandar Markovic
From: Aleksandar Markovic v5->v6: - Corrected two instances of wrong field type in the patch on target_flock. - Added a patch that corrects handling of EDQUOT error code for Mips. - Added a patch that adds missing Mips-related items in strace.list. v4->v5: - Commit messages im

[Qemu-devel] [PATCH v6 1/7] linux-user: Fix TARGET_SIOCATMARK definition for Mips

2016-09-16 Thread Aleksandar Markovic
From: Aleksandar Markovic This patch fixes wrong definition of TARGET_SIOCATMARK for Mips. The current definition is: #define SIOCATMARK 0x8905 while the correct definition is: #define SIOCATMARK TARGET_IOR('s', 7, int) See Linux kernel source file arch/mips/includ

[Qemu-devel] [PATCH v6 2/7] linux-user: Fix TARGET_F_GETOWN definition for Mips

2016-09-16 Thread Aleksandar Markovic
From: Aleksandar Markovic For some reason, Qemu's TARGET_F_GETOWN constant for Mips does not match the correct value of correspondant F_GETOWN. This patch fixes this problem. For reference, see Mips' F_GETOWN definition in Linux kernel at arch/mips/include/uapi/asm/fcntl.h#L44. This

<    4   5   6   7   8   9   10   11   12   13   >