From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cyrill Gorcunov Subject: Re: [PATCH 1/2] kvm tools: Fix IRQ assignments Date: Fri, 06 May 2011 11:31:05 +0400 Message-ID: <4DC3A3B9.4020509@gmail.com> References: <1304666795-15251-1-git-send-email-levinsasha928@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Sasha Levin , mingo@elte.hu, asias.hejun@gmail.com, prasadjoshi124@gmail.com, kvm@vger.kernel.org To: Pekka Enberg Return-path: Received: from mail-ww0-f44.google.com ([74.125.82.44]:55246 "EHLO mail-ww0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753932Ab1EFHbK (ORCPT ); Fri, 6 May 2011 03:31:10 -0400 Received: by wwa36 with SMTP id 36so3211422wwa.1 for ; Fri, 06 May 2011 00:31:09 -0700 (PDT) In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On 05/06/2011 11:29 AM, Pekka Enberg wrote: > On Fri, May 6, 2011 at 10:26 AM, Sasha Levin wrote: >> virtio-blk needs a block of 4 IRQs (currently - staticly defined). >> Giving the initial IRQ of 15 causes breakage when adding more >> than one device. >> >> Signed-off-by: Sasha Levin > > Can we make the allocation dynamic instead? AFAICT, it could be a simple as > > int kvm__request_irq(struct kvm *kvm) > { > return kvm->next_irq++; > } > > that's done at device init time and then we'd just add "int irq" to > the individual struct devices. > > Pekka Yes, but start with 0x40 as initial vector for devices please. -- Thanks, Cyrill