[Pkg-libvirt-commits] [libguestfs] 65/233: Use recommended timer settings for KVM (RHBZ#1053847).
Hilko Bengen
bengen at moszumanska.debian.org
Wed Feb 19 21:10:55 UTC 2014
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to branch experimental
in repository libguestfs.
commit b6ff6421686e6fd7e5f7db8eed24419c7bd09688
Author: Richard W.M. Jones <rjones at redhat.com>
Date: Sat Jan 18 11:55:27 2014 +0000
Use recommended timer settings for KVM (RHBZ#1053847).
See: https://bugzilla.redhat.com/show_bug.cgi?id=1053847#c0
Thanks: Cole Robinson, and several QEMU developers.
---
src/launch-direct.c | 24 +++++-------------------
src/launch-libvirt.c | 13 +++++++++++--
2 files changed, 16 insertions(+), 21 deletions(-)
diff --git a/src/launch-direct.c b/src/launch-direct.c
index 9ad5cf2..a90956b 100644
--- a/src/launch-direct.c
+++ b/src/launch-direct.c
@@ -460,19 +460,6 @@ launch_direct (guestfs_h *g, void *datav, const char *arg)
ADD_CMDLINE ("-enable-kvm");
}
-#if defined(__i386__) || defined (__x86_64__)
- /* -cpu host only works if KVM is available. */
- if (has_kvm) {
- /* Specify the host CPU for speed, and kvmclock for stability. */
- ADD_CMDLINE ("-cpu");
- ADD_CMDLINE ("host,+kvmclock");
- } else {
- /* Specify default CPU for speed, and kvmclock for stability. */
- ADD_CMDLINE ("-cpu");
- ADD_CMDLINE_PRINTF ("qemu%d,+kvmclock", SIZEOF_LONG*8);
- }
-#endif
-
if (g->smp > 1) {
ADD_CMDLINE ("-smp");
ADD_CMDLINE_PRINTF ("%d", g->smp);
@@ -484,7 +471,9 @@ launch_direct (guestfs_h *g, void *datav, const char *arg)
/* Force exit instead of reboot on panic */
ADD_CMDLINE ("-no-reboot");
- /* These options recommended by KVM developers to improve reliability. */
+ /* These are recommended settings, see RHBZ#1053847. */
+ ADD_CMDLINE ("-rtc");
+ ADD_CMDLINE ("driftfix=slew");
#ifndef __arm__
/* qemu-system-arm advertises the -no-hpet option but if you try
* to use it, it usefully says:
@@ -492,12 +481,9 @@ launch_direct (guestfs_h *g, void *datav, const char *arg)
* Cheers qemu developers. How many years have we been asking for
* capabilities? Could be 3 or 4 years, I forget.
*/
- if (qemu_supports (g, data, "-no-hpet"))
- ADD_CMDLINE ("-no-hpet");
+ ADD_CMDLINE ("-no-hpet");
#endif
-
- if (qemu_supports (g, data, "-rtc-td-hack"))
- ADD_CMDLINE ("-rtc-td-hack");
+ ADD_CMDLINE ("-no-kvm-pit-reinjection");
ADD_CMDLINE ("-kernel");
ADD_CMDLINE (kernel);
diff --git a/src/launch-libvirt.c b/src/launch-libvirt.c
index d6dafe8..cb61571 100644
--- a/src/launch-libvirt.c
+++ b/src/launch-libvirt.c
@@ -1009,9 +1009,18 @@ 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", "kvmclock");
- attribute ("present", "yes");
+ attribute ("name", "rtc");
+ attribute ("tickpolicy", "catchup");
+ } end_element ();
+ start_element ("timer") {
+ attribute ("name", "pit");
+ attribute ("tickpolicy", "delay");
+ } end_element ();
+ start_element ("timer") {
+ attribute ("name", "hpet");
+ attribute ("present", "no");
} end_element ();
} end_element ();
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git
More information about the Pkg-libvirt-commits
mailing list