diff options
author | Cornelia Huck <cornelia.huck@de.ibm.com> | 2015-04-23 17:03:46 +0200 |
---|---|---|
committer | Cornelia Huck <cornelia.huck@de.ibm.com> | 2015-04-30 13:21:42 +0200 |
commit | 2c80e996e427ae31982f3405a762859578a6261d (patch) | |
tree | 295f815d3d6adcc1718225ef1e2965bd06f5eac3 /kvm-all.c | |
parent | 6cb1e49de58cab8f243b05a971a9a1f80ab3223d (diff) | |
download | qemu-2c80e996e427ae31982f3405a762859578a6261d.zip qemu-2c80e996e427ae31982f3405a762859578a6261d.tar.gz qemu-2c80e996e427ae31982f3405a762859578a6261d.tar.bz2 |
kvm: better advice for failed s390x startup
If KVM_CREATE failed on s390x, we print a hint to enable the switch_amode
kernel parameter. This only applies to old kernels, and only if the
error was -EINVAL. Moreover, with new kernels, the most likely reason
for -EINVAL is that pgstes were not enabled.
Let's update the error message to give a better hint on where things
may need fixing.
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Diffstat (limited to 'kvm-all.c')
-rw-r--r-- | kvm-all.c | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -1544,8 +1544,17 @@ static int kvm_init(MachineState *ms) strerror(-ret)); #ifdef TARGET_S390X - fprintf(stderr, "Please add the 'switch_amode' kernel parameter to " - "your host kernel command line\n"); + if (ret == -EINVAL) { + fprintf(stderr, + "Host kernel setup problem detected. Please verify:\n"); + fprintf(stderr, "- for kernels supporting the switch_amode or" + " user_mode parameters, whether\n"); + fprintf(stderr, + " user space is running in primary address space\n"); + fprintf(stderr, + "- for kernels supporting the vm.allocate_pgste sysctl, " + "whether it is enabled\n"); + } #endif goto err; } |