diff options
author | Eduardo Habkost | 2017-03-09 19:50:46 +0100 |
---|---|---|
committer | Paolo Bonzini | 2017-03-14 13:26:36 +0100 |
commit | ca2edcd35cd1a8589dfa0533c19ff232fec7b4b5 (patch) | |
tree | 1b91cb0f1b4ad83a5e11e7bfbce90d47a0de44e5 /scripts | |
parent | kvm: Print MSR information if KVM_{GET,SET}_MSRS failed (diff) | |
download | qemu-ca2edcd35cd1a8589dfa0533c19ff232fec7b4b5.tar.gz qemu-ca2edcd35cd1a8589dfa0533c19ff232fec7b4b5.tar.xz qemu-ca2edcd35cd1a8589dfa0533c19ff232fec7b4b5.zip |
kvmclock: Don't crash QEMU if KVM is disabled
Most machines don't allow sysbus devices like "kvmclock" to be
created from the command-line, but some of them do (the ones with
has_dynamic_sysbus=true). In those cases, it's possible to
manually create a kvmclock device without KVM being enabled,
making QEMU crash:
$ qemu-system-x86_64 -machine q35,accel=tcg -device kvmclock
Segmentation fault (core dumped)
This changes kvmclock's realize method to return an error if KVM
is disabled, to ensure it won't crash QEMU.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Message-Id: <20170309185046.17555-1-ehabkost@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions