Richard W.M. Jones
2018-Sep-03  08:09 UTC
[Libguestfs] [PATCH] ppc64le: Use -machine cap-htm=off unconditionally
Unfortunately I was not able to test this because I don't currently have access to a P9 machine. Rich.
Richard W.M. Jones
2018-Sep-03  08:09 UTC
[Libguestfs] [PATCH] ppc64le: Use -machine cap-htm=off unconditionally (RHBZ#1614948).
See:
https://bugzilla.redhat.com/show_bug.cgi?id=1614948#c23
Thanks: David Gibson.
---
 lib/launch-direct.c  |  3 +++
 lib/launch-libvirt.c | 10 ++++++++++
 2 files changed, 13 insertions(+)
diff --git a/lib/launch-direct.c b/lib/launch-direct.c
index 47e8f37de..94dd995c6 100644
--- a/lib/launch-direct.c
+++ b/lib/launch-direct.c
@@ -523,6 +523,9 @@ launch_direct (guestfs_h *g, void *datav, const char *arg)
 #ifdef __aarch64__
     if (has_kvm && !force_tcg)
       append_list ("gic-version=host");
+#endif
+#ifdef __powerpc64__
+    append_list ("cap-htm=off");
 #endif
     append_list_format ("accel=%s", !force_tcg ? "kvm:tcg"
: "tcg");
   } end_list ();
diff --git a/lib/launch-libvirt.c b/lib/launch-libvirt.c
index 48404ef93..53284fc08 100644
--- a/lib/launch-libvirt.c
+++ b/lib/launch-libvirt.c
@@ -1181,6 +1181,16 @@ construct_libvirt_xml_boot (guestfs_h *g,
       }
     }
 
+#ifdef __powerpc64__
+    start_element ("features") {
+      start_element ("pseries") {
+        start_element ("htm") {
+          attribute ("state", "on");
+        } end_element ();
+      } end_element ();
+    } end_element ();
+#endif
+
     start_element ("kernel") {
       string (params->kernel);
     } end_element ();
-- 
2.18.0
Richard W.M. Jones
2018-Sep-03  08:13 UTC
[Libguestfs] [PATCH] ppc64le: Use -machine cap-htm=off unconditionally
On Mon, Sep 03, 2018 at 09:09:06AM +0100, Richard W.M. Jones wrote:> Unfortunately I was not able to test this because I don't > currently have access to a P9 machine.I should also add that this patch needs an extremely recent version of libvirt. The flag was added in libvirt commit 9f3b9100f33036cb14296aa0a788788743b75a23 (2018-07-02) so libvirt >= 4.6.0 is required. Should probably make that conditional. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 100 libraries supported. http://fedoraproject.org/wiki/MinGW
Pino Toscano
2018-Sep-03  08:43 UTC
Re: [Libguestfs] [PATCH] ppc64le: Use -machine cap-htm=off unconditionally (RHBZ#1614948).
On Monday, 3 September 2018 10:09:07 CEST Richard W.M. Jones wrote:> See: > https://bugzilla.redhat.com/show_bug.cgi?id=1614948#c23 > > Thanks: David Gibson. > --- > lib/launch-direct.c | 3 +++ > lib/launch-libvirt.c | 10 ++++++++++ > 2 files changed, 13 insertions(+) > > diff --git a/lib/launch-direct.c b/lib/launch-direct.c > index 47e8f37de..94dd995c6 100644 > --- a/lib/launch-direct.c > +++ b/lib/launch-direct.c > @@ -523,6 +523,9 @@ launch_direct (guestfs_h *g, void *datav, const char *arg) > #ifdef __aarch64__ > if (has_kvm && !force_tcg) > append_list ("gic-version=host"); > +#endif > +#ifdef __powerpc64__ > + append_list ("cap-htm=off"); > #endifWhich version of qemu was this introduced in?> diff --git a/lib/launch-libvirt.c b/lib/launch-libvirt.c > index 48404ef93..53284fc08 100644 > --- a/lib/launch-libvirt.c > +++ b/lib/launch-libvirt.c > @@ -1181,6 +1181,16 @@ construct_libvirt_xml_boot (guestfs_h *g, > } > } > > +#ifdef __powerpc64__ > + start_element ("features") { > + start_element ("pseries") { > + start_element ("htm") { > + attribute ("state", "on"); > + } end_element (); > + } end_element (); > + } end_element (); > +#endifThis generates an XML snippet like: <features> <pseries> <htm state="on"/> </pseries> </features> I see two problems: - there is no <pseries> subelement, <htm> is directly under <features> - shouldn't it be off, just like done in the direct backend? -- Pino Toscano
Reasonably Related Threads
- Re: [PATCH] ppc64le: Use -machine cap-htm=off unconditionally (RHBZ#1614948).
- [PATCH v3] ppc64le: Use -machine cap-htm=off unconditionally
- [PATCH v2] ppc64le: Use -machine cap-htm=off unconditionally
- [PATCH] ppc64le: Use -machine cap-htm=off unconditionally (RHBZ#1614948).
- [PATCH v3] ppc64le: Use -machine cap-htm=off unconditionally (RHBZ#1614948).