From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33085) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VJlTP-0003jd-La for qemu-devel@nongnu.org; Wed, 11 Sep 2013 10:32:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VJlTJ-0003tf-N3 for qemu-devel@nongnu.org; Wed, 11 Sep 2013 10:32:51 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33834) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VJlTJ-0003t8-EE for qemu-devel@nongnu.org; Wed, 11 Sep 2013 10:32:45 -0400 Message-ID: <52307F07.6010303@redhat.com> Date: Wed, 11 Sep 2013 16:32:39 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1378877909-28518-1-git-send-email-famz@redhat.com> <1378877909-28518-5-git-send-email-famz@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC PATCH v5 4/6] module: implement module loading function List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alex Bligh Cc: peter.maydell@linaro.org, Fam Zheng , mjt@tls.msk.ru, qemu-devel@nongnu.org, stefanha@redhat.com, vilanova@ac.upc.edu, rth@twiddle.net Il 11/09/2013 16:10, Alex Bligh ha scritto: > > > --On 11 September 2013 13:38:27 +0800 Fam Zheng wrote: > >> + switch (type) { >> + case MODULE_LOAD_BLOCK: >> + path = CONFIG_PREFIX "/qemu/block/"; >> + break; >> + case MODULE_LOAD_UI: >> + path = CONFIG_PREFIX "/qemu/ui/"; >> + break; >> + case MODULE_LOAD_NET: >> + path = CONFIG_PREFIX "/qemu/net/"; >> + break; >> + default: >> + return; >> + } >> + > > I appreciate I am coming in late into this discussion, and am only scanning > the code quickly, so apologies if I have the wrong end of the stick. You're absolutely not coming in late! So far we really just discussed the build side of the implementation, and I didn't review this patch at all. > This APPEARS to load modules from > a) a fixed path determined at compile time > b) a path which is not dependent on qemu version c) a path that is not under the normal /usr/lib or similar path. > This would make it hard to have 2 versions of qemu installed on a > system at once, or even develop one version of qemu with another > version installed. This is hard anyway because the firmware files are not necessarily compatible with different QEMU versions. With 2 versions of QEMU installed on a system, I would suggest putting both of them in different subdirectories under /opt. However, (c) is a problem and... > I suspect this will be hard not only for developers, > but also for distributions, particularly if the idea is to keep vms > running during upgrades. Consider the case where packages A and B > both depend on qemu module package C, then you wish to upgrade to > A', B' and C'. At some point you are likely to want both C and C' > installed. Is the idea here that QEMU is always built with CONFIG_PREFIX > having versioning inside it (in a distro environment)? > > Can I suggest that at the very least, it should be possible to specify > an alternate path to the module directory via the CLI? ... this is also a good idea. Probably it should use an algorithm similar to that used for data_dir. Paolo