From: Bob Montgomery <bob.montgomery@hp.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"vojtech@suse.cz" <vojtech@suse.cz>,
Linus Torvalds <torvalds@linux-foundation.org>,
"chandru@in.ibm.com" <chandru@in.ibm.com>,
Joerg Roedel <joerg.roedel@amd.com>,
FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>,
Yinghai Lu <yinghai@kernel.org>,
Jesse Barnes <jbarnes@virtuousgeek.org>,
Pavel Machek <pavel@ucw.cz>, Andi Kleen <ak@suse.de>
Subject: Re: [PATCH] disable CPU side GART accesses
Date: Mon, 27 Oct 2008 16:42:21 -0600 [thread overview]
Message-ID: <1225147341.2215.401.camel@amd.troyhebe> (raw)
In-Reply-To: <20081015234842.GA10999@elte.hu>
On Wed, 2008-10-15 at 23:48 +0000, Ingo Molnar wrote:
> (Cc:-ed the GART folks.)
Are there any objections to this patch? The problem has been reproduced
in 2.6.18 and 2.6.27, so existing changes in the gart code have not
addressed it.
The patch disarms a landmine left behind for the kdump kernel. You
could leave it there and warn people not to step there, or you can
disarm it so it isn't a danger.
Thank you,
Bob Montgomery
>
> * Bob Montgomery <bob.montgomery@hp.com> wrote:
>
> > This patch prevents improper access of the GART aperture from kdump
> > kernels running on AMD systems.
> >
> > Symptoms of the problem include hangs, spurious restarts, and MCE
> > (Machine Check Exception) panics in some AMD Opteron systems that
> > enable the GART IOMMU and access /proc/vmcore or /dev/oldmem from a
> > kdump kernel. Note that the GART IOMMU will not be enabled on systems
> > with less than 4 GB of RAM, so symptoms will not appear. This problem
> > has been reproduced on Family 10H Quad-Core AMD Opteron systems.
> >
> > This patch changes the initialization of the GART to set the
> > DISGARTCPU bit in the GART Aperture Control Register
> > (AMD64_GARTAPERTURECTL). Setting the bit prevents requests from the
> > CPUs from accessing the GART. In other words, CPU memory accesses to
> > the aperture address range will not cause the GART to perform an
> > address translation. The aperture area is currently being unmapped at
> > the kernel level with set_memory_np() in gart_iommu_init to prevent
> > accesses from the CPU, but that kernel level unmapping is not in
> > effect in the kexec'd kdump kernel. By disabling the CPU-side
> > accesses within the GART, which does persist through the kexec of the
> > kdump kernel, the kdump kernel is prevented from interacting with the
> > GART during accesses to the dump memory areas which include the
> > address range of the GART aperture. Although the patch can be applied
> > to the kdump kernel, it is not exercised there because the kdump
> > kernel doesn't attempt to initialize the GART, since it typically runs
> > in less than 4 GB of memory.
> >
> > Signed-off-by: Bob Montgomery <bob.montgomery@hp.com>
> >
> >
> > --- linux-2.6.27/include/asm-x86/gart.h 2008-10-13 16:36:34.000000000 -0600
> > +++ linux-2.6.27-fix/include/asm-x86/gart.h 2008-10-14 10:37:32.000000000 -0600
> > @@ -44,7 +44,8 @@ static inline void enable_gart_translati
> > /* Enable GART translation for this hammer. */
> > pci_read_config_dword(dev, AMD64_GARTAPERTURECTL, &ctl);
> > ctl |= GARTEN;
> > - ctl &= ~(DISGARTCPU | DISGARTIO);
> > + ctl |= DISGARTCPU;
> > + ctl &= ~(DISGARTIO);
> > pci_write_config_dword(dev, AMD64_GARTAPERTURECTL, ctl);
> > }
> >
> >
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
> > Please read the FAQ at http://www.tux.org/lkml/
next prev parent reply other threads:[~2008-10-27 22:42 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-15 21:48 [PATCH] disable CPU side GART accesses Bob Montgomery
2008-10-15 23:40 ` Linus Torvalds
2008-10-16 19:17 ` Bob Montgomery
2008-10-15 23:48 ` Ingo Molnar
2008-10-16 0:22 ` Yinghai Lu
2008-10-16 17:00 ` Bob Montgomery
2008-10-16 17:43 ` Yinghai Lu
2008-10-16 19:26 ` Bob Montgomery
2008-10-27 22:42 ` Bob Montgomery [this message]
2008-10-27 23:06 ` Yinghai Lu
2008-10-29 20:52 ` Bob Montgomery
2008-10-29 21:24 ` Dave Airlie
2008-10-29 21:32 ` Dave Jones
2008-10-29 21:40 ` Dave Airlie
2008-11-03 23:36 ` Bob Montgomery
2008-11-03 23:55 ` Dave Airlie
2008-11-19 22:12 ` Bob Montgomery
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=1225147341.2215.401.camel@amd.troyhebe \
--to=bob.montgomery@hp.com \
--cc=ak@suse.de \
--cc=chandru@in.ibm.com \
--cc=fujita.tomonori@lab.ntt.co.jp \
--cc=jbarnes@virtuousgeek.org \
--cc=joerg.roedel@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=pavel@ucw.cz \
--cc=torvalds@linux-foundation.org \
--cc=vojtech@suse.cz \
--cc=yinghai@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox