aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kvm
diff options
context:
space:
mode:
authorDavid Hildenbrand <dahi@linux.vnet.ibm.com>2014-05-20 11:25:20 -0400
committerChristian Borntraeger <borntraeger@de.ibm.com>2014-05-30 03:39:38 -0400
commit2de3bfc25ab39109883075a75134c37759fa1b93 (patch)
treed3b624050003529bda3fd72f3390e9fe31905400 /arch/s390/kvm
parent22ff4a3366e6fed80205b427d8fb52020cd9020a (diff)
KVM: s390: check the given debug flags, not the set ones
This patch fixes a minor bug when updating the guest debug settings. We should check the given debug flags, not the already set ones. Doesn't do any harm but too many (for now unused) flags could be set internally without error. Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com> Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
Diffstat (limited to 'arch/s390/kvm')
-rw-r--r--arch/s390/kvm/kvm-s390.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
index e519860c6031..06d1888f9179 100644
--- a/arch/s390/kvm/kvm-s390.c
+++ b/arch/s390/kvm/kvm-s390.c
@@ -950,7 +950,7 @@ int kvm_arch_vcpu_ioctl_set_guest_debug(struct kvm_vcpu *vcpu,
950 vcpu->guest_debug = 0; 950 vcpu->guest_debug = 0;
951 kvm_s390_clear_bp_data(vcpu); 951 kvm_s390_clear_bp_data(vcpu);
952 952
953 if (vcpu->guest_debug & ~VALID_GUESTDBG_FLAGS) 953 if (dbg->control & ~VALID_GUESTDBG_FLAGS)
954 return -EINVAL; 954 return -EINVAL;
955 955
956 if (dbg->control & KVM_GUESTDBG_ENABLE) { 956 if (dbg->control & KVM_GUESTDBG_ENABLE) {