aboutsummaryrefslogtreecommitdiff
path: root/target/s390x
diff options
context:
space:
mode:
authorJanosch Frank <frankja@linux.ibm.com>2018-09-28 11:34:35 +0200
committerCornelia Huck <cohuck@redhat.com>2018-10-04 10:32:39 +0200
commit28221f9c999a9b34f58d94599da9c229df9a4fed (patch)
tree175191aa874838eae396108e6be32b2a289c58d6 /target/s390x
parentcb89b349074310ff9eb7ebe18a8ae24d7d9ea3fb (diff)
s390x: Fence huge pages prior to 3.1
As the kernel has no way of disallowing the start of a huge page backed VM, we can migrate a running huge backed VM to a host that has no huge page KVM support. Let's glue huge page support support to the 3.1 machine, so we do not migrate to a destination host that doesn't have QEMU huge page support and can stop migration if KVM doesn't indicate support. Signed-off-by: Janosch Frank <frankja@linux.ibm.com> Message-Id: <20180928093435.198573-1-frankja@linux.ibm.com> Reviewed-by: David Hildenbrand <david@redhat.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Diffstat (limited to 'target/s390x')
-rw-r--r--target/s390x/kvm.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c
index 348e8cc546..323cb00e6a 100644
--- a/target/s390x/kvm.c
+++ b/target/s390x/kvm.c
@@ -292,6 +292,12 @@ static int kvm_s390_configure_mempath_backing(KVMState *s)
return 0;
}
+ if (!hpage_1m_allowed()) {
+ error_report("This QEMU machine does not support huge page "
+ "mappings");
+ return -EINVAL;
+ }
+
if (path_psize != 1 * MiB) {
error_report("Memory backing with 2G pages was specified, "
"but KVM does not support this memory backing");