On Thursday 09 October 2008 16:34:47 Avi Kivity wrote:
> Sheng Yang wrote:
> > Also remove unnecessary parameter of unregister irq ack notifier.
> >
> > diff --git a/virt/kvm/irq_comm.c b/virt/kvm/irq_comm.c
> > index d0169f5..54b251d 100644
> > --- a/virt/kvm/irq_comm.c
> > +++ b/virt/kvm/irq_comm.c
> > @@ -50,11 +50,15 @@ void kvm_notify_acked_irq(struct kvm *kvm, unsigned
> > gsi) void kvm_register_irq_ack_notifier(struct kvm *kvm,
> >                                struct kvm_irq_ack_notifier *kian)
> >  {
> > +   /* Must be called with in-kernel IRQ chip, otherwise it's nonsense */
> > +   ASSERT(irqchip_in_kernel(kvm));
> > +   ASSERT(kian);
> >     hlist_add_head(&kian->link, &kvm->arch.irq_ack_notifier_list);
> >  }
>
> We don't want a BUG() here is the user specifies -no-kvm-irqchip; is
> there a check on the irq assignment ioctls before calling this?

Yes. kvm_register_irq_ack_notifier should be called within irqchip_in_kernel() 
(on the other side, only if we have irqchip_in_kernel(), ack_notifier is 
useful, so we shouldn't call it without it), And I can't see if this would be 
useful with userspace irqchip, so add a ASSERT here. 

--
regards
Yang, Sheng
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to