+++ This bug was initially created as a clone of Bug #1571078 +++ Description of problem: The way the POWER HPT MMU is virtualized means that guests are only able to use page sizes equal to or smaller than the host pages used for the guest's RAM. Currently we handle that by advertising different available pagesizes to the guest depending on the pagesize backing guest RAM. This is messy, because it means the guest gets a visibly different environment depending on should be host side configuration details. This can cause considerable confusion on migration, particularly from POWER8 to POWER9, which have different available hugepage sizes on the host. Bug 1571076 is tracking a fix for that in qemu, creating an explicit option to control what page sizes should be available to an HPT guest. To handle this gracefully in libvirt we need it to: 1) If a guest XML specifies hugepages, determine the available hugepage size on the host, and pass that value to the guest parameter to control the pagesizes that are available to it. 2) Once that's done, update the XML to explicitly list the required pagesize, so that future migrations won't change the available pagesizes. --- Additional comment from Andrea Bolognani on 2018-05-07 09:34:23 EDT --- (In reply to David Gibson from comment #0) > Bug 1571076 is tracking a fix for that in qemu, creating an explicit option > to control what page sizes should be available to an HPT guest. > > To handle this gracefully in libvirt we need it to: > > 1) If a guest XML specifies hugepages, determine the available hugepage size > on the host, and pass that value to the guest parameter to control the > pagesizes that are available to it. > > 2) Once that's done, update the XML to explicitly list the required > pagesize, so that future migrations won't change the available pagesizes. As discussed on qemu-devel[1], libvirt can't sanely handle this automatically without learning to differentiate between TCG, KVM PR and KVM HV guests, as well as between HPT and RPT guests, all of which have long been considered non-goals. So libvirt will provide a configuration knob that the user can take advantage of to control what page sizes are available to the guest, but will not override QEMU's default out of the box: it will be up to higher-level management tools to use the mechanism to implement a suitable policy. [1] http://lists.nongnu.org/archive/html/qemu-devel/2018-04/msg04595.html
This bug didn't get any attention for a while, we didn't have the capacity to make any progress. If you deeply care about it or want to work on it please assign/target accordingly
------- Comment From danielhb.com 2020-03-25 09:23 EDT------- This bug is related to a Red Hat bug tracking the support for this feature in the 'ovirt-engine' component. Libvirt already supports it since this commit 2 years ago: commit a12e7a3944a737f79472492485ffeef673769edb Author: Andrea Bolognani <abologna> Date: Wed May 23 18:18:02 2018 +0200 qemu: Format HPT maxpagesize on the command line This makes the feature fully functional. https://bugzilla.redhat.com/show_bug.cgi?id=1571078 Signed-off-by: Andrea Bolognani <abologna> I am not aware if we have Ovirt folks interested in following up with this bug, but there is no Libvirt work to be done. As such, I'll return it back to the previous assignee and mark it as OPEN.
Closing old bug. Please reopen if still relevant/you want to work on it.