summaryrefslogtreecommitdiffstats
path: root/linux-user
Commit message (Collapse)AuthorAgeFilesLines
* Delete unused tb_invalidate_page_rangeBlue Swirl2011-05-221-20/+2
| | | | | | | | | | | | tb_invalidate_page_range() was intended to be used to invalidate an area of a TB which the guest explicitly flushes from i-cache. However, QEMU detects writes to code areas where TBs have been generated, so his has never been useful. Delete the function, adjust callers. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* linux-user: Replace deprecated functionStefan Weil2011-05-081-1/+1
| | | | | | | Function bzero is deprecated, so replace it by function memset. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* Fix spelling in comments (intruction -> instruction)Stefan Weil2011-05-081-1/+1
| | | | | Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* Fix typo in comment (truely -> truly)Stefan Weil2011-05-081-1/+1
| | | | | Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* Fix typos in comments (neccessary -> necessary)Stefan Weil2011-05-081-1/+1
| | | | | Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* Fix typo in comment (dieing -> dying)Stefan Weil2011-05-081-1/+1
| | | | | Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* Don't zero out buffer in sched_getaffinityMike McCormack2011-05-021-12/+1
| | | | | | | | | The kernel doesn't fill the buffer provided to sched_getaffinity with zero bytes, so neither should QEMU. Signed-off-by: Mike McCormack <mj.mccormack@samsung.com> Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
* Fix buffer overrun in sched_getaffinityMike McCormack2011-05-021-1/+1
| | | | | | | | | | | | Zeroing of the cpu array should start from &cpus[kernel_ret] not &cpus[num_zeros_to_fill]. This fixes a crash in EFL's edje_cc running under qemu-arm. Signed-off-by: Mike McCormack <mj.mccormack@samsung.com> Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Acked-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
* linux-user: Fix compilation for "old" linux versionsStefan Weil2011-05-021-0/+12
| | | | | | | | | Debian Lenny and other installations with older linux versions failed to compile linux-user because some CLONE_xxx macros are undefined. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
* linux-user: untie syscalls from UID16Riku Voipio2011-04-263-17/+43
| | | | | | | | | | | | | | | | | | Quite a number of uid/gid related syscalls are only defined on systems with USE_UID16 defined. This is apperently based on the idea that these system calls would never be called on non-UID16 systems. Make these syscalls available for all architectures that define them. drop alpha hack to support selected UID16 syscalls. MIPS and PowerPC were also defined as UID16, to get uid/gid syscalls available, drop this error as well. Change QEMU to reflect this. Cc: Ulrich Hecht <uli@suse.de> Cc: Richard Henderson <rth@twiddle.net> Cc: Alexander Graf <agraf@suse.de> Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
* linux-user: add s390x to llseek listAlexander Graf2011-04-261-1/+2
| | | | | | | | | We keep a list of host architectures that do llseek with the same syscall as lseek. S390x is one of them, so let's add it to the list. Original-patch-by: Ulrich Hecht <uli@suse.de> Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
* linux-user: add ioctl(SIOCGIWNAME, ...) support.Laurent Vivier2011-04-263-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow to run properly following program from linux-user: /* cc -o wifi wifi.c */ #include <stdio.h> #include <sys/ioctl.h> #include <sys/types.h> #include <sys/socket.h> #include <linux/wireless.h> #include <netinet/in.h> #include <arpa/inet.h> #include <string.h> int main(int argc, char **argv) { int ret; struct ifreq req; struct sockaddr_in *addr; int s; if (argc != 2) { fprintf(stderr, "Need an interface name (like wlan0)\n"); return 1; } s = socket( AF_INET, SOCK_DGRAM, 0 ); if (s < 0) { perror("Cannot open socket"); return 1; } strncpy(req.ifr_name, argv[1], sizeof(req.ifr_name)); ret = ioctl( s, SIOCGIWNAME, &req ); if (ret < 0) { fprintf(stderr, "No wireless extension\n"); return 1; } printf("%s\n", req.ifr_name); printf("%s\n", req.ifr_newname); return 0; } $ ./wifi eth0 No wireless extension $ ./wifi wlan0 wlan0 IEEE 802.11bg Signed-off-by: Laurent Vivier <laurent@vivier.eu> Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
* linux-user: convert ioctl(SIOCGIFCONF, ...) result.Laurent Vivier2011-04-262-2/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The result needs to be converted as it is stored in an array of struct ifreq and sizeof(struct ifreq) differs according to target and host alignment rules. This patch allows to execute correctly the following program on arm and m68k: #include <stdio.h> #include <sys/ioctl.h> #include <net/if.h> #include <alloca.h> #include <string.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> int main(void) { int s, ret; struct ifconf ifc; int i; memset( &ifc, 0, sizeof( struct ifconf ) ); ifc.ifc_len = 8 * sizeof(struct ifreq); ifc.ifc_buf = alloca(ifc.ifc_len); s = socket( AF_INET, SOCK_DGRAM, 0 ); if (s < 0) { perror("Cannot open socket"); return 1; } ret = ioctl( s, SIOCGIFCONF, &ifc ); if (s < 0) { perror("ioctl() failed"); return 1; } for (i = 0; i < ifc.ifc_len / sizeof(struct ifreq) ; i ++) { struct sockaddr_in *s; s = (struct sockaddr_in*)&ifc.ifc_req[i].ifr_addr; printf("%s\n", ifc.ifc_req[i].ifr_name); printf("%s\n", inet_ntoa(s->sin_addr)); } } Signed-off-by: Laurent Vivier <laurent@vivier.eu> Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
* linux-user: improve tracesLaurent Vivier2011-04-262-6/+167
| | | | | | | | Add trace details for getpid(), kill(), _llseek(), rt_sigaction(), rt_sigprocmask(), clone(). Signed-off-by: Laurent Vivier <laurent@vivier.eu> Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
* [v2] linux-user: bigger default stackRiku Voipio2011-04-261-5/+2
| | | | | | | | | PTHREAD_STACK_MIN (16KB) is somewhat inadequate for a new stack for new QEMU threads. Set new limit to 256K which should be enough, yet doesn't increase memory pressure significantly. Signed-off-by: Riku Voipio <riku.voipio@nokia.com> Reviewed-by: Nathan Froyd <froydnj@codesourcery.com>
* linux-user/arm/nwfpe: rename REG_PC to ARM_REG_PCPeter Maydell2011-04-253-6/+6
| | | | | | | | | | The REG_PC constant used in the ARM nwfpe code is fine in the kernel but when used in qemu can clash with a definition in the host system include files (in particular on Ubuntu Lucid SPARC, including signal.h will define a REG_PC). Rename the constant to avoid this issue. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* softfloat: rename float*_eq() into float*_eq_quiet()Aurelien Jarno2011-04-171-1/+1
| | | | | | | | | | | | | | float*_eq functions have a different semantics than other comparison functions. Fix that by first renaming float*_quiet() into float*_eq_quiet(). Note that it is purely mechanical, and the behaviour should be unchanged. That said it clearly highlight problems due to this different semantics, they are fixed later in this patch series. Cc: Alexander Graf <agraf@suse.de> Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* unicore32: necessary modifications for other files to support unicore32Guan Xuetao2011-04-124-5/+173
| | | | | Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* unicore32: add necessry headers in linux-user/unicore32 for unicore32 supportGuan Xuetao2011-04-124-0/+454
| | | | | Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* microblaze: Correct ec mask in debug printEdgar E. Iglesias2011-04-111-1/+1
| | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* linux-user: Fix unlock_user() call in return from poll()Peter Maydell2011-03-221-3/+1
| | | | | | | | | | | Correct the broken attempt to calculate the third argument to unlock_user() in the code path which unlocked the pollfd array on return from poll() and ppoll() emulation. (This only caused a problem if unlock_user() wasn't a no-op, eg if DEBUG_REMAP is defined.) Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* linux-user: Fix large seeks by 32 bit guest on 64 bit hostPeter Maydell2011-03-061-6/+10
| | | | | | | | | | | | | | | | | When emulating a 32 bit Linux user-mode program on a 64 bit target we implement the llseek syscall in terms of lseek. Correct a bug which meant we were silently casting the result of host lseek() to a 32 bit integer as it passed through get_errno() and thus throwing away the top half. We also don't try to store the result back to userspace unless the seek succeeded; this matches the kernel behaviour. Thanks to Eoghan Sherry for identifying the problem and suggesting a solution. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* linux-user: fix compile failure if !CONFIG_USE_GUEST_BASEPeter Maydell2011-03-031-0/+4
| | | | | | | | | | | | If CONFIG_USE_GUEST_BASE is not defined, gcc complains: linux-user/mmap.c:235: error: comparison of unsigned expression >= 0 is always true because RESERVED_VA is #defined to 0. Since mmap_find_vma_reserved() will never be called anyway if RESERVED_VA is always 0, fix this by simply #ifdef'ing away the function and its callsite. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* linux-user: correct core dump formatLaurent Vivier2011-02-171-16/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch allows to really use the core dumped by qemu with guest architecture tools. - it adds a missing bswap_phdr() for the program headers of memory regions. "objdump -x" sample: BEFORE: 0x1000000 off 0x00200000 vaddr 0x00000400 paddr 0x00000000 align 2**21 filesz 0x00000000 memsz 0x00100000 flags --- 0x1000000 off 0x00200000 vaddr 0x00100400 paddr 0x00000000 align 2**21 filesz 0x00000000 memsz 0x00080000 flags --- 6000000 AFTER: LOAD off 0x00002000 vaddr 0x00040000 paddr 0x00000000 align 2**13 filesz 0x00000000 memsz 0x00001000 flags --- LOAD off 0x00002000 vaddr 0x00041000 paddr 0x00000000 align 2**13 filesz 0x00000000 memsz 0x00000800 flags rw- - it doesn't pad the note size to sizeof(int32_t). On m68k the NT_PRSTATUS note size is 154 and must not be rounded up to 156, because this value is checked by objdump and gdb. "gdb" symptoms: "warning: Couldn't find general-purpose registers in core file." "objdump -x" sample: BEFORE: Sections: Idx Name Size VMA LMA File off Algn 0 note0 000001c4 00000000 00000000 000003b4 2**0 CONTENTS, READONLY 1 .auxv 00000070 00000000 00000000 00000508 2**2 CONTENTS 2 proc1 00100000 00000400 00000000 00200000 2**10 READONLY AFTER: Sections: Idx Name Size VMA LMA File off Algn 0 note0 000001c4 00000000 00000000 000003b4 2**0 CONTENTS, READONLY 1 .reg/19022 00000050 00000000 00000000 0000040e 2**2 CONTENTS 2 .reg 00000050 00000000 00000000 0000040e 2**2 CONTENTS 3 .auxv 00000070 00000000 00000000 00000508 2**2 CONTENTS 4 load1 00000000 00040000 00000000 00002000 2**13 ALLOC, READONLY Signed-off-by: Laurent Vivier <laurent@vivier.eu> Signed-off-by: Riku Voipio <riku.voipio@nokia.com>
* linux-user: Support the epoll syscallsPeter Maydell2011-02-172-0/+120
| | | | | | | | | | Support the epoll family of syscalls: epoll_create(), epoll_create1(), epoll_ctl(), epoll_wait() and epoll_pwait(). Note that epoll_create1() and epoll_pwait() are later additions, so we have to test separately in configure for their presence. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Riku Voipio <riku.voipio@nokia.com>
* linux-user: in linux-user/strace.c, tswap() is uselessLaurent Vivier2011-02-171-46/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Syscall parameters are already swapped by the caller. This patch removes useless tswap() from strace.c $ QEMU_STRACE=1 chroot /m68k mknod myramdisk b 1 1 with tswap() ... 29944 mknod("myramdisk",026630200000) = 0 ... without tswap() ... 30042 mknod("myramdisk",S_IFBLK|0666,makedev(1,1)) = 0 ... natively: $ strace touch mytouch ... open("mytouch", O_WRONLY|O_CREAT|O_NOCTTY|O_NONBLOCK, 0666) = 3 ... $ QEMU_STRACE=1 chroot /m68k touch mytouch with tswap() ... 30368 open("/usr/share/locale/locale.alias",O_RDONLY) = 3 30368 fstat64(50331648,0x4080032c) = 0 ... 30368 open("mytouch",O_RDONLY|O_CREAT|O_LARGEFILE|O_NOCTTY|O_NONBLOCK|0x1) = 0 ... without tswap() ... 30572 open("/usr/share/locale/locale.alias",O_RDONLY) = 3 30572 fstat64(3,0x4080032c) = 0 ... 30572 open("mytouch",O_WRONLY|O_CREAT|O_LARGEFILE|O_NOCTTY|O_NONBLOCK,0666) = 0 Signed-off-by: Laurent Vivier <laurent@vivier.eu> Fixes by Riku Voipio: add casts Signed-off-by: Riku Voipio <riku.voipio@nokia.com>
* linux-user: add rmdir() straceLaurent Vivier2011-02-172-0/+15
| | | | | Signed-off-by: Laurent Vivier <laurent@vivier.eu> Signed-off-by: Riku Voipio <riku.voipio@nokia.com>
* linux-user/arm: fix compilation failures using softfloat's struct typesPeter Maydell2011-02-103-19/+19
| | | | | | | | | Add uses of the float32/float64 boxing and unboxing macros so that the ARM linux-user targets will compile with USE_SOFTFLOAT_STRUCT_TYPES enabled. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* linux-user: fix for loopmount ioctlMartin Mohring2011-02-091-2/+0
| | | | | | | In case a chrooted build uses XEN or KVM, a looped mount needs to be done to setup the chroot. The ioctl for loop mount works correctly for arm, mips, ppc32 and sh4, so its now activated. Signed-off-by: Riku Voipio <riku.voipio@nokia.com>
* linux-user: fix build errors for mmap2-only portsMike Frysinger2011-02-091-1/+1
| | | | | | | | | The current print_mmap func is only enabled when the target supports the mmap syscall, but both mmap and mmap2 syscalls use it. This leads to a build failure when the target supports mmap2 but not mmap. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Riku Voipio <riku.voipio@nokia.com>
* linux-user: implement sched_{g,s}etaffinityMike Frysinger2011-02-091-0/+67
| | | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Riku Voipio <riku.voipio@nokia.com>
* linux-user/FLAT: allow targets to override FLAT processingMike Frysinger2011-02-092-16/+21
| | | | | | | | | This brings flatload.c more in line with the current Linux FLAT loader which allows targets to handle various FLAT aspects in their own way. For the common behavior, the new functions get stubbed out. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Riku Voipio <riku.voipio@nokia.com>
* linux-user/FLAT: fix auto-stack sizingMike Frysinger2011-02-091-2/+9
| | | | | | | | | | | | | The current auto-stack sizing works like it does on a NOMMU system; the problem is that this only works if the envp/argv arrays are fairly slim. On a desktop system, this is rarely the case, and can easily blow past the stack and into data/text regions as the default stack for FLAT progs is a mere 4KiB. So rather than rely on the NOMMU calculation (which is only there because NOMMU can't easily allocate gobs of contiguous mem), calc the full space actually needed and let the MMU host make space. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Riku Voipio <riku.voipio@nokia.com>
* linux-user: decode MAP_{UNINITIALIZED,EXECUTABLE} in straceMike Frysinger2011-02-092-0/+5
| | | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Riku Voipio <riku.voipio@nokia.com>
* linux-user: add ppoll syscall supportMike Frysinger2011-02-091-2/+55
| | | | | | | | | Some architectures (like Blackfin) only implement ppoll (and skip poll). So add support for it using existing poll code. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Riku Voipio <riku.voipio@nokia.com>
* linux-user/elfload: add FDPIC supportMike Frysinger2011-02-092-0/+78
| | | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Riku Voipio <riku.voipio@nokia.com>
* linux-user: fix sizeof handling for getsockoptMike Frysinger2011-02-091-2/+2
| | | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Riku Voipio <riku.voipio@nokia.com>
* linux-user: Fix possible realloc memory leakStefan Weil2011-02-091-3/+5
| | | | | | | | | | | | Extract from "man realloc": "If realloc() fails the original block is left untouched; it is not freed or moved." Fix a possible memory leak (reported by cppcheck). Cc: Riku Voipio <riku.voipio@iki.fi> Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Riku Voipio <riku.voipio@nokia.com>
* linux-user: Add support for -version optionPeter Maydell2011-02-091-4/+13
| | | | | | | | Add support to the linux-user qemu for the -version command line option, bringing it into line with the system emulation qemu. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Riku Voipio <riku.voipio@nokia.com>
* linux-user: avoid gcc array overrun warning for sparcPeter Maydell2011-02-011-3/+4
| | | | | | | | | | | Suppress a gcc array bounds overrun warning when filling in the SPARC signal frame by adjusting our definition of the structure so that the fp and callers_pc membes are part of the ins[] array rather than separate fields; since qemu has no need to access the fields individually there is no need to follow the kernel's structure field naming exactly. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Delete useless 'extern' qualifiers for functionsBlue Swirl2011-01-232-5/+5
| | | | | | | 'extern' qualifier is useless for function declarations. Delete them. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* linux-user: ARM: clear the IT bits when invoking a signal handlerPeter Maydell2011-01-141-7/+9
| | | | | | | | | | | | | | | When invoking a signal handler for an ARM target, make sure the IT bits in the CPSR are cleared. (This would otherwise cause incorrect execution if the IT state was non-zero when an exception occured. This bug has been masked previously because we weren't getting the IT state bits at exception entry right anyway.) Also use the proper cpsr_read()/cpsr_write() interface to update the CPSR rather than manipulating CPUState fields directly. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* linux-user: Add configure check for linux/fiemap.h and IOC_FS_FIEMAPPeter Maydell2011-01-122-1/+5
| | | | | | | | | Add a configure check for the existence of linux/fiemap.h and the IOC_FS_FIEMAP ioctl. This fixes a compilation failure on Linux systems which don't have that header file. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* Remove dead code for ARM semihosting commandline handlingWolfgang Schildbach2011-01-072-3/+0
| | | | | | | | | There are some bits in the code which were used to store the commandline for the semihosting call. These bits are now write-only and can be removed. Signed-off-by: Wolfgang Schildbach <wschi@dolby.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
* linux-user: Fix incorrect NaN detection in ARM nwfpe emulationPeter Maydell2011-01-071-7/+7
| | | | | | | | | | | | | | | | | The code in the linux-user ARM nwfpe emulation was incorrectly checking only for quiet NaNs when it should have been checking for any kind of NaN. This is probably because the code in question was taken from the Linux kernel, whose copy of the softfloat library had been modified so that float*_is_nan() returned true for all NaNs, not just quiet ones. The qemu equivalent function is float*_is_any_nan(), so use that. NB that this code is really obsolete since nobody uses FPE for actual arithmetic now; this is just cleanup following the recent renaming of the NaN related functions. Acked-by: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
* linux-user: Implement FS_IOC_FIEMAP ioctlPeter Maydell2011-01-074-0/+109
| | | | | | | | | Implement the FS_IOC_FIEMAP ioctl using the new support for custom handling of ioctls; this is needed because the struct that is passed includes a variable-length array. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
* linux-user: Support ioctls whose parameter size is not constantPeter Maydell2011-01-071-3/+15
| | | | | | | | | | Some ioctls (for example FS_IOC_FIEMAP) use structures whose size is not constant. The generic argument conversion code in do_ioctl() cannot handle this, so add support for implementing a special-case handler for a particular ioctl which does the conversion itself. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
* linux-user: Implement sync_file_range{,2} syscallsPeter Maydell2011-01-072-0/+29
| | | | | | | | | Implement the missing syscalls sync_file_range and sync_file_range2. The latter in particular is used by newer versions of apt on Ubuntu for ARM. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
* softfloat: Rename float*_is_nan() functions to float*_is_quiet_nan()Peter Maydell2011-01-021-7/+7
| | | | | | | | | | | | | | | | The softfloat functions float*_is_nan() were badly misnamed, because they return true only for quiet NaNs, not for all NaNs. Rename them to float*_is_quiet_nan() to more accurately reflect what they do. This change was produced by: perl -p -i -e 's/_is_nan/_is_quiet_nan/g' $(git grep -l is_nan) (with the results manually checked.) Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Nathan Froyd <froydnj@codesourcery.com> Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* ARM: fix ldrexd/strexdPeter Maydell2010-12-071-1/+1
| | | | | | | | | | | | | Correct ldrexd and strexd code to always read and write the high word of the 64-bit value from addr+4. Also make ldrexd and strexd agree that for a 64 bit value the address in env->exclusive_addr is that of the low word. This fixes the issues reported in https://bugs.launchpad.net/qemu/+bug/670883 Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Nathan Froyd <froydnj@codesourcery.com>
OpenPOWER on IntegriCloud