Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2de3bfc2 authored by David Hildenbrand's avatar David Hildenbrand Committed by Christian Borntraeger
Browse files

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: default avatarDavid Hildenbrand <dahi@linux.vnet.ibm.com>
Reviewed-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
parent 22ff4a33
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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) {