summaryrefslogtreecommitdiffstats
path: root/src/launch-libvirt.c
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2012-10-25 16:16:17 +0100
committerRichard W.M. Jones <rjones@redhat.com>2012-10-25 16:16:17 +0100
commit7271c9146d57299e4c71b23aaeac5ccef4a84d39 (patch)
treee689ff7274c52e149cd44d1961087e2ed9228af4 /src/launch-libvirt.c
parent835ae2c43ca70a90e33262bb71da1883ab6a4473 (diff)
downloadlibguestfs-7271c9146d57299e4c71b23aaeac5ccef4a84d39.tar.gz
libguestfs-7271c9146d57299e4c71b23aaeac5ccef4a84d39.tar.xz
libguestfs-7271c9146d57299e4c71b23aaeac5ccef4a84d39.zip
launch: libvirt: Disable CPU host-model.
See the comment in the change. This "fixes" commit f7a67914c03db6d4c75671793964954640af7892.
Diffstat (limited to 'src/launch-libvirt.c')
-rw-r--r--src/launch-libvirt.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/launch-libvirt.c b/src/launch-libvirt.c
index ebe1ac04..c243fcbb 100644
--- a/src/launch-libvirt.c
+++ b/src/launch-libvirt.c
@@ -582,6 +582,13 @@ construct_libvirt_xml_cpu (guestfs_h *g, xmlTextWriterPtr xo)
XMLERROR (-1, xmlTextWriterWriteFormatString (xo, "%d", g->memsize));
XMLERROR (-1, xmlTextWriterEndElement (xo));
+ /* It would be faster to pass the CPU host model to the appliance,
+ * allowing maximum speed for things like checksums, encryption.
+ * However this doesn't work because KVM doesn't emulate all of the
+ * required guest insns (RHBZ#870071). This is why the following
+ * section is commented out.
+ */
+#if 0
XMLERROR (-1, xmlTextWriterStartElement (xo, BAD_CAST "cpu"));
XMLERROR (-1,
xmlTextWriterWriteAttribute (xo, BAD_CAST "mode",
@@ -592,6 +599,7 @@ construct_libvirt_xml_cpu (guestfs_h *g, xmlTextWriterPtr xo)
BAD_CAST "allow"));
XMLERROR (-1, xmlTextWriterEndElement (xo));
XMLERROR (-1, xmlTextWriterEndElement (xo));
+#endif
XMLERROR (-1, xmlTextWriterStartElement (xo, BAD_CAST "vcpu"));
XMLERROR (-1, xmlTextWriterWriteFormatString (xo, "%d", g->smp));