History | View | Annotate | Download (4 kB)
Remove unused sysemu.h include directives
Remove unused sysemu.h include directives to speed up buildwith the following patches.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Remove unncessary includes
No need to include stdlib.h for BSD as it is included byqemu-common.h, windows.h is handled by sysemu.h and osdep.c no longerneeds malloc.h
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Separate qemu_pidfile() into OS specific versions
Move qemu_gettimeofday() to OS specific files
qemu_pipe() is used only by POSIX code, so move to oslib-posix.c
We only support eventfd under POSIX, move qemu_eventfd() to os-posix.c
Move QEMU OS dependant library functions to OS specific files
This moves library functions used by both QEMU and the QEMU tools,such as qemu-img, qemu-nbd etc. from osdep.c to oslib-{posix,win32}.c
In addition it introduces oslib-obj.y to the Makefile set to be...
Move osdep socket code to oslib-{posix,win32}.c
Introduce qemu_madvise()
vl.c has a Sun-specific hack to supply a prototype for madvise(),but the call site has apparently moved to arch_init.c.
Haiku doesn't implement madvise() in favor of posix_madvise().OpenBSD and Solaris 10 don't implement posix_madvise() but madvise()....
trace: Trace qemu_malloc() and qemu_vmalloc()
It is often useful to instrument memory management functions in order tofind leaks or performance problems. This patch adds trace events forthe memory allocation primitives.
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
win32: Add missing function ffs
mingw32 does not include function ffs.
Commit c6d29ad6e24533cc3762e1d654275607e1d03058 added adeclaration for ffs, but an implementation was missing.
For compilations with optimization, the compiler createsinline code, so the implementation is not always needed....
documentation: qemu_write_full don't work with non-blocking fd's
Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Fix qemu_eventfd compile when !CONFIG_EVENTFD
Signed-off-by: Avi Kivity <avi@redhat.com>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
use eventfd for iothread
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Avi Kivity <avi@redhat.com>
fix placement of config-host.h inclusion
The #ifdef CONFIG_SOLARIS below was useless without this patch.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Tell users about out-of-memory errors
Aborting without an error message when memory is shortis not helpful, so print the reason for the abort.
Try qemu -m 1000000or qemu -m 2000 (win32)
to force an out-of-memory error.
Introduce qemu_write_full()
A variant of write(2) which handles partial write.
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
osdep.c: Fix accept4 fallback
Commit 3a03bfa5 added a fallback in case the Linux kernel running qemu is olderthan the kernel of the build system. Unfortunately, v1 was committed instead ofv2, so the code has a bug that was revealed in the review (checking for the...
fix pidfile option to work in WIN32
Explicit read/write locking pidfile under WIN32 is bit extremenobody get the chance to read the pidfile. Convert to a write-only lock.
Also, creating pidfile was disabled along with daemonize underWIN32. Enable it, but do not enable daemon support which doesn't...
osdep: Fix runtime failure on older Linux kernels
If QEMU finds newer kernel header files on compilation time, it will useadvertised features like pipe2 or SOCK_CLOEXEC by just doing a compile test.If later the executables are executed on an older kernel (<2.6.27,...
Don't leak file descriptors
We're leaking file descriptors to child processes. Set FD_CLOEXEC on filedescriptors that don't need to be passed to children to stop this misbehaviour.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Add #defines needed by OpenSolaris, fix breakage by the #defines
We need to define XOPEN_SOURCE and EXTENSIONS macros in order to getCMSG and TIOCWIN macros defined. But then _POSIX_C_SOURCE gets defined, whichis (incorrectly) used as an indicator for existence of posix_memalign() in osdep.c....
Unbreak large mem support by removing kqemu
kqemu introduces a number of restrictions on the i386 target. The worst is thatit prevents large memory from working in the default build.
Furthermore, kqemu is fundamentally flawed in a number of ways. It relies on...
Only build osdep once
We no longer need hackery to work around kqemu
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
rename HOST_BSD to CONFIG_BSD
change HOST_SOLARIS to CONFIG_SOLARIS{_VERSION}
Add out of memory and zero size argument checks to be consistent withthe qemu_malloc routines
Add tool_osdep.c
osdep.c is built in both as a toplevel target independant object, andas a per-target object because of kqemu dependencies. Under somecircumstances make picks up the wrong one.
Build the former as tool-osdep to avoid this conflict.
Signed-off-by: Paul Brook <paul@codesourcery.com>
kqemu: merge CONFIG_KQEMU and USE_KQEMU
Basically a recursive ":%s/USE_KQEMU/CONFIG_KQEMU/g".
Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7189 c046a42c-6fe2-441c-8c8c-71466251a162
Fix windows build and clean up use of <windows.h>
We want to globally define WIN_LEAN_AND_MEAN and WINVER to particular values solet's do it in OS_CFLAGS.
Then, we can pepper in windows.h includes where using #includes that require it.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>...
Rename _BSD to HOST_BSD so that it's more obvious that it's defined by configure
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6775 c046a42c-6fe2-441c-8c8c-71466251a162
Support for DragonFly BSD (Hasso Tepper)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6746 c046a42c-6fe2-441c-8c8c-71466251a162
Fix BSD breakage from r6736
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6742 c046a42c-6fe2-441c-8c8c-71466251a162
Sparse fixes: NULL use, header order, ANSI prototypes, static
Fix Sparse warnings: * use NULL instead of plain 0 * rearrange header include order to avoid redefining types accidentally * ANSIfy SLIRP * avoid "restrict" keyword * add static
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6736 c046a42c-6fe2-441c-8c8c-71466251a162
Remove redundant #ifdef _BSD
since _BSD if already handled in osdep.c:qemu_memalign(), we don't need tocheck it in the calling function again. getpagesize() is available in BSD.
Signed-off-by: Andre Przywara <andre.przywara@amd.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5983 c046a42c-6fe2-441c-8c8c-71466251a162
Use MAP_ANON also for FreeBSD (Juergen Lock)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5778 c046a42c-6fe2-441c-8c8c-71466251a162
Use qemu_memalign instead of memalign in qemu_vmalloc
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5730 c046a42c-6fe2-441c-8c8c-71466251a162
Fix -linux-user build by reverting r5701
Unfortunately, -linux-user doesn't use osdep as it replaces some of thosefunctions with specific ones. The code #ifdef code in exec.c needs toremain in place so instead of introducing a qemu_getpagesize() let's just...
Allocate guest memory on host page boundaries (Hollis Blanchard)
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5702 c046a42c-6fe2-441c-8c8c-71466251a162
Define OS-dependent qemu_getpagesize() (Hollis Blanchard)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5701 c046a42c-6fe2-441c-8c8c-71466251a162
Use common objects for qemu-img and qemu-nbd
Right now, we sprinkle #if defined(QEMU_IMG) && defined(QEMU_NBD) all over thecode. It's ugly and causes us to have to build multiple object files forlinking against qemu and the tools.
This patch introduces a new file, qemu-tool.c which contains enough for...
Preliminary OpenBSD host support (based on OpenBSD patches by Todd T. Fries)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5012 c046a42c-6fe2-441c-8c8c-71466251a162
Use correct types to enable > 2G support, based on a patch fromAnthony Liguori.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4265 c046a42c-6fe2-441c-8c8c-71466251a162
Revert "Use correct types to enable > 2G support" (r4238), it isnot yet ready.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4240 c046a42c-6fe2-441c-8c8c-71466251a162
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4238 c046a42c-6fe2-441c-8c8c-71466251a162
Use "mount -o remount" instead of "umount" and "mount /dev/shm",which results in emptying this virtual file system.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4228 c046a42c-6fe2-441c-8c8c-71466251a162
Remove osdep.c/qemu-img code duplication
(Kevin Wolf)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4191 c046a42c-6fe2-441c-8c8c-71466251a162
Add "cache" parameter to "-drive" (Laurent Vivier).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3848 c046a42c-6fe2-441c-8c8c-71466251a162
Use WIN32_LEAN_AND_MEAN, by Stefan Weil.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3832 c046a42c-6fe2-441c-8c8c-71466251a162
Add statics and missing #includes for prototypes.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3683 c046a42c-6fe2-441c-8c8c-71466251a162
Break up vl.h.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3674 c046a42c-6fe2-441c-8c8c-71466251a162
find -type f | xargs sed -i 's/[\t ]$//g' # on most files
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3173 c046a42c-6fe2-441c-8c8c-71466251a162
Windows build fixes.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2959 c046a42c-6fe2-441c-8c8c-71466251a162
qemu_create_pidfile implementation for Win32, based on a patch byCarlos O'Donell.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2540 c046a42c-6fe2-441c-8c8c-71466251a162
Kqemu support for Solaris, by Ben Taylor.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2329 c046a42c-6fe2-441c-8c8c-71466251a162
fd leak fix (Igor Kovalenko)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2118 c046a42c-6fe2-441c-8c8c-71466251a162
removed unused code
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2080 c046a42c-6fe2-441c-8c8c-71466251a162
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2072 c046a42c-6fe2-441c-8c8c-71466251a162
Only use /dev/shm hack when kqemu is enabled.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1930 c046a42c-6fe2-441c-8c8c-71466251a162
informative message about low memory on /dev/shm
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1388 c046a42c-6fe2-441c-8c8c-71466251a162
windows support for kqemu (Filip Navara)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1366 c046a42c-6fe2-441c-8c8c-71466251a162
win32 + Mac OS X compile fix
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1304 c046a42c-6fe2-441c-8c8c-71466251a162
shared pages memory allocation
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1279 c046a42c-6fe2-441c-8c8c-71466251a162
use the kernel sigaction syscall to avoid relying on glibc one
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1044 c046a42c-6fe2-441c-8c8c-71466251a162
added qemu_strdup()
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1021 c046a42c-6fe2-441c-8c8c-71466251a162
fixing free
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@707 c046a42c-6fe2-441c-8c8c-71466251a162
win32 port (initial patch by kazu)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@692 c046a42c-6fe2-441c-8c8c-71466251a162
added qemu_mallocz()
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@660 c046a42c-6fe2-441c-8c8c-71466251a162
added OS dependent functions (temporary as most functions are generic in fact)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@624 c046a42c-6fe2-441c-8c8c-71466251a162