libguestfs/0001-launch-libvirt-Don-t-i...

47 lines
1.4 KiB
Diff

From 62cb3a606d4b349d45f2d178945a998a90d1e130 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Mon, 17 Feb 2014 15:17:27 -0500
Subject: [PATCH] launch: libvirt: Don't include hpet XML fragment on ARM.
See comment and https://bugzilla.redhat.com/show_bug.cgi?id=1066145
for explanation.
---
src/launch-libvirt.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/src/launch-libvirt.c b/src/launch-libvirt.c
index 60213fd..9e59e36 100644
--- a/src/launch-libvirt.c
+++ b/src/launch-libvirt.c
@@ -1001,6 +1001,7 @@ construct_libvirt_xml_cpu (guestfs_h *g,
start_element ("clock") {
attribute ("offset", "utc");
+
/* These are recommended settings, see RHBZ#1053847. */
start_element ("timer") {
attribute ("name", "rtc");
@@ -1010,10 +1011,19 @@ construct_libvirt_xml_cpu (guestfs_h *g,
attribute ("name", "pit");
attribute ("tickpolicy", "delay");
} end_element ();
+
+ /* libvirt has a bug (RHBZ#1066145) where it adds the -no-hpet
+ * flag on ARM even though this causes qemu-system-arm to break
+ * and ARM has never had a High Precision Timer anyway. It's not
+ * worth arguing about who is right or wrong here, just disable
+ * this XML fragment on ARM.
+ */
+#ifndef __arm__
start_element ("timer") {
attribute ("name", "hpet");
attribute ("present", "no");
} end_element ();
+#endif
} end_element ();
return 0;
--
1.8.4.2