From: Rusty Russell Subject: Re: [PATCH 2/3] virtio ring implementation Date: Tue, 25 Sep 2007 09:43:38 +1000 Message-ID: <1190677418.27805.231.camel@localhost.localdomain> References: <1190625194.27805.199.camel@localhost.localdomain> <1190625256.27805.201.camel@localhost.localdomain> <1190625307.27805.203.camel@localhost.localdomain> <46F7BF41.9060705@qumranet.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel , virtualization To: dor.laor-atKUWr5tajBWk0Htik3J/w@public.gmane.org Return-path: In-Reply-To: <46F7BF41.9060705-atKUWr5tajBWk0Htik3J/w@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org On Mon, 2007-09-24 at 15:44 +0200, Dor Laor wrote: > Seems like there is a problem with shared irq line, the interrupt > handler always returns IRQ_HANDLED (except for the trivial case > were the callback is null). > > It can be solved by having a host irq counter (in the shared ring) and > a guest irq counter and return > mb(); return (host_counter!=guest_counter)? IRQ_HANDLED:IRQ_NONE; Or we could make the callback return irqreturn_t and have an explicit "disable" hook to disable interrupts. Using the return value of the callback to disable the queue has always made be a little uncomfortable, but it's slightly more efficient than a separate hook. Thanks, Rusty. ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/