From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jan Beulich" Subject: Re: making changes to agp code? Date: Tue, 27 Mar 2007 07:41:25 +0100 Message-ID: <4608D8B5.76E4.0078.0@novell.com> References: <1449F58C868D8D4E9C72945771150BDFD96770@SAUSEXMB1.amd.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1449F58C868D8D4E9C72945771150BDFD96770@SAUSEXMB1.amd.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Mark Langsdorf Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org >>> "Langsdorf, Mark" 26.03.07 22:03 >>> >As part of my endless quest to enable GART/IOMMU, I >realized I need to make a slight change to a static >function inside of agp-amd64.c. Currently Xen doesn't >have -xen variants of the AGP code. Is there a >better way to handle this than sucking in the entire >AGP tree into xen-sparse? If the change is as small as you describe, I'd suggest doing it in the file itself by means of adding a patch in patches/linux-2.6.18/, with the change properly protected by #ifdef CONFIG_XEN or alike. >As far what I need to change: > pci-gart calls agp_amd64_init() to determine if >the aperture is provided by the BIOS, or if one >needs to be allocated. agp_amd64_init() calls >agp_amd64_probe() which calls another function >and so forth, and eventually aperture_valid() >calls >PageReserved(pfn_to_page(aperture >> PAGE_SHIFT)). >The page isn't actually reserved, but dom0 thinks >it is, and the operation fails. I would like to >do something more intelligent. >>From that description I'm getting afraid that this code is currently broken anyway, i.e. the change you intend to make is needed immediately and regardless of your iommu work. May I ask what your intended replacement is? Jan