diff options
author | Thomas Huth | 2019-09-13 11:14:43 +0200 |
---|---|---|
committer | Christian Borntraeger | 2019-09-23 09:15:03 +0200 |
commit | 7d69e8bc3b0ca4e48b24e7cb9db6dd77fa0b3481 (patch) | |
tree | 571869e42b16e8d54ad9ab72a245abec980142c7 /target/s390x/kvm.c | |
parent | Merge tag 's390-ccw-bios-2019-09-18' of https://gitlab.com/huth/qemu into s39... (diff) | |
download | qemu-7d69e8bc3b0ca4e48b24e7cb9db6dd77fa0b3481.tar.gz qemu-7d69e8bc3b0ca4e48b24e7cb9db6dd77fa0b3481.tar.xz qemu-7d69e8bc3b0ca4e48b24e7cb9db6dd77fa0b3481.zip |
s390x/kvm: Officially require at least kernel 3.15
Since QEMU v2.10, the KVM acceleration does not work on older kernels
anymore since the code accidentally requires the KVM_CAP_DEVICE_CTRL
capability now - it should have been optional instead.
Instead of fixing the bug, we asked in the ChangeLog of QEMU 2.11 - 3.0
that people should speak up if they still need support of QEMU running
with KVM on older kernels, but seems like nobody really complained.
Thus let's make this official now and turn it into a proper error
message, telling the users to use at least kernel 3.15 now.
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20190913091443.27565-1-thuth@redhat.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Diffstat (limited to 'target/s390x/kvm.c')
-rw-r--r-- | target/s390x/kvm.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c index cea71ac7c3..97a662ad0e 100644 --- a/target/s390x/kvm.c +++ b/target/s390x/kvm.c @@ -316,6 +316,13 @@ int kvm_arch_init(MachineState *ms, KVMState *s) MachineClass *mc = MACHINE_GET_CLASS(ms); mc->default_cpu_type = S390_CPU_TYPE_NAME("host"); + + if (!kvm_check_extension(kvm_state, KVM_CAP_DEVICE_CTRL)) { + error_report("KVM is missing capability KVM_CAP_DEVICE_CTRL - " + "please use kernel 3.15 or newer"); + return -1; + } + cap_sync_regs = kvm_check_extension(s, KVM_CAP_SYNC_REGS); cap_async_pf = kvm_check_extension(s, KVM_CAP_ASYNC_PF); cap_mem_op = kvm_check_extension(s, KVM_CAP_S390_MEM_OP); |