From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 1/4] KVM: Using kfifo for irq recording Date: Thu, 25 Dec 2008 13:07:22 +0200 Message-ID: <4953696A.5070307@redhat.com> References: <1230019973-16833-1-git-send-email-sheng@linux.intel.com> <1230019973-16833-2-git-send-email-sheng@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: Sheng Yang Return-path: Received: from mx2.redhat.com ([66.187.237.31]:39145 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751708AbYLYLH0 (ORCPT ); Thu, 25 Dec 2008 06:07:26 -0500 In-Reply-To: <1230019973-16833-2-git-send-email-sheng@linux.intel.com> Sender: kvm-owner@vger.kernel.org List-ID: Sheng Yang wrote: > For MSI-X, we have to deal with multiply IRQ with same IRQ handler, so it's > necessary to record the IRQ that trigger the IRQ handler. > > Does MSI-X disallowing coalescing two requests into one interrupt? Or can we still coalesce interrupts (perhaps by recording them as a (irq, cpu) pair?) > @@ -313,6 +314,9 @@ struct kvm_assigned_dev_kernel { > int host_irq; > bool host_irq_disabled; > int guest_irq; > +#define KVM_ASSIGNED_DEV_IRQ_FIFO_LEN 0x100 > + struct kfifo *irq_fifo; > + spinlock_t irq_fifo_lock; > #define KVM_ASSIGNED_DEV_GUEST_INTX (1 << 0) > What if it runs out? What does real hardware do? I'm sure it doesn't have a 100-entry queue. -- error compiling committee.c: too many arguments to function