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