[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL v2 004/106] vl.c: daemonize before guest memory alloc
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL v2 004/106] vl.c: daemonize before guest memory allocation |
Date: |
Wed, 18 Jun 2014 19:15:37 +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 9ce65fc..16418ec 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 v2 000/106] pc, pci, virtio, hotplug fixes, enhancements, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 001/106] pc: create custom generic PC machine type, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 002/106] pc: ACPI BIOS: use enum for defining memory affinity flags, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 003/106] object_add: allow completion handler to get canonical path, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 004/106] vl.c: daemonize before guest memory allocation,
Michael S. Tsirkin <=
- [Qemu-devel] [PULL v2 005/106] add memdev backend infrastructure, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 007/106] qdev: hotplug for bus-less devices, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 009/106] pc: implement pc-dimm device abstraction, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 011/106] pc-dimm: do not allow setting an in-use memdev, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 010/106] memory: add memory_region_is_mapped() API, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 012/106] pc: initialize memory hotplug address space, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 014/106] pc: add 'etc/reserved-memory-end' fw_cfg interface for SeaBIOS, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 018/106] pc-dimm: add busy slot check and slot auto-allocation, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 021/106] trace: add acpi memory hotplug IO region events, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 022/106] trace: pc: add PC_DIMM slot & address allocation, Michael S. Tsirkin, 2014/06/18