All of lore.kernel.org
 help / color / mirror / Atom feed
From: Keir Fraser <keir@xen.org>
To: Jean Guyader <jean.guyader@eu.citrix.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
	"allen.m.kay@intel.com" <allen.m.kay@intel.com>
Subject: Re: [PATCH] hvmloader: Intel GPU passthrough, reverse OpRegion
Date: Thu, 24 Nov 2011 09:56:47 +0000	[thread overview]
Message-ID: <CAF3C55F.34BE1%keir@xen.org> (raw)
In-Reply-To: <20111124093551.GC22563@spongy.cam.xci-test.com>

On 24/11/2011 09:35, "Jean Guyader" <jean.guyader@eu.citrix.com> wrote:

> On 23/11 05:20, Keir Fraser wrote:
>> On 23/11/2011 16:07, "Jean Guyader" <jean.guyader@eu.citrix.com> 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?

You'll have to adjust your changes to build_e820_table() to split the range
RESERVED_MEMBASE-0x10000000 into two pieces partitioned by your NVS region.

The region starting at RESERVED_MEMBASE comes *before* your NVS region. Then
you add an another reserved region up to 0x1000000 if your NVS region
exists.

 -- Keir

> (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

  reply	other threads:[~2011-11-24  9:56 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-23 16:07 [PATCH] hvmloader: Intel GPU passthrough, reverse OpRegion Jean Guyader
2011-11-23 17:20 ` Keir Fraser
2011-11-23 17:28   ` Jean Guyader
2011-11-23 17:37     ` Jean Guyader
2011-11-24 11:18       ` Stefano Stabellini
2011-11-24 11:19         ` Jean Guyader
2011-11-24 11:25           ` Stefano Stabellini
2011-11-24  9:35   ` Jean Guyader
2011-11-24  9:56     ` Keir Fraser [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-11-24 14:53 Jean Guyader
2011-11-24 15:00 ` Jean Guyader

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAF3C55F.34BE1%keir@xen.org \
    --to=keir@xen.org \
    --cc=allen.m.kay@intel.com \
    --cc=jean.guyader@eu.citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.