Richard W.M. Jones
2018-Sep-03 09:11 UTC
[Libguestfs] [PATCH v3] ppc64le: Use -machine cap-htm=off unconditionally
Of course I mean state=off (not <htm state=on>) ... Rich.
Richard W.M. Jones
2018-Sep-03 09:11 UTC
[Libguestfs] [PATCH v3] 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 | 4 ++++ lib/launch-libvirt.c | 10 ++++++++++ 2 files changed, 14 insertions(+) diff --git a/lib/launch-direct.c b/lib/launch-direct.c index 47e8f37de..e99c33347 100644 --- a/lib/launch-direct.c +++ b/lib/launch-direct.c @@ -523,6 +523,10 @@ 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__ + if (guestfs_int_version_ge (&data->qemu_version, 2, 11, 2)) + 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..1a074fd6c 100644 --- a/lib/launch-libvirt.c +++ b/lib/launch-libvirt.c @@ -1181,6 +1181,16 @@ construct_libvirt_xml_boot (guestfs_h *g, } } +#ifdef __powerpc64__ + if (guestfs_int_version_ge (¶ms->data->libvirt_version, 4, 6, 0)) { + start_element ("features") { + start_element ("htm") { + attribute ("state", "off"); + } end_element (); + } end_element (); + } +#endif + start_element ("kernel") { string (params->kernel); } end_element (); -- 2.18.0
Andrea Bolognani
2018-Sep-03 10:40 UTC
Re: [Libguestfs] [PATCH v3] ppc64le: Use -machine cap-htm=off unconditionally (RHBZ#1614948).
On Mon, 2018-09-03 at 10:11 +0100, Richard W.M. Jones wrote:> See: > https://bugzilla.redhat.com/show_bug.cgi?id=1614948#c23[...]> +#ifdef __powerpc64__ > + if (guestfs_int_version_ge (&data->qemu_version, 2, 11, 2)) > + append_list ("cap-htm=off"); > #endifThis check is accurate upstream and in Fedora, but other downstreams might have backported the relevant commits to earlier QEMU releases: RHEL is one such downstream, and in that case the option is available with QEMU versions as early as 2.10.0, so you'd have to patch the check version downstream; more specifically, it was added in 2.10.0-18, which I'm not even sure you can actually check using the approach above. [...]> +#ifdef __powerpc64__ > + if (guestfs_int_version_ge (¶ms->data->libvirt_version, 4, 6, 0)) { > + start_element ("features") { > + start_element ("htm") { > + attribute ("state", "off"); > + } end_element (); > + } end_element (); > + } > +#endifSame here: the feature is available with libvirt 4.5.0 in RHEL, so you'd have to carry another downstream patch; and again, the specific version is 4.5.0-2, which would make the check tricky at best and impossible at worst. Unless I'm mistaken, libguestfs only uses unversioned machine types and doesn't care about migration at all, so with Cole's workaround being merged in Fedora[1] and newer versions of upstream QEMU disabling HTM for their default machine type, I don't really see a compelling reason to add any code to libguestfs; there's also a chance the upstream behavior will change again[2]. I'd say just wait this one out. [1] https://bugzilla.redhat.com/show_bug.cgi?id=1614948#c23 [2] https://bugzilla.redhat.com/show_bug.cgi?id=1614948#c22 -- Andrea Bolognani / Red Hat / Virtualization
Maybe Matching Threads
- [PATCH v2] ppc64le: Use -machine cap-htm=off unconditionally
- [PATCH] ppc64le: Use -machine cap-htm=off unconditionally
- Re: [PATCH] ppc64le: Use -machine cap-htm=off unconditionally (RHBZ#1614948).
- [PATCH v3] ppc64le: Use -machine cap-htm=off unconditionally (RHBZ#1614948).
- [PATCH] ppc64le: Use -machine cap-htm=off unconditionally (RHBZ#1614948).