mrc0mmand / rpms / libguestfs

Forked from rpms/libguestfs 3 years ago
Clone

Blame SOURCES/0011-launch-libvirt-Enable-cpu-mode-host-model.patch

022f11
From 00b829acdf83904e5fbae21130853247b36f2348 Mon Sep 17 00:00:00 2001
022f11
From: "Richard W.M. Jones" <rjones@redhat.com>
022f11
Date: Mon, 5 Aug 2013 16:42:43 +0100
022f11
Subject: [PATCH] launch: libvirt: Enable <cpu mode=host-model>.
022f11
022f11
This may still cause problems on some CPUs because of a bug
022f11
in libvirt.  See:
022f11
https://bugzilla.redhat.com/show_bug.cgi?id=870071
022f11
022f11
(cherry picked from commit 6f76fdb41eb6bd124fbc3d084f5c2a3371b37d9b)
022f11
---
022f11
 src/launch-libvirt.c | 8 ++------
022f11
 1 file changed, 2 insertions(+), 6 deletions(-)
022f11
022f11
diff --git a/src/launch-libvirt.c b/src/launch-libvirt.c
022f11
index 6fcb880..e6f6b0b 100644
022f11
--- a/src/launch-libvirt.c
022f11
+++ b/src/launch-libvirt.c
022f11
@@ -820,13 +820,10 @@ construct_libvirt_xml_cpu (guestfs_h *g,
022f11
   XMLERROR (-1, xmlTextWriterWriteFormatString (xo, "%d", g->memsize));
022f11
   XMLERROR (-1, xmlTextWriterEndElement (xo));
022f11
 
022f11
-  /* It would be faster to pass the CPU host model to the appliance,
022f11
+  /* It is faster to pass the CPU host model to the appliance,
022f11
    * allowing maximum speed for things like checksums, encryption.
022f11
-   * However this doesn't work because KVM doesn't emulate all of the
022f11
-   * required guest insns (RHBZ#870071).  This is why the following
022f11
-   * section is commented out.
022f11
+   * Note this may cause problems on some CPUs.  See: RHBZ#870071.
022f11
    */
022f11
-#if 0
022f11
   XMLERROR (-1, xmlTextWriterStartElement (xo, BAD_CAST "cpu"));
022f11
   XMLERROR (-1,
022f11
             xmlTextWriterWriteAttribute (xo, BAD_CAST "mode",
022f11
@@ -837,7 +834,6 @@ construct_libvirt_xml_cpu (guestfs_h *g,
022f11
                                          BAD_CAST "allow"));
022f11
   XMLERROR (-1, xmlTextWriterEndElement (xo));
022f11
   XMLERROR (-1, xmlTextWriterEndElement (xo));
022f11
-#endif
022f11
 
022f11
   XMLERROR (-1, xmlTextWriterStartElement (xo, BAD_CAST "vcpu"));
022f11
   XMLERROR (-1, xmlTextWriterWriteFormatString (xo, "%d", g->smp));
022f11
-- 
022f11
1.8.3.1
022f11