Received: from eggs.gnu.org ([2001:4830:134:3::10]:49389) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WBgzT-0007YB-Hr for qemu-devel@nongnu.org; Fri, 07 Feb 2014 03:40:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WBgzN-0005RY-CL for qemu-devel@nongnu.org; Fri, 07 Feb 2014 03:40:51 -0500 Received: from mx1.redhat.com ([209.132.183.28]:60043) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WBgzN-0005RT-2E for qemu-devel@nongnu.org; Fri, 07 Feb 2014 03:40:45 -0500 Date: Fri, 7 Feb 2014 16:40:42 +0800 From: Fam Zheng Message-ID: <20140207084042.GB2932@T430.nay.redhat.com> References: <1391729892-17783-1-git-send-email-pbonzini@redhat.com> <52F4879E.7040300@redhat.com> <52F495C8.8030800@msgid.tls.msk.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <52F495C8.8030800@msgid.tls.msk.ru> Subject: Re: [Qemu-devel] [PATCH v18 00/10] Shared library module support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michael Tokarev Cc: Kevin Wolf , Peter Maydell , Peter Maydell , Alex Bligh , QEMU Developers , Stefan Hajnoczi , Paolo Bonzini , Miroslav Rezanina , Lluis Vilanova , Richard Henderson On Fri, 02/07 12:14, Michael Tokarev wrote: > 07.02.2014 11:13, Paolo Bonzini wrote: > > Il 07/02/2014 01:06, Peter Maydell ha scritto: > >> Why do we need OS specific code to do this when the code > >> in vl.c for getting the executable path to use as a base for > >> finding bios blobs works fine without OS specific code? > > > > That's because right now module_call_init is not receiving an argv[0] to pass to qemu_exec_dir (os_find_datadir has an argument for that). It can be fixed (in the whole call chain, including e.g. bdrv_init/bdrv_init_with_whitelist). > > We can add a global variable (either executable_dir or whole -L path), > init it in vl.c as we do now, and use it in other places in a uniform > way. "-L" path doesn't apply to command line tools such as qemu-img, but yes, storing the executable_dir will be helpful anyway. > > BTW, It'd be really good to have a separate, arch-specific directory for > the plugins, like /usr/lib/x86_64-linux-gnu/qemu/, so it will be > multiarch-able. But it is not really a show-stopper. > An optional --moddir configure option would do, but it can be a separate patch. Fam