summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* __thread should be before real typeJuan Quintela2009-09-251-1/+1
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Fix Sparse warnings: add "static"Blue Swirl2009-09-051-1/+1
| | | | Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* linux-user: Rewrite mmap_find_vma() to work fine on 64-bit hosts with 32-bit ↵Kirill A. Shutemov2009-08-251-36/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | targets qemu's page table can be incomple if /proc/self/maps is unavailable or host allocating a memory with mmap(), so we can't use it to find free memory area. New version mmap_find_vma() uses mmap() without MAP_FIXED to find free memory. Tested-by: Martin Mohring <martin.mohring@opensuse.org> : quite some time ago this patch had been sent by Kirill to the QEMU ml. At that time, the patch was rejected. Now we found out why the current user mode memory allocator sometimes fails: - Kernel Bug linux/fs/proc/task_mmu.c (fixed after 2.6.27) http://bugzilla.kernel.org/attachment.cgi?id=17219 - use of proc file system to find memory mappings => bad idea So I please apply the attached patch from Kirill to qemu to fix this longstanding bug, because it causes all older linux distros (using kernel 2.6.26 or older) to fail the QEMU memory allocator in user mode. Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name> Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
* rename USE_NPTL to CONFIG_USE_NPTLJuan Quintela2009-07-271-1/+1
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Fix most warnings (errors with -Werror) when debugging is enabledBlue Swirl2009-07-201-7/+9
| | | | | | | I used the following command to enable debugging: perl -p -i -e 's/^\/\/#define DEBUG/#define DEBUG/g' * */* */*/* Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Update to a hopefully more future proof FSF addressBlue Swirl2009-07-161-3/+1
| | | | Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* linux-user: initialize mmap_mutex properlyNathan Froyd2009-06-161-1/+1
| | | | | | | | We initialize mmap_mutex in any child threads/processes, but we need to correctly statically initialize it for the original process. Signed-off-by: Nathan Froyd <froydnj@codesourcery.com> Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
* export mmap_find_vma for shmatRiku Voipio2009-06-161-1/+1
| | | | Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
* Partialy fix mmap at EOF for large pagesize targets in user-mode.edgar_igl2009-02-031-2/+37
| | | | | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6510 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix qemu_malloc.malc2009-01-281-0/+2
| | | | | | | make {linux,bsd}-user qemu_realloc handle ptr == NULL correctly. spotted by malc. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6466 c046a42c-6fe2-441c-8c8c-71466251a162
* linux-user: add qemu_realloc() implementation to unbreak the build (Gerd ↵aliguori2009-01-231-0/+13
| | | | | | | | | | Hoffman) Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6412 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix more FSF addressesblueswir12009-01-051-1/+2
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6192 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix mremap, based on patch by Kirill A. Shutemovblueswir12008-12-151-8/+11
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6056 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix compiling without MREMAP_FIXEDblueswir12008-12-111-1/+4
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5979 c046a42c-6fe2-441c-8c8c-71466251a162
* linux-user: mremap(): handle MREMAP_FIXED and MREMAP_MAYMOVE correctlyaurel322008-12-081-6/+28
| | | | | | | | Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name> Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5959 c046a42c-6fe2-441c-8c8c-71466251a162
* linux-user: mmap: add check if requested memory area fits target address spaceaurel322008-12-081-0/+10
| | | | | | | | Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name> Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5958 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
* Prevent guest reusing host memory allocations.pbrook2008-06-091-0/+46
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4710 c046a42c-6fe2-441c-8c8c-71466251a162
* Multithreaded locking fixes.pbrook2008-06-071-0/+16
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4692 c046a42c-6fe2-441c-8c8c-71466251a162
* Multithreaded locking for mmap().pbrook2008-06-021-27/+73
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4654 c046a42c-6fe2-441c-8c8c-71466251a162
* Mark host brk() area as reserved.pbrook2008-05-311-0/+16
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4637 c046a42c-6fe2-441c-8c8c-71466251a162
* Teach mmap to not overwrite reserved pages and fix brk return value (Richard ↵balrog2008-04-261-1/+12
| | | | | | Purdie). git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4255 c046a42c-6fe2-441c-8c8c-71466251a162
* Cope with arch-specific page protection flags in mmap (Richard Purdie).balrog2008-04-241-2/+1
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4250 c046a42c-6fe2-441c-8c8c-71466251a162
* Use TARGET_FMT_lx.edgar_igl2008-03-141-2/+1
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4061 c046a42c-6fe2-441c-8c8c-71466251a162
* Mark host pages as reserved (Magnus Damm).balrog2007-12-121-1/+1
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3813 c046a42c-6fe2-441c-8c8c-71466251a162
* fixed target_mmap() if host page size < TARGET_PAGE_SIZEbellard2007-11-141-138/+126
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3642 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix compiler warnings, by Stefan Weil.ths2007-11-021-21/+23
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3507 c046a42c-6fe2-441c-8c8c-71466251a162
* Support for 32 bit ABI on 64 bit targets (only enabled Sparc64)blueswir12007-10-141-19/+19
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3396 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix mmap to handle differing host/target page sizes, by Edgar E. Iglesias.ths2007-09-301-37/+65
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3291 c046a42c-6fe2-441c-8c8c-71466251a162
* memset string pages to zero to avoid putting random data on the stackj_mayer2007-09-271-3/+3
| | | | | | | | | that may make some program crash at startup. Fix unsigned long / target_ulong confusion (more to do). Fix missing g2h macros. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3249 c046a42c-6fe2-441c-8c8c-71466251a162
* find -type f | xargs sed -i 's/[\t ]*$//g' # Yes, again. Note the star in ↵ths2007-09-171-9/+9
| | | | | | the regex. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3177 c046a42c-6fe2-441c-8c8c-71466251a162
* find -type f | xargs sed -i 's/[\t ]$//g' # on most filesths2007-09-161-24/+24
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3173 c046a42c-6fe2-441c-8c8c-71466251a162
* Add __mips__to mmap specialcase.ths2007-06-031-3/+3
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2932 c046a42c-6fe2-441c-8c8c-71466251a162
* ColdFire target.pbrook2006-10-221-1/+1
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2196 c046a42c-6fe2-441c-8c8c-71466251a162
* Avoid accessing guest memory directly in usermode emulation.pbrook2006-03-251-76/+88
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1790 c046a42c-6fe2-441c-8c8c-71466251a162
* Make target_mmap always return -1 on failure.pbrook2006-02-041-6/+12
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1741 c046a42c-6fe2-441c-8c8c-71466251a162
* ia64 host support (David Mosberger)bellard2005-04-071-2/+4
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1360 c046a42c-6fe2-441c-8c8c-71466251a162
* Darwin patch (initial patch by Pierre d'Herbemont)bellard2004-07-051-28/+28
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@980 c046a42c-6fe2-441c-8c8c-71466251a162
* amd64 port (Jocelyn Mayer)bellard2004-04-261-2/+7
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@762 c046a42c-6fe2-441c-8c8c-71466251a162
* initial x86-64 host support (Gwenole Beauchesne)bellard2004-03-171-1/+1
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@670 c046a42c-6fe2-441c-8c8c-71466251a162
* avoid unaligned file offset in anonymous mappingbellard2003-06-091-2/+7
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@215 c046a42c-6fe2-441c-8c8c-71466251a162
* alpha fixbellard2003-06-051-0/+6
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@207 c046a42c-6fe2-441c-8c8c-71466251a162
* fixed small page handlingbellard2003-05-131-6/+17
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@160 c046a42c-6fe2-441c-8c8c-71466251a162
* mmap emulationbellard2003-05-131-0/+370
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@158 c046a42c-6fe2-441c-8c8c-71466251a162