On Mon, Jul 30, 2012 at 05:38:18PM +0300, Gleb Natapov wrote: > int r; > @@ -5554,9 +5568,13 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) > } > } > > - r = complete_mmio(vcpu); > - if (r <= 0) > - goto out; > + if (unlikely(vcpu->arch.complete_userspace_io)) { > + int (*cui)(struct kvm_vcpu *) = vcpu->arch.complete_userspace_io; > + vcpu->arch.complete_userspace_io = NULL; > + r = cui(vcpu); > + if (r <= 0) > + goto out; > + } Would it be worthwhile to add BUG/WARN_ONs here checking for variables that represent valid mmio/pio, but without complete_userspace_io function pointer set? (you do that in the reverse case, inside the complete_userspace_io function pointers). -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html