All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Langsdorf, Mark" <mark.langsdorf@amd.com>
To: Jan Beulich <jbeulich@novell.com>
Cc: xen-devel@lists.xensource.com
Subject: RE: making changes to agp code?
Date: Wed, 28 Mar 2007 10:21:26 -0500	[thread overview]
Message-ID: <1449F58C868D8D4E9C72945771150BDFD9679F@SAUSEXMB1.amd.com> (raw)
In-Reply-To: <460A9248.76E4.0078.0@novell.com>

> >>> "Langsdorf, Mark" <mark.langsdorf@amd.com> 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?
> >
> >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.
> 
> On a second look I believe the implementation is broken even 
> on native, as long as !CONFIG_FLATMEM, since there's an
> assumption that an invalid PFN cannot be followed by a valid
> one. For that reason, I think the code needs to be changed to
> call e820_any_mapped() (just like aperture.c does). I have a
> tentative patch to do that, but don't have a working box with
> an 8151.

I do.  You can send it to me for testing.

I was playing with that box yesterday, and I discovered
that Xen allocates guest virtual memory over the AGP
aperture if dom0 memory is greater than 4G, even though
the e820 map says it shouldn't.  I didn't have a lot of
spare cycles yesterday to deal with the implications of
that, and maybe it can be safely ignored.  Any thoughts?

-Mark Langsdorf
AMD, Inc. 

  reply	other threads:[~2007-03-28 15:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-26 20:03 making changes to agp code? Langsdorf, Mark
2007-03-27  6:41 ` Jan Beulich
2007-03-28 14:05 ` Jan Beulich
2007-03-28 15:21   ` Langsdorf, Mark [this message]
2007-03-28 15:43     ` Keir Fraser
2007-03-28 15:53       ` Jan Beulich
2007-03-28 15:55     ` Jan Beulich
2007-03-28 22:37       ` Langsdorf, Mark
2007-03-29  7:23         ` Jan Beulich

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=1449F58C868D8D4E9C72945771150BDFD9679F@SAUSEXMB1.amd.com \
    --to=mark.langsdorf@amd.com \
    --cc=jbeulich@novell.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.