summary refs log tree commit diff stats
path: root/hw/xen_machine_pv.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/xen_machine_pv.c')
-rw-r--r--hw/xen_machine_pv.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/xen_machine_pv.c b/hw/xen_machine_pv.c
index 162f88db33..abfa02c951 100644
--- a/hw/xen_machine_pv.c
+++ b/hw/xen_machine_pv.c
@@ -42,6 +42,7 @@ static void xen_init_pv(ram_addr_t ram_size,
     CPUState *env;
     DriveInfo *dinfo;
     int i;
+    static Notifier exit_notifier = { .notify = xen_config_cleanup };
 
     /* Initialize a dummy CPU */
     if (cpu_model == NULL) {
@@ -105,7 +106,7 @@ static void xen_init_pv(ram_addr_t ram_size,
     }
 
     /* config cleanup hook */
-    atexit(xen_config_cleanup);
+    exit_notifier_addr(&exit_notifier);
 
     /* setup framebuffer */
     xen_init_display(xen_domid);