From: Will Deacon Subject: Re: [RFC PATCH 08/16] kvm tools: add generic device registration mechanism Date: Tue, 13 Nov 2012 10:24:15 +0000 Message-ID: <20121113102414.GA3940@mudshark.cambridge.arm.com> References: <1352721450-11340-1-git-send-email-will.deacon@arm.com> <1352721450-11340-9-git-send-email-will.deacon@arm.com> <50A1CCAD.2080001@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: 8BIT Cc: "kvm@vger.kernel.org" , "penberg@kernel.org" , Marc Zyngier , "c.dall@virtualopensystems.com" , Matt Evans , "peter.maydell@linaro.org" To: Sasha Levin Return-path: Received: from service87.mimecast.com ([91.220.42.44]:50786 "EHLO service87.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754470Ab2KMKYV convert rfc822-to-8bit (ORCPT ); Tue, 13 Nov 2012 05:24:21 -0500 In-Reply-To: <50A1CCAD.2080001@gmail.com> Content-Disposition: inline Sender: kvm-owner@vger.kernel.org List-ID: Hi Sasha, On Tue, Nov 13, 2012 at 04:29:33AM +0000, Sasha Levin wrote: > On 11/12/2012 06:57 AM, Will Deacon wrote: > > diff --git a/tools/kvm/devices.c b/tools/kvm/devices.c > > new file mode 100644 > > index 0000000..f9666b9 > > --- /dev/null > > +++ b/tools/kvm/devices.c > > @@ -0,0 +1,24 @@ > > +#include "kvm/devices.h" > > +#include "kvm/kvm.h" > > + > > +#include > > + > > +static struct device_header *devices[KVM_MAX_DEVICES]; > > Does it really have a hard limit at KVM_MAX_DEVICES? Or can we turn it into > something more dynamic (list/tree/whatever)? Sure, I'm happy to change the datatype to something more appropriate. Matt also suggested trying to split up PCI devices from MMIO devices so that they have their own ID namespaces, so I'll need to have a play. Cheers, Will