Skip to content

Commit

Permalink
KVM: s390: check the given debug flags, not the set ones
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David Hildenbrand authored and Christian Borntraeger committed May 30, 2014
1 parent 22ff4a3 commit 2de3bfc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/s390/kvm/kvm-s390.c
Original file line number Diff line number Diff line change
Expand Up @@ -950,7 +950,7 @@ int kvm_arch_vcpu_ioctl_set_guest_debug(struct kvm_vcpu *vcpu,
vcpu->guest_debug = 0;
kvm_s390_clear_bp_data(vcpu);

if (vcpu->guest_debug & ~VALID_GUESTDBG_FLAGS)
if (dbg->control & ~VALID_GUESTDBG_FLAGS)
return -EINVAL;

if (dbg->control & KVM_GUESTDBG_ENABLE) {
Expand Down

0 comments on commit 2de3bfc

Please sign in to comment.