On Thu, Aug 02, 2012 at 04:26:29PM -0300, Marcelo Tosatti wrote:
> 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).
There are never too much asserts :), But I wouldn't want to resend the
series just for that, so if there are other comments that will require
me to resend the series anyway I'll add asserts too.

--
                        Gleb.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to