[Pkg-libvirt-commits] [libguestfs] 06/14: launch: direct: Use -cpu host when using KVM on x86.
Hilko Bengen
bengen at moszumanska.debian.org
Sat Aug 30 08:29:25 UTC 2014
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to annotated tag upstream/1.27.21
in repository libguestfs.
commit 2fe74642f4b2971ea279374a72ddedde733f5e44
Author: Richard W.M. Jones <rjones at redhat.com>
Date: Thu Jul 3 11:48:49 2014 +0100
launch: direct: Use -cpu host when using KVM on x86.
This is the same as what the libvirt backend does.
---
src/launch-direct.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/src/launch-direct.c b/src/launch-direct.c
index 682b98e..bb73d19 100644
--- a/src/launch-direct.c
+++ b/src/launch-direct.c
@@ -418,6 +418,18 @@ launch_direct (guestfs_h *g, void *datav, const char *arg)
*/
has_kvm = is_openable (g, "/dev/kvm", O_RDWR|O_CLOEXEC);
+#if !defined(__arm__)
+ /* It is faster to pass the CPU host model to the appliance,
+ * allowing maximum speed for things like checksums, encryption.
+ * Only do this with KVM. It is broken in subtle ways on TCG, and
+ * fairly pointless anyway.
+ */
+ if (has_kvm && !force_tcg) {
+ ADD_CMDLINE ("-cpu");
+ ADD_CMDLINE ("host");
+ }
+#endif
+
/* The qemu -machine option (added 2010-12) is a bit more sane
* since it falls back through various different acceleration
* modes, so try that first (thanks Markus Armbruster).
--
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