From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37585) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wzum2-0001qb-Ia for qemu-devel@nongnu.org; Wed, 25 Jun 2014 17:30:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wzulu-0006eK-4b for qemu-devel@nongnu.org; Wed, 25 Jun 2014 17:30:34 -0400 Received: from cantor2.suse.de ([195.135.220.15]:57184 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wzult-0006dp-T0 for qemu-devel@nongnu.org; Wed, 25 Jun 2014 17:30:26 -0400 Message-ID: <53AB3F70.2060603@suse.de> Date: Wed, 25 Jun 2014 23:30:24 +0200 From: Alexander Graf 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> In-Reply-To: <1401695374-4287-7-git-send-email-eric.auger@linaro.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed 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: Eric Auger , eric.auger@st.com, christoffer.dall@linaro.org, qemu-devel@nongnu.org, kim.phillips@freescale.com, a.rigo@virtualopensystems.com Cc: peter.maydell@linaro.org, patches@linaro.org, stuart.yoder@freescale.com, alex.williamson@redhat.com, christophe.barnichon@st.com, a.motakis@virtualopensystems.com, kvmarm@lists.cs.columbia.edu On 02.06.14 09: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. > > The QEMU platform device becomes generic. > > Current choice is to reuse the "-device" option. > > For example when assigning Calxeda Midway xgmac device this option > is used: > -device vfio-platform,vfio_device="fff51000.ethernet",\ > compat="calxeda/hb-xgmac",mmap-timeout-ms=1000 I think we're walking into the right direction, but there is one major nit I have. I don't think we should have a -device vfio-platform. I think we should have a -device vfio-xgmac that maybe inherits from an abstrace vfio-platform class. That way machine code can assemble the device tree according to the device and you can also implement hardware specific hacks or dependencies if you need them - for example the MMIO masking to find an EOI you did earlier. Alex