|
|
ff9ada |
From 92bb62c47eab021f8dabecd09b5fbc1706e6a29c Mon Sep 17 00:00:00 2001
|
|
|
ddf19c |
From: David Gibson <dgibson@redhat.com>
|
|
|
ddf19c |
Date: Wed, 6 Feb 2019 03:58:56 +0000
|
|
|
ddf19c |
Subject: BZ1653590: Require at least 64kiB pages for downstream guests & hosts
|
|
|
ddf19c |
|
|
|
ddf19c |
RH-Author: David Gibson <dgibson@redhat.com>
|
|
|
ddf19c |
Message-id: <20190206035856.19058-1-dgibson@redhat.com>
|
|
|
ddf19c |
Patchwork-id: 84246
|
|
|
ddf19c |
O-Subject: [RHELAV-8.0/rhel qemu-kvm PATCH] BZ1653590: Require at least 64kiB pages for downstream guests & hosts
|
|
|
ddf19c |
Bugzilla: 1653590
|
|
|
ddf19c |
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
|
|
|
ddf19c |
RH-Acked-by: Serhii Popovych <spopovyc@redhat.com>
|
|
|
ddf19c |
RH-Acked-by: Thomas Huth <thuth@redhat.com>
|
|
|
ddf19c |
|
|
|
ddf19c |
Most current POWER guests require 64kiB page support, so that's the default
|
|
|
ddf19c |
for the cap-hpt-max-pagesize option in qemu which limits available guest
|
|
|
ddf19c |
page sizes. We warn if the value is set smaller than that, but don't
|
|
|
ddf19c |
outright fail upstream, because we need to allow for the possibility of
|
|
|
ddf19c |
guest (and/or host) kernels configured for 4kiB page sizes.
|
|
|
ddf19c |
|
|
|
ddf19c |
Downstream, however, we simply don't support 4kiB pagesize configured
|
|
|
ddf19c |
kernels in guest or host, so we can have qemu simply error out in this
|
|
|
ddf19c |
situation.
|
|
|
ddf19c |
|
|
|
ddf19c |
Testing: Attempted to start a guest with cap-hpt-max-page-size=4k and verified
|
|
|
ddf19c |
it failed immediately with a qemu error
|
|
|
ddf19c |
|
|
|
ddf19c |
Signed-off-by: David Gibson <dgibson@redhat.com>
|
|
|
ddf19c |
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
|
|
ddf19c |
---
|
|
|
ddf19c |
hw/ppc/spapr_caps.c | 7 +++++++
|
|
|
ddf19c |
1 file changed, 7 insertions(+)
|
|
|
ddf19c |
|
|
|
ddf19c |
diff --git a/hw/ppc/spapr_caps.c b/hw/ppc/spapr_caps.c
|
|
|
ff9ada |
index ed7c077a0d..48a8efe678 100644
|
|
|
ddf19c |
--- a/hw/ppc/spapr_caps.c
|
|
|
ddf19c |
+++ b/hw/ppc/spapr_caps.c
|
|
|
ff9ada |
@@ -332,12 +332,19 @@ bool spapr_check_pagesize(SpaprMachineState *spapr, hwaddr pagesize,
|
|
|
ddf19c |
static void cap_hpt_maxpagesize_apply(SpaprMachineState *spapr,
|
|
|
ddf19c |
uint8_t val, Error **errp)
|
|
|
ddf19c |
{
|
|
|
ddf19c |
+#if 0 /* disabled for RHEL */
|
|
|
ddf19c |
if (val < 12) {
|
|
|
ddf19c |
error_setg(errp, "Require at least 4kiB hpt-max-page-size");
|
|
|
ddf19c |
return;
|
|
|
ddf19c |
} else if (val < 16) {
|
|
|
ddf19c |
warn_report("Many guests require at least 64kiB hpt-max-page-size");
|
|
|
ddf19c |
}
|
|
|
ddf19c |
+#else /* Only page sizes >=64kiB supported for RHEL */
|
|
|
ddf19c |
+ if (val < 16) {
|
|
|
ddf19c |
+ error_setg(errp, "Require at least 64kiB hpt-max-page-size");
|
|
|
ddf19c |
+ return;
|
|
|
ddf19c |
+ }
|
|
|
ddf19c |
+#endif
|
|
|
ddf19c |
|
|
|
ddf19c |
spapr_check_pagesize(spapr, qemu_minrampagesize(), errp);
|
|
|
ddf19c |
}
|
|
|
ddf19c |
--
|
|
|
ff9ada |
2.27.0
|
|
|
ddf19c |
|