summaryrefslogtreecommitdiffstats
path: root/linux-user
Commit message (Collapse)AuthorAgeFilesLines
* target-alpha: implement getxuid and getxgid syscallsaurel322008-11-141-0/+24
| | | | | | | | | | | | | | | | | This patch implemented the setxuid and setxgid syscalls for Alpha. These syscalls return two values, both uid/euid and gid/egid. In addition to returning the first value in $v0, the additional value is returned in the $a4 register. The syscalls are used instead of the separate syscalls for those values used on other architectures (this is probably because Alpha Linux started out syscall compatible with DEC/OSF/Tru64). With this patch, the perlbmk benchmarks from Spec2000 run properly. (Vince Weaver) git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5722 c046a42c-6fe2-441c-8c8c-71466251a162
* ppc-linux-user: handle EXCP_DEBUGaurel322008-11-141-14/+13
| | | | | | | | | | | Replace POWERPC_EXCP_DEBUG by EXCP_DEBUG as the former can not happen in user mode emulation, while the later can happen and should be handled. Noticed by Andrew Stubbs. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5721 c046a42c-6fe2-441c-8c8c-71466251a162
* target-alpha: fix termbits and target IOC macrosaurel322008-11-122-34/+34
| | | | | | | | | | | | | | This patch fixes the two following problems for Alpha linux-user: - termbits.h is incorrectly using host IOC macros and structures - IOC bitfields sizes are incorrectly set This patch corrects the ioctl TCGETS done by isatty function call on Alpha (when running SPEC crafty for instance). Signed-off-by: Laurent Desnogues <laurent.desnogues@gmail.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5704 c046a42c-6fe2-441c-8c8c-71466251a162
* target-alpha: add proper fcntl definitionsaurel322008-11-111-0/+19
| | | | | | | | | | | | | On Alpha the target to native fcntl definitions were missing. Because of this, programs trying to open files with the O_CREAT option were getting O_APPEND instead, etc. This was keeping gcc from the spec benchmarks from running, among other things. (Vince Weaver) git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5672 c046a42c-6fe2-441c-8c8c-71466251a162
* use target_mmap() to allocate idt, gdt and ldt (Kirill A. Shutemov).balrog2008-11-102-12/+23
| | | | | | | | | | env->*dt.base should fit target address space, so we should use target_mmap to allocate them. Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5666 c046a42c-6fe2-441c-8c8c-71466251a162
* User qemu profilingaurel322008-11-061-0/+6
| | | | | | | | | | | | | | - Makefile.target: re-enable profiling for user qemu. It seems profiling was (accidently?) removed by commit 3937 - syscall.c: * add an include to get _mcleanup prototype * add a call to _mcleanup for exit_group in a way similar to what is done for exit (Laurent Desnogues) git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5642 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix return value printing for shmat (Lauro Ramos Venancio).balrog2008-10-281-1/+1
| | | | | | | | The shmat syscall returns an address, so we must use the print_syscall_ret_addr function. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5565 c046a42c-6fe2-441c-8c8c-71466251a162
* Recvmsg must return the number of bytes received (Lauro Ramos Venancio).balrog2008-10-281-2/+6
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5564 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix iovec for the case with invalid elements (Lauro Ramos Venancio).balrog2008-10-281-13/+7
| | | | | | | | | We must call the writev even if an iovec element is invalid. For example, if the second element is invalid, the linux process the first one. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5562 c046a42c-6fe2-441c-8c8c-71466251a162
* Use the host exit syscall for exiting (Lauro Ramos Venancio).balrog2008-10-281-1/+3
| | | | | | | | We can't call the libc _exit function because it calls the exit_group host syscall. We must call directly the exit host syscall. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5561 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix undeclared symbol warnings from sparseblueswir12008-10-263-6/+6
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5539 c046a42c-6fe2-441c-8c8c-71466251a162
* Replace uses of strncpy (a GNU extension) with Qemu pstrcpyblueswir12008-10-251-1/+1
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5531 c046a42c-6fe2-441c-8c8c-71466251a162
* Add missing return statement (fixes compiler warning).aurel322008-10-241-0/+1
| | | | | | | Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5523 c046a42c-6fe2-441c-8c8c-71466251a162
* * Use function pointers for symbol lookup (currently for elf32 and elf64,pbrook2008-10-221-44/+98
| | | | | | | | | | | | | | | | could be expanded). This also fixes the bug with mips elf64 symbols in current Qemu trunk. * Use quicksort and binary search for symbol lookup. * Remove unneeded entries from symbol table. This reduced a typical table size (linux mips kernel) from 1764487 to 11656 entries. Signed-off-by: Stefan Weil <weil@mail.berlios.de> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5510 c046a42c-6fe2-441c-8c8c-71466251a162
* linux-user: implement msg* syscallsaurel322008-10-131-0/+21
| | | | | | | Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5484 c046a42c-6fe2-441c-8c8c-71466251a162
* linux-user: fix and cleanup IPCOP_msg* ipc calls handlingaurel322008-10-131-55/+116
| | | | | | | Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5483 c046a42c-6fe2-441c-8c8c-71466251a162
* linux-user: fix getdents* syscallsaurel322008-10-132-14/+28
| | | | | | | | | | | | | glibc's structs dirent and dirent64 is different from in-kernel dirent and dirent64. Kernel headers doesn't provide structs dirent(64) any more. So we should add it to qemu headers. To avoid conflict with glibc it called struct linux_dirent(64). Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5480 c046a42c-6fe2-441c-8c8c-71466251a162
* linux-user: Add readahead syscallaurel322008-10-131-1/+14
| | | | | | | Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5479 c046a42c-6fe2-441c-8c8c-71466251a162
* CRIS: linux-user signals dont need ERP compensation after break anymore.edgar_igl2008-10-081-3/+0
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5450 c046a42c-6fe2-441c-8c8c-71466251a162
* CRIS: linux-user ERP compensation not needed anymore.edgar_igl2008-10-081-1/+0
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5449 c046a42c-6fe2-441c-8c8c-71466251a162
* Make various generated structures staticblueswir12008-10-051-1/+1
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5429 c046a42c-6fe2-441c-8c8c-71466251a162
* Make target_sigaltstack_used staticblueswir12008-10-051-1/+1
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5428 c046a42c-6fe2-441c-8c8c-71466251a162
* Export x86_stack_size in qemu.hblueswir12008-10-052-2/+3
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5427 c046a42c-6fe2-441c-8c8c-71466251a162
* Make ioctl table staticblueswir12008-10-051-1/+1
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5426 c046a42c-6fe2-441c-8c8c-71466251a162
* Make bitmask tables static constblueswir12008-10-051-4/+4
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5425 c046a42c-6fe2-441c-8c8c-71466251a162
* Make struct_termios_def constblueswir12008-10-051-1/+1
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5424 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix warning about unused functionblueswir12008-10-031-0/+2
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5406 c046a42c-6fe2-441c-8c8c-71466251a162
* Include qemu-common.h in order to get prototypes for qemu_malloc etc.blueswir12008-10-021-0/+1
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5402 c046a42c-6fe2-441c-8c8c-71466251a162
* Make CPULogItem tables constblueswir12008-10-021-1/+1
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5397 c046a42c-6fe2-441c-8c8c-71466251a162
* Add inotify syscall familyaurel322008-10-011-0/+29
| | | | | | | Signed-off-by: Riku Voipio <riku.voipio@iki.fi> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5388 c046a42c-6fe2-441c-8c8c-71466251a162
* Add mincore syscallaurel322008-10-011-1/+13
| | | | | | | Signed-off-by: Riku Voipio <riku.voipio@iki.fi> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5387 c046a42c-6fe2-441c-8c8c-71466251a162
* Add fadvise64 stubsaurel322008-10-011-0/+21
| | | | | | | | | | | Since these are only hints, we happily fake them for now to make applications not barf on ENOSYS. Signed-off-by: Riku Voipio <riku.voipio@iki.fi> Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5386 c046a42c-6fe2-441c-8c8c-71466251a162
* Silence some warnings about uninitialized variablesblueswir12008-09-302-2/+3
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5362 c046a42c-6fe2-441c-8c8c-71466251a162
* TARGET_MAP_xx macros: clean and alpha specific valuesaurel322008-09-291-5/+24
| | | | | | | | | - Clean TARGET_MAP_xx macros to avoid nested #if #endif - Add alpha specific values Based on a patch by Tristan Gingold git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5356 c046a42c-6fe2-441c-8c8c-71466251a162
* Band-aid vfork() emulation (Kirill Shutemov).balrog2008-09-211-0/+4
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5279 c046a42c-6fe2-441c-8c8c-71466251a162
* Enable same-arch consistency check on x86-64, print syscall name on error.balrog2008-09-211-4/+5
| | | | | | | | Also disable testing instructions unsupported by 64-bit binutils in test-i386.c git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5277 c046a42c-6fe2-441c-8c8c-71466251a162
* Suppress gcc 4.x -Wpointer-sign (included in -Wall) warningsblueswir12008-09-203-3/+4
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5275 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix pread() and pwrite() syscall on ARM EABI (Kirill Shutemov).balrog2008-09-201-0/+8
| | | | | | | | | | | | | pread() and pwrite() have differences in arguments between ARM EABI and OABI. See arch/arm/kernel/entry-common.S in Linux kernel source for additional information. Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5272 c046a42c-6fe2-441c-8c8c-71466251a162
* Add MTIOCTOP, MTIOCGET and MTIOCPOS ioctls (Kirill Shutemov).balrog2008-09-204-0/+15
| | | | | | | Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5271 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix building with 2.6.27 kernel headers (Kirill Shutemov).balrog2008-09-201-1/+1
| | | | | | | | | <linux/dirent.h> unexported since 2.6.27 Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5270 c046a42c-6fe2-441c-8c8c-71466251a162
* Implement the futimesat() syscall (by Kirill Shutemov).balrog2008-09-201-0/+25
| | | | | | | Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5269 c046a42c-6fe2-441c-8c8c-71466251a162
* Implement fstatat64() syscall (by Kirill Shutemov).balrog2008-09-201-58/+83
| | | | | | | | | | Move the transformation of struct stat64 into a separate function and implement fstatat64() using it. Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5268 c046a42c-6fe2-441c-8c8c-71466251a162
* Swap only altered elements of the grouplist in getgroups() (Kirill Shutemov).balrog2008-09-201-2/+2
| | | | | | | | | | | getgroups() returns the number of supplementary group IDs, so it's unnessary to swap the entire array. It can dramatically speed up the syscall: on recent Linux kernels NGROUPS_MAX=65536. Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5267 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix getgroups() with zero size parameter (Kirill Shutemov).balrog2008-09-201-0/+4
| | | | | | | | | | | | According to man page getgroups(2): If size is zero, list is not modified, but the total number of supplementary group IDs for the process is returned. Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5266 c046a42c-6fe2-441c-8c8c-71466251a162
* Move offsetof to osdep.h, remove local defintions.balrog2008-09-161-4/+0
| | | | | | | | With this container_of can actually be used without causing build errors. Reformat container_of. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5234 c046a42c-6fe2-441c-8c8c-71466251a162
* qemu sh4 nptl supportaurel322008-09-152-1/+6
| | | | | | (Michael Trimarchi) git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5223 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix warnings that would be caused by gcc flag -Wwrite-stringsblueswir12008-09-142-17/+18
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5206 c046a42c-6fe2-441c-8c8c-71466251a162
* alpha: only print debug information to the log fileaurel322008-09-071-1/+0
| | | | | | Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5181 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix most warnings that would be caused by gcc flag -Wundefblueswir12008-09-062-11/+11
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5173 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix some warnings that would be generated by gcc -Wredundant-declsblueswir12008-08-306-14/+1
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5115 c046a42c-6fe2-441c-8c8c-71466251a162
OpenPOWER on IntegriCloud