diff options
author | Alex Bennée <alex.bennee@linaro.org> | 2015-12-17 13:37:14 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2015-12-17 13:37:14 +0000 |
commit | 29eb3d9a911b13e2a66413ba5cc6c69a0f4a4528 (patch) | |
tree | 2d3f94cddebc58a83d3d46628fb5e9c74b97de08 /target-arm | |
parent | 3e6ebb64a392ebc712347413f1065300ed008a8f (diff) | |
download | qemu-29eb3d9a911b13e2a66413ba5cc6c69a0f4a4528.tar.gz qemu-29eb3d9a911b13e2a66413ba5cc6c69a0f4a4528.tar.bz2 qemu-29eb3d9a911b13e2a66413ba5cc6c69a0f4a4528.zip |
target-arm: kvm64 - introduce kvm_arm_init_debug()
As we haven't always had guest debug support we need to probe for it.
Additionally we don't do this in the start-up capability code so we
don't fall over on old kernels.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-id: 1449599553-24713-2-git-send-email-alex.bennee@linaro.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target-arm')
-rw-r--r-- | target-arm/kvm64.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/target-arm/kvm64.c b/target-arm/kvm64.c index ceebfeb774..d0877946b1 100644 --- a/target-arm/kvm64.c +++ b/target-arm/kvm64.c @@ -25,6 +25,22 @@ #include "internals.h" #include "hw/arm/arm.h" +static bool have_guest_debug; + +/** + * kvm_arm_init_debug() + * @cs: CPUState + * + * Check for guest debug capabilities. + * + */ +static void kvm_arm_init_debug(CPUState *cs) +{ + have_guest_debug = kvm_check_extension(cs->kvm_state, + KVM_CAP_SET_GUEST_DEBUG); + return; +} + static inline void set_feature(uint64_t *features, int feature) { *features |= 1ULL << feature; @@ -121,6 +137,8 @@ int kvm_arch_init_vcpu(CPUState *cs) } cpu->mp_affinity = mpidr & ARM64_AFFINITY_MASK; + kvm_arm_init_debug(cs); + return kvm_arm_init_cpreg_list(cpu); } |