History | View | Annotate | Download (7.9 kB)
util: Split out exec_dir from os_find_datadir
With this change, main() calls qemu_init_exec_dir and uses argv0 toinit exec_dir. The saved value can be retrieved withqemu_get_exec_dir later. It will be reused by module loading.
Signed-off-by: Fam Zheng <famz@redhat.com>...
qemu_memalign: Allow small alignments
The functions used by qemu_memalign() require an alignment that is atleast sizeof(void*). Adjust it if it is too small.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>Reviewed-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>...
osdep: add qemu_set_tty_echo()
Using stdin with readline.c requires disabling echo and line buffering.Add a portable wrapper to set the terminal attributes under Linux andWindows.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
util: add socket_set_fast_reuse function which will replace setting SO_REUSEADDR
If a socket is closed it remains in TIME_WAIT state for some time. On operatingsystems using BSD sockets the endpoint of the socket may not be reused while inthis state unless SO_REUSEADDR was set on the socket. On windows on the other...
exec: Don't abort when we can't allocate guest memory
We abort() on memory allocation failure. abort() is appropriate forprogramming errors. Maybe most memory allocation failures areprogramming errors, maybe not. But guest memory allocation failureisn't, and aborting when the user asks for more memory than we can...
osdep: add qemu_get_local_state_pathname()
This function returns ${prefix}/var/RELATIVE_PATHNAME on POSIX-y systems,and <CSIDL_COMMON_APPDATA>/RELATIVE_PATHNAME on Win32.
http://msdn.microsoft.com/en-us/library/bb762494.aspx
[...] This folder is used for application data that is not user...
osdep, kvm: rename low-level RAM allocation functions
This is preparatory to the introduction of a separate freeing API.
Reported-by: Amos Kong <akong@redhat.com>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Reviewed-by: Amos Kong <akong@redhat.com>...
osdep: introduce qemu_anon_ram_free to free qemu_anon_ram_alloc-ed memory
We switched from qemu_memalign to mmap() but then we don't modifyqemu_vfree() to do a munmap() over free(). Which we cannot dobecause qemu_vfree() frees memory allocated by qemu_{mem,block}align....
migration: initialize RAM to zero
Using qemu_memalign only leaves the RAM zero by chance, because libcwill usually use mmap to satisfy our huge requests. But memory willnot be zero when using MALLOC_PERTURB_ with a nonzero value. In thecase of incoming migration, this breaks a recently-introduced...
oslib-posix: rename socket_set_nonblock() to qemu_set_nonblock()
The fcntl(fd, F_SETFL, O_NONBLOCK) flag is not specific to sockets.Rename to qemu_set_nonblock() just like qemu_set_cloexec().
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>Reviewed-by: Eric Blake <eblake@redhat.com>...
oslib-posix: Align to permit transparent hugepages on ARM Linux
ARM Linux (like x86-64 Linux) can use transparent hugepages forKVM if memory blocks are 2MiB aligned; set QEMU_VMALLOC_ALIGNaccordingly.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>...
bsd-user: avoid conflict with qemu_vmalloc
Rename qemu_vmalloc() to bsd_vmalloc(), adjust the only user.
Remove #ifdeffery in oslib-posix.c.
Tested-by: Andreas Färber <andreas.faerber@web.de>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
build: move libqemuutil.a components to util/
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>