From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cyrill Gorcunov Subject: Re: [PATCH 2/3 V2] kvm tools: Add support for multiple virtio-blk Date: Wed, 04 May 2011 18:51:06 +0400 Message-ID: <4DC167DA.603@gmail.com> References: <1304516717-24512-1-git-send-email-levinsasha928@gmail.com> <1304516717-24512-3-git-send-email-levinsasha928@gmail.com> <20110504135616.GA11941@elte.hu> <1304520268.22299.6.camel@lappy> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Ingo Molnar , penberg@kernel.org, kvm@vger.kernel.org, asias.hejun@gmail.com, prasadjoshi124@gmail.com To: Sasha Levin Return-path: Received: from mail-ey0-f174.google.com ([209.85.215.174]:59277 "EHLO mail-ey0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754165Ab1EDOvL (ORCPT ); Wed, 4 May 2011 10:51:11 -0400 Received: by eyx24 with SMTP id 24so379187eyx.19 for ; Wed, 04 May 2011 07:51:10 -0700 (PDT) In-Reply-To: <1304520268.22299.6.camel@lappy> Sender: kvm-owner@vger.kernel.org List-ID: On 05/04/2011 06:44 PM, Sasha Levin wrote: ... >> >> There should really be a helper function for these initializations - and a loop >> that creates VIRTIO_BLK_MAX_DEV of them, right? >> >> Also, the IRQs used by kvm should be enumerated in an include file in a single >> place, with ranges allocated for specific purposes, otherwise we'll quickly >> lose track of them. >> > > The plan is that mptable.c is going to change either way, Cyrill noted > we need a way to manage IRQs earlier in that file. That's also why I > tried not changing it too much. > ... Sasha, I simply out of time, sorry guys. So if you can -- move irqs into separate file and make loop for block devices this would be great I guess. We need a global collector/manager for pins/irqs so caller would do something like irq_alloc(struct irq_cfg *req) where struct irq_cfg { int flags; int vector; int pin; } or something like that. I don't have a clear picture yet. Ingo, on the other hands, maybe open-coded snippets would be fine for a while? -- Thanks, Cyrill