On 1/5/23 23:23, Sean Christopherson wrote: > Ha! Case in point. The aforementioned Xen code blatantly violates KVM's locking > rules: > > - kvm->lock is taken outside vcpu->mutex > FWIW, I guess this looks like a violation of the same sort: kvm_vcpu_ioctl() mutex_lock_killable(&vcpu->mutex) kvm_arch_vcpu_ioctl() kvm_xen_vcpu_get_attr() / kvm_xen_vcpu_set_attr() mutex_lock(&vcpu->kvm->lock) > In other words, I'm find with this patch for optimization purposes, but I don't > think we should call it a bug fix. (...) Sure, resending as such, along with minor fixes. thanks, Michal