On 18.02.20 10:12, David Hildenbrand wrote: ock the VCPU, it cannot be running, right? > >> + kvm_for_each_vcpu(i, vcpu, kvm) { >> + mutex_lock(&vcpu->mutex); >> + r = kvm_s390_pv_destroy_cpu(vcpu, rc, rrc); >> + mutex_unlock(&vcpu->mutex); >> + if (r) >> + break; >> + } > > Can this actually ever fail? Every reason for failure seems to be wrong usage by KVM. So it should not fail and if if does we should probably warn. If so, you would leave half-initialized > state around. Warn and continue? So yes, maybe warn and try to continue to destroy the remaining CPUs. > > Especially, kvm_arch_vcpu_destroy() ignores any error from > kvm_s390_pv_destroy_cpu() as well ... > > IMHO, we should make kvm_s390_switch_from_pv() and > kvm_s390_pv_destroy_cpu() never fail. ack.