From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Williamson Subject: Re: Device pass-through Date: Tue, 03 Jan 2012 14:34:44 -0700 Message-ID: <1325626484.4305.15.camel@bling.home> References: <4F02086A.6050607@eburg.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: Gordon Messmer Return-path: Received: from mx1.redhat.com ([209.132.183.28]:42368 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754125Ab2ACVer (ORCPT ); Tue, 3 Jan 2012 16:34:47 -0500 In-Reply-To: <4F02086A.6050607@eburg.com> Sender: kvm-owner@vger.kernel.org List-ID: On Mon, 2012-01-02 at 11:41 -0800, Gordon Messmer wrote: > I'm going to summarize my questions first and write the long explanation > afterward... > > 1: What happens when Linux rejects the aperture allocated by the BIOS > for an AMD IOMMU? This is actually the GART aperture, which Linux will try to use as an IOMMU. You can pretty much ignore this, but it may be wasting memory for no good reason if it's really hiding usable memory and allocating a bounce buffer area. The important lines for device assignment are these: AMD-Vi: Enabling IOMMU at 0000:00:00.2 cap 0x40 AMD-Vi: Initialized for Passthrough Mode AMD-Vi: Enabling IOMMU at 0000:00:00.2 cap 0x40 > 2: What is unsafe about the allow_unsafe_assigned_interrupts option? > What are the potential consequences of its use? The host is potentially exposed to a malicious guest trying to trigger MSI interrupts for denial of service or exploit probing. If you trust your guest, it's safe to allow this. > 3: How can I get the ROM from a graphics card? Not sure, if the cards are identical, try using the one from the primary adapter. ISTR the Xen folks had some interesting methods for getting these, google for graphics pass through on xen. Assignment of graphics cards isn't supported. Your use as a secondary head on the VM may be possible, but I wouldn't be surprised if it doesn't work. > 4: What do these errors mean, and is there any way I can correct the > problem? > > create_userspace_phys_mem: File exists > > assigned_dev_iomem_map: Error: create new mapping failed Might mean the resources for the graphics card are getting mapped to overlap with guest memory. What does lspci -v for the graphics card show? More recent changes upstream might make better use of the space we have for devices, might be worth a test. Alex