From: Jean Guyader Subject: Re: [PATCH] hvmloader: Intel GPU passthrough, reverse OpRegion Date: Thu, 24 Nov 2011 09:35:51 +0000 Message-ID: <20111124093551.GC22563@spongy.cam.xci-test.com> References: <1322064460-22248-1-git-send-email-jean.guyader@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser Cc: "xen-devel@lists.xensource.com" , "allen.m.kay@intel.com" , Jean Guyader List-Id: xen-devel@lists.xenproject.org On 23/11 05:20, Keir Fraser wrote: > On 23/11/2011 16:07, "Jean Guyader" wrote: > > > > > The Intel GPU uses a two pages NVS region called OpRegion. > > In order to get full support for the driver in the guest > > we need to map this region. > > > > This patch reserves 2 pages on the top of the RAM and > > mark this region as NVS in the e820. Then we write the > > address to the config space (offset 0xfc) so the device > > model can map the OpRegion at this address in the guest. > > Please use mem_hole_alloc() rather than adjusting {low,high}_mem_pgend. > I'm calling mem_hole_alloc() in pci_setup (see patch attached), but that causes an overlap in e820, is that expected? (XEN) HVM5: E820 table: (XEN) HVM5: [00]: 00000000:00000000 - 00000000:0009e000: RAM (XEN) HVM5: [01]: 00000000:0009e000 - 00000000:000a0000: RESERVED (XEN) HVM5: HOLE: 00000000:000a0000 - 00000000:000e0000 (XEN) HVM5: [02]: 00000000:000e0000 - 00000000:00100000: RESERVED (XEN) HVM5: [03]: 00000000:00100000 - 00000000:3f800000: RAM (XEN) HVM5: HOLE: 00000000:3f800000 - 00000000:feff8000 (XEN) HVM5: [04]: 00000000:feff8000 - 00000000:feffa000: NVS (XEN) HVM5: OVERLAP!! (XEN) HVM5: [05]: 00000000:fc000000 - 00000001:00000000: RESERVED Jean