All of lore.kernel.org
 help / color / mirror / Atom feed
From: Uli Meis <um@amd64.org>
To: Keir Fraser <Keir.Fraser@cl.cam.ac.uk>
Cc: xen-devel@lists.xensource.com, "Langsdorf,
	Mark" <mark.langsdorf@amd.com>, Jan Beulich <jbeulich@novell.com>
Subject: Re: [PATCH] Enable K8 GART as an IOMMU
Date: Wed, 14 Feb 2007 15:33:05 +0100	[thread overview]
Message-ID: <20070214143305.GB6490@amd64.org> (raw)
In-Reply-To: <C1F88F46.1B9B%Keir.Fraser@cl.cam.ac.uk>

On Wed 14.02.07 10:04, Keir Fraser wrote:
> On 13/2/07 23:19, "Langsdorf, Mark" <mark.langsdorf@amd.com> wrote:
> 
> >>> /* Protected by balloon_lock. */
> >>> -#define MAX_CONTIG_ORDER 9 /* 2MB */
> >>> +#define MAX_CONTIG_ORDER 16 /* 256MB */
> >>> static unsigned long discontig_frames[1<<MAX_CONTIG_ORDER];
> >>> static multicall_entry_t cr_mcl[1<<MAX_CONTIG_ORDER];
> >> 
> >> This seems dangerous to me.
> > 
> > We need at least 64MB of contiguous memory for the aperture.
> 
> Not that I know anything much about the K8 GART, but I assume the aperture
> is an address range that the GART takes control of and dynamically aliases
> other RAM pages into? Is it necessary to burn 64MB of RAM (which is
> presumably inaccessible when the GART is turned on)? Will the BIOS not
> already have conveniently piointed the aperture into a RAM hole (e.g., just
> below 4GB)?

Usually, yes, the BIOS should allocate the aperture. However, on all
systems I've tested on the BIOS allocated only 32MB (probably because
they had no AGP). Sometimes it would even keep the memory location that
was set on the last boot---potentially pointing to usable RAM.

The patch will only allocate the aperture from RAM if the BIOS reserved
less than 64MB. In that case, it will also make the call to
xen_create_contiguous_region. The memory is lost. There's also a boot
mesage telling people that.

Concerning the availability of 64MB contiguous RAM: The hypervisor keeps
if dom0_mem is unspecified 1/16th of memory free, which is for >4GB
systems (where one needs a GART) at least 256MB. Therefore, the
allocation should always succeed unless someone's tweaking that
parameter.

Uli

  reply	other threads:[~2007-02-14 14:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-12 17:47 [PATCH] Enable K8 GART as an IOMMU Langsdorf, Mark
2007-02-13  8:47 ` Jan Beulich
2007-02-13 23:19   ` Langsdorf, Mark
2007-02-14  9:21     ` Jan Beulich
2007-02-14 10:04     ` Keir Fraser
2007-02-14 14:33       ` Uli Meis [this message]
2007-02-14 14:51         ` Keir Fraser
2007-02-13 13:42 ` Muli Ben-Yehuda

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=20070214143305.GB6490@amd64.org \
    --to=um@amd64.org \
    --cc=Keir.Fraser@cl.cam.ac.uk \
    --cc=jbeulich@novell.com \
    --cc=mark.langsdorf@amd.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.