From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:38631) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qchs3-0004GR-OH for qemu-devel@nongnu.org; Fri, 01 Jul 2011 13:51:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qchs1-0001E0-Vu for qemu-devel@nongnu.org; Fri, 01 Jul 2011 13:51:15 -0400 Received: from db3ehsobe003.messaging.microsoft.com ([213.199.154.141]:39751 helo=DB3EHSOBE003.bigfish.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qchs1-0001De-CW for qemu-devel@nongnu.org; Fri, 01 Jul 2011 13:51:13 -0400 Date: Fri, 1 Jul 2011 12:51:07 -0500 From: Scott Wood Message-ID: <20110701125107.4ca49c61@schlenkerla.am.freescale.net> In-Reply-To: <201107011216.36181.paul@codesourcery.com> References: <9F6FE96B71CF29479FF1CDC8046E1503165EEB@039-SN1MPN1-003.039d.mgd.msft.net> <201107011216.36181.paul@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] device assignment for embedded Power List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paul Brook Cc: Wood Scott-B07421 , Alexander Graf , "qemu-devel@nongnu.org" , "blauwirbel@gmail.com" , Yoder Stuart-B08248 , "alex.williamson@redhat.com" , "joerg.roedel@amd.com" , "dwg@au1.ibm.com" , "armbru@redhat.com" On Fri, 1 Jul 2011 12:16:35 +0100 Paul Brook wrote: > > One feature we need for QEMU/KVM on embedded Power Architecture is the > > ability to do passthru assignment of SoC I/O devices and memory. An > > important use case in embedded is creating static partitions-- > > taking physical memory and I/O devices (non-PCI) and partitioning > > them between the host Linux and several virtual machines. Things like > > live migration would not be needed or supported in these types of > > scenarios. > > > > SoC devices do not sit on a probeable bus and there are no identifiers > > like 01:00.0 with PCI that we can use to identify devices-- the host > > Linux kernel is made aware of SoC I/O devices from nodes/properties in a > > device tree structure passed at boot. QEMU needs to generate a > > device tree to pass to the guest as well with all the guest's virtual > > and physical resources. Today a number of mostly complete guest device > > trees are kept under ./pc-bios in QEMU, but this too static and > > inflexible. > > I doubt you're going to get generic passthrough of arbitrary devices working > in a useful way. It's usefully working for us internally -- we're just trying to find a way to improve it for upstream, with a better configuration mechanism. > My expectation is that, at minimum, you'll need a bus > specific proxy device. i.e. create a virtual device in qemu that responds to > the guest, and happens poke at a host device rather than emulating things > directly. Many of these embedded devices don't sit on any sort of software-visible bus, and requiring that the I/O happen via MMIO traps would result in unacceptable overhead. > Basically you have to emulate everything that is different between the host and guest. Directly assigning a device means you don't get to have differences between the actual hardware device and what the guest sees. The kind of thin wrapper you're suggesting might have some use cases, but it's a different problem from what we're trying to solve. -Scott