diff options
author | Alex Bennée <alex.bennee@linaro.org> | 2015-07-07 17:30:02 +0100 |
---|---|---|
committer | Marc Zyngier <marc.zyngier@arm.com> | 2015-07-21 12:50:43 +0100 |
commit | 834bf88726f0f11ddc7ff9679fc9458654c01a12 (patch) | |
tree | 9fb71c96dfab5c64a4a2c5972783bd621f266874 /arch/arm64/kvm/guest.c | |
parent | 5540546bc93b49f98a0466fe3f96615286c76574 (diff) | |
download | linux-stable-834bf88726f0f11ddc7ff9679fc9458654c01a12.tar.gz linux-stable-834bf88726f0f11ddc7ff9679fc9458654c01a12.tar.bz2 linux-stable-834bf88726f0f11ddc7ff9679fc9458654c01a12.zip |
KVM: arm64: enable KVM_CAP_SET_GUEST_DEBUG
Finally advertise the KVM capability for SET_GUEST_DEBUG. Once arm
support is added this check can be moved to the common
kvm_vm_ioctl_check_extension() code.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Acked-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'arch/arm64/kvm/guest.c')
-rw-r--r-- | arch/arm64/kvm/guest.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/arm64/kvm/guest.c b/arch/arm64/kvm/guest.c index 48de4f4aaa1a..6f1b249e0587 100644 --- a/arch/arm64/kvm/guest.c +++ b/arch/arm64/kvm/guest.c @@ -334,6 +334,7 @@ int kvm_arch_vcpu_ioctl_translate(struct kvm_vcpu *vcpu, #define KVM_GUESTDBG_VALID_MASK (KVM_GUESTDBG_ENABLE | \ KVM_GUESTDBG_USE_SW_BP | \ + KVM_GUESTDBG_USE_HW | \ KVM_GUESTDBG_SINGLESTEP) /** @@ -354,6 +355,12 @@ int kvm_arch_vcpu_ioctl_set_guest_debug(struct kvm_vcpu *vcpu, if (dbg->control & KVM_GUESTDBG_ENABLE) { vcpu->guest_debug = dbg->control; + + /* Hardware assisted Break and Watch points */ + if (vcpu->guest_debug & KVM_GUESTDBG_USE_HW) { + vcpu->arch.external_debug_state = dbg->arch; + } + } else { /* If not enabled clear all flags */ vcpu->guest_debug = 0; |