From 437fd90c0250dee670290f9b714253671a990160 Mon Sep 17 00:00:00 2001 From: José Pekkarinen Date: Wed, 18 May 2016 13:18:31 +0300 Subject: These changes are the raw update to qemu-2.6. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Collission happened in the following patches: migration: do cleanup operation after completion(738df5b9) Bug fix.(1750c932f86) kvmclock: add a new function to update env->tsc.(b52baab2) The code provided by the patches was already in the upstreamed version. Change-Id: I3cc11841a6a76ae20887b2e245710199e1ea7f9a Signed-off-by: José Pekkarinen --- qemu/hw/xenpv/xen_domainbuild.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'qemu/hw/xenpv/xen_domainbuild.c') diff --git a/qemu/hw/xenpv/xen_domainbuild.c b/qemu/hw/xenpv/xen_domainbuild.c index c0ab7537d..5a9f5ac80 100644 --- a/qemu/hw/xenpv/xen_domainbuild.c +++ b/qemu/hw/xenpv/xen_domainbuild.c @@ -1,4 +1,4 @@ -#include +#include "qemu/osdep.h" #include "hw/xen/xen_backend.h" #include "xen_domainbuild.h" #include "qemu/timer.h" @@ -174,12 +174,15 @@ static int xen_domain_watcher(void) for (i = 3; i < n; i++) { if (i == fd[0]) continue; - if (i == xc_fd(xen_xc)) { - continue; - } close(i); } + /* + * Reopen xc interface, since the original is unsafe after fork + * and was closed above. + */ + xen_xc = xc_interface_open(0, 0, 0); + /* ignore term signals */ signal(SIGINT, SIG_IGN); signal(SIGTERM, SIG_IGN); @@ -234,7 +237,7 @@ int xen_domain_build_pv(const char *kernel, const char *ramdisk, int rc; memcpy(uuid, qemu_uuid, sizeof(uuid)); - rc = xc_domain_create(xen_xc, ssidref, uuid, flags, &xen_domid); + rc = xen_domain_create(xen_xc, ssidref, uuid, flags, &xen_domid); if (rc < 0) { fprintf(stderr, "xen: xc_domain_create() failed\n"); goto err; -- cgit 1.2.3-korg