File tree Expand file tree Collapse file tree 1 file changed +11
-18
lines changed Expand file tree Collapse file tree 1 file changed +11
-18
lines changed Original file line number Diff line number Diff line change @@ -917,31 +917,24 @@ int kvm_arch_vcpu_ioctl_translate(struct kvm_vcpu *vcpu,
917
917
int kvm_arch_vcpu_ioctl_set_guest_debug (struct kvm_vcpu * vcpu ,
918
918
struct kvm_guest_debug * dbg )
919
919
{
920
- int ret = 0 ;
921
-
922
920
trace_kvm_set_guest_debug (vcpu , dbg -> control );
923
921
924
- if (dbg -> control & ~KVM_GUESTDBG_VALID_MASK ) {
925
- ret = - EINVAL ;
926
- goto out ;
927
- }
928
-
929
- if (dbg -> control & KVM_GUESTDBG_ENABLE ) {
930
- vcpu -> guest_debug = dbg -> control ;
931
-
932
- /* Hardware assisted Break and Watch points */
933
- if (vcpu -> guest_debug & KVM_GUESTDBG_USE_HW ) {
934
- vcpu -> arch .external_debug_state = dbg -> arch ;
935
- }
922
+ if (dbg -> control & ~KVM_GUESTDBG_VALID_MASK )
923
+ return - EINVAL ;
936
924
937
- } else {
938
- /* If not enabled clear all flags */
925
+ if (!(dbg -> control & KVM_GUESTDBG_ENABLE )) {
939
926
vcpu -> guest_debug = 0 ;
940
927
vcpu_clear_flag (vcpu , DBG_SS_ACTIVE_PENDING );
928
+ return 0 ;
941
929
}
942
930
943
- out :
944
- return ret ;
931
+ vcpu -> guest_debug = dbg -> control ;
932
+
933
+ /* Hardware assisted Break and Watch points */
934
+ if (vcpu -> guest_debug & KVM_GUESTDBG_USE_HW )
935
+ vcpu -> arch .external_debug_state = dbg -> arch ;
936
+
937
+ return 0 ;
945
938
}
946
939
947
940
int kvm_arm_vcpu_arch_set_attr (struct kvm_vcpu * vcpu ,
You can’t perform that action at this time.
0 commit comments