Blob Blame History Raw
From 7790ed8ef557f413c46de458cf8a91e4d73fcca6 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Wed, 25 Sep 2013 12:20:37 +0100
Subject: [PATCH] launch: libvirt: Use host-passthrough instead of host-model.

<cpu model="host-passthrough"> really passes -cpu host to qemu, which
is what we want since we don't care about live migration or ABI
stability.

This should avoid http://bugzilla.redhat.com/870071 .

Note this "taints" the libvirt domain.  We don't particularly care
about that, and the reason for the tainting doesn't seem to make much
sense anyway.

This updates commit 6f76fdb41eb6bd124fbc3d084f5c2a3371b37d9b.

(cherry picked from commit 2f4f7726e8c81cc56befcb7caa78c01174354d76)
---
 src/launch-libvirt.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/launch-libvirt.c b/src/launch-libvirt.c
index 3690b1d..80bf44c 100644
--- a/src/launch-libvirt.c
+++ b/src/launch-libvirt.c
@@ -822,7 +822,6 @@ construct_libvirt_xml_cpu (guestfs_h *g,
 
   /* It is faster to pass the CPU host model to the appliance,
    * allowing maximum speed for things like checksums, encryption.
-   * Note this may cause problems on some CPUs.  See: RHBZ#870071.
    * Only do this with KVM.  It is broken in subtle ways on TCG, and
    * fairly pointless anyway.
    */
@@ -830,7 +829,7 @@ construct_libvirt_xml_cpu (guestfs_h *g,
     XMLERROR (-1, xmlTextWriterStartElement (xo, BAD_CAST "cpu"));
     XMLERROR (-1,
 	      xmlTextWriterWriteAttribute (xo, BAD_CAST "mode",
-					   BAD_CAST "host-model"));
+					   BAD_CAST "host-passthrough"));
     XMLERROR (-1, xmlTextWriterStartElement (xo, BAD_CAST "model"));
     XMLERROR (-1,
 	      xmlTextWriterWriteAttribute (xo, BAD_CAST "fallback",
-- 
1.8.3.1