[Libguestfs] [PATCH] ppc64le: Use -machine cap-htm=off unconditionally (RHBZ#1614948).

Richard W.M. Jones rjones at redhat.com
Mon Sep 3 09:03:10 UTC 2018


On Mon, Sep 03, 2018 at 10:43:34AM +0200, Pino Toscano wrote:
> 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");
> >  #endif
> 
> Which version of qemu was this introduced in?

Looks like just before 2.12, although the patch seems to have been
backported to 2.11 (see RHBZ#1614948).  I'll add a version test here
in v2, as well as the libvirt version test required below.

> > 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
> 
> This 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?

Ah yes, it looks like this was the XML that was originally planned
(see
https://www.redhat.com/archives/libvir-list/2018-January/msg00784.html)
but not what finally went upstream.

Really need a P9 so we can test this!

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top




More information about the Libguestfs mailing list