summaryrefslogtreecommitdiffstats
path: root/vl.c
diff options
context:
space:
mode:
authorPeter Maydell2014-09-30 14:09:39 +0200
committerPeter Maydell2014-09-30 14:09:40 +0200
commit2e456b2b606aef488de27f8212e22382141fa022 (patch)
tree39184cd190bedef458e5d9c698e9915ea49932b0 /vl.c
parentMerge remote-tracking branch 'remotes/rth/tags/tcg-next-201400729' into staging (diff)
parentvl: Adjust the place of calling mlockall to speedup VM's startup (diff)
downloadqemu-2e456b2b606aef488de27f8212e22382141fa022.tar.gz
qemu-2e456b2b606aef488de27f8212e22382141fa022.tar.xz
qemu-2e456b2b606aef488de27f8212e22382141fa022.zip
Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging
pci, pc, virtio, misc bugfixes A bunch of bugfixes. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> # gpg: Signature made Mon 29 Sep 2014 17:59:57 BST using RSA key ID D28D5469 # gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>" # gpg: aka "Michael S. Tsirkin <mst@redhat.com>" * remotes/mst/tags/for_upstream: vl: Adjust the place of calling mlockall to speedup VM's startup pc-dimm: Don't check dimm->node when there is non-NUMA config pci-hotplug-old: avoid losing error message Revert "virtio-pci: fix migration for pci bus master" loader: g_realloc(p, 0) frees and returns NULL, simplify Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/vl.c b/vl.c
index dbdca594b7..9d2aaaf1dc 100644
--- a/vl.c
+++ b/vl.c
@@ -134,6 +134,7 @@ const char* keyboard_layout = NULL;
ram_addr_t ram_size;
const char *mem_path = NULL;
int mem_prealloc = 0; /* force preallocation of physical target memory */
+bool enable_mlock = false;
int nb_nics;
NICInfo nd_table[MAX_NICS];
int autostart;
@@ -1421,12 +1422,8 @@ static void smp_parse(QemuOpts *opts)
}
-static void configure_realtime(QemuOpts *opts)
+static void realtime_init(void)
{
- bool enable_mlock;
-
- enable_mlock = qemu_opt_get_bool(opts, "mlock", true);
-
if (enable_mlock) {
if (os_mlock() < 0) {
fprintf(stderr, "qemu: locking memory failed\n");
@@ -3974,7 +3971,7 @@ int main(int argc, char **argv, char **envp)
if (!opts) {
exit(1);
}
- configure_realtime(opts);
+ enable_mlock = qemu_opt_get_bool(opts, "mlock", true);
break;
case QEMU_OPTION_msg:
opts = qemu_opts_parse(qemu_find_opts("msg"), optarg, 0);
@@ -4442,6 +4439,8 @@ int main(int argc, char **argv, char **envp)
machine_class->init(current_machine);
+ realtime_init();
+
audio_init();
cpu_synchronize_all_post_init();