From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Williamson Subject: Re: [SeaBIOS] Graphics card pass-through working with two pass pci-initialization Date: Wed, 01 Jun 2011 08:36:52 -0600 Message-ID: <1306939012.23217.7.camel@x201> References: <4DDCC7A5.60706@redhat.com> <4DDCF9ED.5050208@redhat.com> <4DDDDA8D.6080807@web.de> <4DDDF62C.2010603@redhat.com> <4DDF3768.5010002@web.de> <4DDF867A.9040700@siemens.com> <4DDFFE1E.1060900@web.de> <4DE3486F.10502@redhat.com> <20110531022922.GB10673@valinux.co.jp> <4DE5EA84.7040400@redhat.com> <20110601142029.GC3554@valinux.co.jp> <4DE64D55.3060105@siemens.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: Isaku Yamahata , Gerd Hoffmann , "seabios@seabios.org" , "kvm@vger.kernel.org" To: Jan Kiszka Return-path: Received: from mx1.redhat.com ([209.132.183.28]:46457 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756719Ab1FAOhH (ORCPT ); Wed, 1 Jun 2011 10:37:07 -0400 In-Reply-To: <4DE64D55.3060105@siemens.com> Sender: kvm-owner@vger.kernel.org List-ID: On Wed, 2011-06-01 at 16:31 +0200, Jan Kiszka wrote: > On 2011-06-01 16:20, Isaku Yamahata wrote: > > On Wed, Jun 01, 2011 at 09:30:12AM +0200, Gerd Hoffmann wrote: > >> Hi, > >> > >>> 0xE0000000 is hard-coded in the DSDT for both piix and q35 as below. > >>> If the range is determined dynamically, the area also needs to be > >>> updated somehow dynamically. > >>> > >>> ... > >>> Name (_CRS, ResourceTemplate () > >>> ... > >>> DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite, > >>> 0x00000000, // Address Space Granularity > >>> 0xE0000000, // Address Range Minimum > >>> 0xFEBFFFFF, // Address Range Maximum > >>> 0x00000000, // Address Translation Offset > >>> 0x1EC00000, // Address Length > >>> ,, , AddressRangeMemory, TypeStatic) > >> > >> Uhm, indeed. I know next to nothing about ACPI though. Ideas anyone > >> how this could be done? > > > > Right now what I can think of is. > > It would be possible to know the offset in AmlCode[] by > > compiling dsl with -l option. The we can get the mix of source and > > resulted hex with offset like > > > > iasl -l q35-acpi-dsdt.dsl.i > > => q35-acpi-dsdt.dsl.lst > > > > 192.... DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite, > > 193.... 0x00000000, > > 194.... 0xE0000000, > > 195.... 0xFEBFFFFF, > > 196.... 0x00000000, > > 197.... 0x1EC00000, > > 198.... ,, , AddressRangeMemory, TypeStatic) > > > > 00000F74....87 17 00 00 0C 01 00 00 "........" > > 00000F7C....00 00 00 00 00 E0 FF FF "........" > > 00000F84....BF FE 00 00 00 00 00 00 "........" > > 00000F8C....C0 1E .................. ".." > > 00000F8E....79 00 .................. "y." > > > > But this is very iasl specific and fragile... > > Why make this particular thing dynamic? Physical PCs need to define a > certain fixed PCI memory region as well and then live with it. IMHO, the > current setting is just too small for normal use. I don't think that's true. It's possible a BIOS could walk the PCI bus, figure out how much MMIO space it needs to reserve, then configure the chipset to re-route the necessary memory and build the DSDT. Hardly anything is actually fixed within the chipset AIUI. Thanks, Alex