Statistics
| Branch: | Revision:

root / os-posix.c @ feature-archipelago

History | View | Annotate | Download (7.8 kB)

# Date Author Comment
10f5bff6 02/20/2014 02:12 pm Fam Zheng

util: Split out exec_dir from os_find_datadir

With this change, main() calls qemu_init_exec_dir and uses argv0 to
init exec_dir. The saved value can be retrieved with
qemu_get_exec_dir later. It will be reused by module loading.

Signed-off-by: Fam Zheng <>...

888a6bc6 04/22/2013 04:52 pm Satoru Moriya

Add option to mlock qemu and guest memory

In certain scenario, latency induced by paging is significant and
memory locking is needed. Also, in the scenario with untrusted
guests, latency improvement due to mlock is desired.

This patch introduces a following new option to mlock guest and...

9c17d615 12/19/2012 09:32 am Paolo Bonzini

softmmu: move include files to include/sysemu/

Signed-off-by: Paolo Bonzini <>

048d3612 10/06/2012 07:54 pm Aurelien Jarno

Merge branch 'trivial-patches' of git://github.com/stefanha/qemu

  • 'trivial-patches' of git://github.com/stefanha/qemu:
    versatilepb: Use symbolic indices for ARM PIC
    qdev: kill bogus comment
    qemu-barrier: Fix compiler version check for future gcc versions...
4d5b97da 10/05/2012 04:10 pm Amos Kong

cleanup useless return sentence

This patch cleans up return sentences in the end of void functions.

Reported-by: Paolo Bonzini <>
Signed-off-by: Amos Kong <>
Signed-off-by: Stefan Hajnoczi <>

3eadc68e 10/05/2012 03:58 pm Jim Meyering

os-posix: avoid buffer overrun

os_set_proc_name: Use pstrcpy, in place of strncpy and the
ineffectual preceding assignment: name[sizeof(name) - 1] = 0;

Signed-off-by: Jim Meyering <>
Signed-off-by: Anthony Liguori <>

995ee2bf 09/23/2012 09:11 am Hitoshi Mitake

curses: don't initialize curses when qemu is daemonized

Current qemu initializes curses even if -daemonize option is
passed. This cause problem because shell prompt appears without
calling endwin().

This patch adds new function, is_daemonized(), to OS dependent...

70678b82 08/04/2012 02:28 am Anthony Liguori

fips: fix build on !Linux

Commit 0f66998 makes -enable-fips conditional on Linux hosts but then uses it
unconditionally in vl.c.

Fix this by moving the fips handling to os-posix.c and adding a condition.

Cc: Paul Moore <>
Signed-off-by: Anthony Liguori <>

15fdaee3 04/26/2012 09:14 pm Nathan Whitehorn

os-posix: Fix build on FreeBSD

Add an include for a header required to build on recent FreeBSD.

Signed-off-by: Nathan Whitehorn <>
Signed-off-by: Andreas Frber <>
Signed-off-by: Anthony Liguori <>

93dd748b 02/02/2012 12:23 am Laszlo Ersek

keep the PID file locked for the lifetime of the process

The lockf() call in qemu_create_pidfile() aims at ensuring mutual
exclusion. We shouldn't close the pidfile on success (as introduced by
commit 1bbd1592), because that drops the lock as well [1]:

"File locks shall be released on first close by the locking process...
cbcfa041 12/22/2011 12:53 pm Paolo Bonzini

link the main loop and its dependencies into the tools

Using the main loop code from QEMU enables tools to operate fully
asynchronously. Advantages include better Windows portability (for some
definition of portability) over glib's.

Signed-off-by: Paolo Bonzini <>

1bbd1592 11/11/2011 08:49 pm Markus Armbruster

os-posix: Plug fd leak in qemu_create_pidfile()

Spotted by Coverity.

Signed-off-by: Markus Armbruster <>
Signed-off-by: Anthony Liguori <>

7267c094 08/21/2011 07:01 am Anthony Liguori

Use glib memory allocation and free functions

qemu_malloc/qemu_free no longer exist after this commit.

Signed-off-by: Anthony Liguori <>

cc4662f9 07/13/2011 12:41 am Stefan Hajnoczi

os-posix: set groups properly for -runas

Andrew Griffiths reports that -runas does not set supplementary group
IDs. This means that gid 0 (root) is not dropped when switching to an
unprivileged user.

Add an initgroups(3) call to use the -runas user's /etc/groups...

953ffe0f 06/15/2011 10:58 pm Andreas Färber

Introduce format string for pid_t

BeOS and Haiku on i386 use long for 32-bit types, including pid_t.
Using %d with pid_t therefore results in a warning.

Unfortunately POSIX:2008 does not define a PRId* string for pid_t.

In some places pid_t was previously casted to long and %ld hardcoded....

4d54ec78 03/29/2011 04:14 pm Paolo Bonzini

add a service to reap zombies, use it in SLIRP

SLIRP -smb support wants to fork a process and forget about reaping it.
To please it, add a generic service to register a process id and let
QEMU reap it. In the future it could be enhanced to pass a status,...

f64622c4 03/26/2011 02:54 pm Gleb Natapov

report that QEMU process was killed by a signal

Currently when rogue script kills QEMU process (using TERM/INT/HUP
signal) it looks indistinguishable from system shutdown. Lets report
that QEMU was killed and leave some clues about the killer identity.

Signed-off-by: Gleb Natapov <>...

dc7a09cf 03/16/2011 10:11 pm Jan Kiszka

Expose thread_id in info cpus

Based on patch by Glauber Costa:

To allow management applications like libvirt to apply CPU affinities to
the VCPU threads, expose their ID via info cpus. This patch provides the
pre-existing and used interface from qemu-kvm....

bc4a957c 10/30/2010 11:02 am Jes Sorensen

Separate qemu_pidfile() into OS specific versions

Signed-off-by: Jes Sorensen <>
Signed-off-by: Blue Swirl <>

949d31e6 10/30/2010 11:02 am Jes Sorensen

We only support eventfd under POSIX, move qemu_eventfd() to os-posix.c

Signed-off-by: Jes Sorensen <>
Signed-off-by: Blue Swirl <>

66fe09ee 08/21/2010 12:03 am Blue Swirl

Use ARRAY_SIZE macro

Replace array size calculations with ARRAY_SIZE macro.

Implemented with this Coccinelle semantic patch, adapted from
Linux kernel:
@
type T;
T[] E;
@

- (sizeof(E)/sizeof(*E))
+ ARRAY_SIZE(E)

@
type T;
T[] E;
@

- (sizeof(E)/sizeof(E[...]))...

69e8b162 07/06/2010 04:53 pm Jes Sorensen

Include sys/mman.h before qemu-options.h

The result of parsing qemu-options.def depends on whehter or not
MAP_POPULATE is defined, so make sure to include sys/mman.h before
including qemu-options.h.

Reported by Frank Arnold.

Signed-off-by: Jes Sorensen <>...

59a5264b 06/12/2010 08:49 am Jes Sorensen

Introduce OS specific cmdline argument handling and move SMB arg to os-posix.c

Introduce OS specific cmdline argument handling by calling
os_parse_cmd_args() at the end of switch() statement. Move option
enum to qemu-options.h and have it included from os-posix.c and...

8847cfe8 06/12/2010 08:49 am Jes Sorensen

Move runas handling from vl.c to OS specific files.

Move code to handle runas, ie. change of user id of QEMU process
to OS specific files and provide dummy stub for Win32.

Signed-off-by: Jes Sorensen <>
Acked-by: Juan Quintela <>...

0766379d 06/12/2010 08:49 am Jes Sorensen

Move chroot handling to OS specific files.

Move chroot handling to OS specific files.

Signed-off-by: Jes Sorensen <>
Acked-by: Juan Quintela <>
Acked-by: Richard Henderson <>
Signed-off-by: Blue Swirl <>

eb505be1 06/12/2010 08:49 am Jes Sorensen

Move daemonize handling to OS specific files

Move daemonize handling from vl.c to OS specific files. Provide dummy
stubs for Win32.

Signed-off-by: Jes Sorensen <>
Acked-by: Juan Quintela <>
Acked-by: Richard Henderson <>...

e06eb601 06/12/2010 08:49 am Jes Sorensen

Make os_change_process_uid and os_change_root os-posix.c local

os_change_process_uid() and os_change_root() are now only called
from os-posix.c, so no need to keep win32 stubs for them.

Signed-off-by: Jes Sorensen <>
Acked-by: Juan Quintela <>...

9156d763 06/12/2010 08:49 am Jes Sorensen

Move line-buffering setup to OS specific files.

Move line-buffering setup to OS specific files.

Signed-off-by: Jes Sorensen <>
Acked-by: Juan Quintela <>
Acked-by: Richard Henderson <>
Signed-off-by: Blue Swirl <>

ce798cf2 06/12/2010 08:49 am Jes Sorensen

Move set_proc_name() to OS specific files.

Move handling to change process name to POSIX specific files
plus add a better error message to cover the case where the
feature isn't supported.

Signed-off-by: Jes Sorensen <>
Acked-by: Juan Quintela <>...

86b645e7 06/12/2010 08:49 am Jes Sorensen

Introduce os-posix.c and create os_setup_signal_handling()

Introcuce os-posix.c and move posix specific signal handling
there.

Signed-off-by: Jes Sorensen <>
Acked-by: Juan Quintela <>
Acked-by: Richard Henderson <>...

fe98ac14 06/12/2010 08:49 am Jes Sorensen

Rename os_setup_signal_handling() to os_setup_early_signal_handling()

Rename os_setup_signal_handling() to os_setup_early_signal_handling()

Signed-off-by: Jes Sorensen <>
Acked-by: Juan Quintela <>
Acked-by: Richard Henderson <>...

8d963e6a 06/12/2010 08:49 am Jes Sorensen

Move main signal handler setup to os specificfiles.

Move main signal handler setup to os specific files.

Signed-off-by: Jes Sorensen <>
Acked-by: Juan Quintela <>
Acked-by: Richard Henderson <>
Signed-off-by: Blue Swirl <>

6170540b 06/12/2010 08:49 am Jes Sorensen

Move find_datadir to OS specific files.

This moves the win32 and POSIX versions of find_datadir() to OS
specific files, and removes some #ifdef clutter from vl.c

Signed-off-by: Jes Sorensen <>
Acked-by: Juan Quintela <>...