diff options
author | Alex Shi <alex.shi@linaro.org> | 2016-06-27 12:18:08 +0800 |
---|---|---|
committer | Alex Shi <alex.shi@linaro.org> | 2016-06-27 12:18:08 +0800 |
commit | 96195c7a758055f7c1a77b7070050c12eb949883 (patch) | |
tree | c7327af2be21ef3c4a6a712a2f9f345b16197a02 /arch/x86/kvm/x86.c | |
parent | c8a04d19821f8ee3ba047681cf23f46722caf596 (diff) | |
parent | ffc4aa8f521606f63f59ff708f49780172909e94 (diff) |
Merge branch 'linux-linaro-lsk-v4.4' into linux-linaro-lsk-v4.4-rtlsk-v4.4-16.06-rt
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r-- | arch/x86/kvm/x86.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 4110b6675b8d..697457897e7c 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -3014,6 +3014,11 @@ static int kvm_vcpu_ioctl_x86_set_debugregs(struct kvm_vcpu *vcpu, if (dbgregs->flags) return -EINVAL; + if (dbgregs->dr6 & ~0xffffffffull) + return -EINVAL; + if (dbgregs->dr7 & ~0xffffffffull) + return -EINVAL; + memcpy(vcpu->arch.db, dbgregs->db, sizeof(vcpu->arch.db)); kvm_update_dr0123(vcpu); vcpu->arch.dr6 = dbgregs->dr6; |