On Mon, 2018-09-03 at 10:11 +0100, Richard W.M. Jones wrote:
[...]
+#ifdef __powerpc64__
+ if (guestfs_int_version_ge (&data->qemu_version, 2, 11, 2))
+ append_list ("cap-htm=off");
#endif
This 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 ();
+ }
+#endif
Same 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