[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 004/103] vl.c: daemonize before guest memory allocati
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL 004/103] vl.c: daemonize before guest memory allocation |
Date: |
Tue, 17 Jun 2014 20:36:27 +0300 |
From: Igor Mammedov <address@hidden>
memory allocated for guest before QEMU is daemonized and then mapped
later in guest's address space after it is daemonized, leads to EPT
violation and QEMU aborts.
To avoid this and similar issues switch to daemonized mode early
before applying/processing other options.
Signed-off-by: Igor Mammedov <address@hidden>
Acked-by: Peter Crosthwaite <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
---
vl.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/vl.c b/vl.c
index 47d4a11..f6f9ec5 100644
--- a/vl.c
+++ b/vl.c
@@ -3965,6 +3965,8 @@ int main(int argc, char **argv, char **envp)
}
loc_set_none();
+ os_daemonize();
+
if (qemu_init_main_loop()) {
fprintf(stderr, "qemu_init_main_loop failed\n");
exit(1);
@@ -4206,8 +4208,6 @@ int main(int argc, char **argv, char **envp)
}
#endif
- os_daemonize();
-
if (pid_file && qemu_create_pidfile(pid_file) != 0) {
os_pidfile_error();
exit(1);
--
MST
- [Qemu-devel] [PULL 000/103] pc, pci, virtio, hotplug fixes, enhancements for 2.1, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 001/103] pc: create custom generic PC machine type, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 003/103] object_add: allow completion handler to get canonical path, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 004/103] vl.c: daemonize before guest memory allocation,
Michael S. Tsirkin <=
- [Qemu-devel] [PULL 005/103] add memdev backend infrastructure, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 006/103] vl.c: extend -m option to support options for memory hotplug, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 007/103] qdev: hotplug for buss-less devices, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 002/103] pc: ACPI BIOS: use enum for defining memory affinity flags, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 008/103] qdev: expose DeviceState.hotplugged field as a property, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 011/103] pc-dimm: do not allow to set already used memdev, Michael S. Tsirkin, 2014/06/17