On Tuesday 30 December 2008 19:07:52 Avi Kivity wrote:
> Sheng Yang wrote:
> >>> + mutex_lock(&kvm->gsi_msg_lock);
> >>
> >> The lock is already taken here?
> >
> > Um? For gsi_msg_lock?
>
> Sorry, my mistake.  Will have to get used to all those locks.
>
> Is there a way to avoid the lock?  We're starting to complicate things...

Well, one list, one lock... But it's not very performance affect one, so maybe 
I can try kvm->lock...
>
> >> This looks very messy.  Would be better to have the in-kernel irq
> >> structure contain a (*set_level)() callback that can take the
> >> appropriate action.
> >
> > You means this part which would merged with ioapic, or something else?
>
> At the very least, separated into functions.
>
> At best, kvm_set_irq() should become generic and just invoke callbacks
> supplied by the irqchip (pit, ioapic, msi).

OK, I would separate it first. Callback function, a little later...

-- 
regards
Yang, Sheng


--
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