From ca881773dc8b6b41047a01032758dcccef9cb3dcbca2ec326151f3644158d47b Mon Sep 17 00:00:00 2001 From: Charles Arnold Date: Fri, 25 Sep 2009 21:48:45 +0000 Subject: [PATCH] - Add temporary workaround for race between xend writing and qemu-dm reading from xenstore. The issue is preventing PV domUs from booting as they have no backend console. qemu-retry-be-status.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=19 --- qemu-retry-be-status.patch | 40 ++++++++++++++++++++++++++++++++++++++ xen.changes | 8 ++++++++ xen.spec | 2 ++ 3 files changed, 50 insertions(+) create mode 100644 qemu-retry-be-status.patch diff --git a/qemu-retry-be-status.patch b/qemu-retry-be-status.patch new file mode 100644 index 0000000..a215846 --- /dev/null +++ b/qemu-retry-be-status.patch @@ -0,0 +1,40 @@ +Index: xen-3.4.1-testing/tools/ioemu-remote/hw/xen_backend.c +=================================================================== +--- xen-3.4.1-testing.orig/tools/ioemu-remote/hw/xen_backend.c ++++ xen-3.4.1-testing/tools/ioemu-remote/hw/xen_backend.c +@@ -377,8 +377,12 @@ static int xen_be_try_init(struct XenDev + int rc = 0; + + if (!xendev->online) { +- xen_be_printf(xendev, 1, "not online\n"); +- return -1; ++ sleep(3); ++ xenstore_read_be_int(xendev, "online", &xendev->online); ++ if (!xendev->online) { ++ xen_be_printf(xendev, 1, "not online\n"); ++ return -1; ++ } + } + + if (xendev->ops->init) +Index: xen-3.4.1-testing/tools/ioemu-remote/hw/xen_console.c +=================================================================== +--- xen-3.4.1-testing.orig/tools/ioemu-remote/hw/xen_console.c ++++ xen-3.4.1-testing/tools/ioemu-remote/hw/xen_console.c +@@ -196,9 +196,14 @@ static int con_init(struct XenDevice *xe + + type = xenstore_read_str(con->console, "type"); + if (!type || 0 != strcmp(type, "ioemu")) { +- xen_be_printf(xendev, 1, "not for me (type=%s)\n", type); +- return -1; ++ sleep(3); ++ type = xenstore_read_str(con->console, "type"); ++ if (!type || 0 != strcmp(type, "ioemu")) { ++ xen_be_printf(xendev, 1, "not for me (type=%s)\n", type); ++ return -1; ++ } + } ++ qemu_free(type); + + if (!serial_hds[con->xendev.dev]) + xen_be_printf(xendev, 1, "WARNING: serial line %d not configured\n", diff --git a/xen.changes b/xen.changes index 10a35cc..a3a5c03 100644 --- a/xen.changes +++ b/xen.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Fri Sep 25 15:08:12 MDT 2009 - jfehlig@novell.com + +- Add temporary workaround for race between xend writing and + qemu-dm reading from xenstore. The issue is preventing PV + domUs from booting as they have no backend console. + qemu-retry-be-status.patch + ------------------------------------------------------------------- Tue Sep 15 09:32:59 MDT 2009 - jfehlig@novell.com diff --git a/xen.spec b/xen.spec index 7d8c942..dcd70ed 100644 --- a/xen.spec +++ b/xen.spec @@ -170,6 +170,7 @@ Patch404: pvdrv_emulation_control.patch Patch405: blktap-pv-cdrom.patch Patch406: network-nat-open-SuSEfirewall2-FORWARD.patch Patch407: ioemu-7615-qcow2-fix-alloc_cluster_link_l2.patch +Patch408: qemu-retry-be-status.patch %if %{?with_kmp}0 Patch450: disable_emulated_device.diff %endif @@ -602,6 +603,7 @@ Authors: %patch405 -p1 %patch406 -p1 %patch407 -p1 +%patch408 -p1 %if %{?with_kmp}0 %patch450 -p1 %endif