[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 03/31] vl.c: daemonize before guest memory alloca
From: |
Igor Mammedov |
Subject: |
[Qemu-devel] [PATCH v2 03/31] vl.c: daemonize before guest memory allocation |
Date: |
Tue, 20 May 2014 17:15:06 +0200 |
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 processing applying/processing other options.
Signed-off-by: Igor Mammedov <address@hidden>
---
I haven't digged in kvm itself yet why EPT violation happens,
but fix on QEMU side looks trivial so it won't hurt to use it anyway.
there is simpler reporoducer without migration, start guest with
'-object memory-ram,id=foo,size=1G'
when guest is up and running hotplug dimm device using 'foo' memdev
as backend.
---
vl.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/vl.c b/vl.c
index cda6220..8fd4ed9 100644
--- a/vl.c
+++ b/vl.c
@@ -3963,6 +3963,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);
@@ -4200,8 +4202,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);
--
1.7.1
- [Qemu-devel] [PATCH v2 00/31] pc: ACPI memory hotplug, Igor Mammedov, 2014/05/20
- [Qemu-devel] [PATCH v2 01/31] pc: ACPI BIOS: use enum for defining memory affinity flags, Igor Mammedov, 2014/05/20
- [Qemu-devel] [PATCH v2 02/31] object_add: allow completion handler to get canonical path, Igor Mammedov, 2014/05/20
- [Qemu-devel] [PATCH v2 04/31] add memdev backend infrastructure, Igor Mammedov, 2014/05/20
- [Qemu-devel] [PATCH v2 03/31] vl.c: daemonize before guest memory allocation,
Igor Mammedov <=
- [Qemu-devel] [PATCH v2 06/31] pc: create custom generic PC machine type, Igor Mammedov, 2014/05/20
- [Qemu-devel] [PATCH v2 05/31] vl.c: extend -m option to support options for memory hotplug, Igor Mammedov, 2014/05/20
- Re: [Qemu-devel] [PATCH v2 05/31] vl.c: extend -m option to support options for memory hotplug, Michael S. Tsirkin, 2014/05/21
- Re: [Qemu-devel] [PATCH v2 05/31] vl.c: extend -m option to support options for memory hotplug, Andrey Korolyov, 2014/05/21
- Re: [Qemu-devel] [PATCH v2 05/31] vl.c: extend -m option to support options for memory hotplug, Igor Mammedov, 2014/05/21
- Re: [Qemu-devel] [PATCH v2 05/31] vl.c: extend -m option to support options for memory hotplug, Andrey Korolyov, 2014/05/21
- Re: [Qemu-devel] [PATCH v2 05/31] vl.c: extend -m option to support options for memory hotplug, Igor Mammedov, 2014/05/21
- Re: [Qemu-devel] [PATCH v2 05/31] vl.c: extend -m option to support options for memory hotplug, Andrey Korolyov, 2014/05/21