From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46128) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X04I6-0007ZA-QE for qemu-devel@nongnu.org; Thu, 26 Jun 2014 03:40:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X04I1-0000tf-Kn for qemu-devel@nongnu.org; Thu, 26 Jun 2014 03:40:18 -0400 Received: from mail-wi0-f179.google.com ([209.85.212.179]:46225) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X04I1-0000tX-Ez for qemu-devel@nongnu.org; Thu, 26 Jun 2014 03:40:13 -0400 Received: by mail-wi0-f179.google.com with SMTP id cc10so472346wib.6 for ; Thu, 26 Jun 2014 00:40:12 -0700 (PDT) Message-ID: <53ABCE4A.9080702@linaro.org> Date: Thu, 26 Jun 2014 09:39:54 +0200 From: Eric Auger MIME-Version: 1.0 References: <1401695374-4287-1-git-send-email-eric.auger@linaro.org> <1401695374-4287-7-git-send-email-eric.auger@linaro.org> <53AB4D2A.7000100@suse.de> In-Reply-To: <53AB4D2A.7000100@suse.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC v3 06/10] virt: Assign a VFIO platform device with -device option List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf , Peter Maydell Cc: Kim Phillips , eric.auger@st.com, Patch Tracking , QEMU Developers , Alvise Rigo , Alex Williamson , christophe.barnichon@st.com, Stuart Yoder , Antonios Motakis , "kvmarm@lists.cs.columbia.edu" , Christoffer Dall On 06/26/2014 12:28 AM, Alexander Graf wrote: > > On 26.06.14 00:28, Peter Maydell wrote: >> On 2 June 2014 08:49, Eric Auger wrote: >>> This patch aims at allowing the end-user to specify the device he >>> wants to directly assign to his mach-virt guest in the QEMU command >>> line. >>> hw/arm/virt.c | 222 >>> +++++++++++++++++++++++++++++++++++++++++--------- >> This is way too much code to be adding to virt.c. I really don't >> want to be dealing with VFIO related code in board models >> beyond an absolute minimal "go do vfio stuff if the user asked >> for it" set of hooks. Hi Alex, Peter, Thanks for your comments. I am currently preparing v4 where I use the same technique as Alex did in [PATCH 4/5] PPC: e500: Support platform devices (http://lists.gnu.org/archive/html/qemu-devel/2014-06/msg00847.html), ie. using - qemu_add_machine_init_done_notifier - qemu_register_reset, which seems to be the right clean way to do what I tried to achieve here. Alex, actually I am reusing the code you put in e500, moved it in a separate helper file. That way, effectively, I will be able to have very few vfio specific code in the machine file. Best Regards Eric > > And device tree chunks :). > > > Alex >