Re: [PATCH] Enable GART-IOMMU only after setting up protection methods

From: Yinghai Lu
Date: Thu Apr 09 2009 - 00:44:22 EST


On Wed, Apr 8, 2009 at 2:08 PM, Mark Langsdorf <mark.langsdorf@xxxxxxx> wrote:
> The current code to set up the GART as an IOMMU enables GART
> translations before it removes the aperture from the kernel
> memory map, sets the GART PTEs to UC, sets up the guard and
> scratch pages, or does a wbinvd().  This leaves the possibility
> of cache aliasing open and can cause system crashes.
>
> Re-order the code and add tlbflush so as to enable the
> GART translations only after all safeguards are in place and
> the tlb has been flushed.
>
> AMD has tested this patch and seen no adverse effects.

how about system with AGP card and more than 4g system RAM?

also it seems flush_gart() in init_k8_gatt() and gart_iommu_init()
could be removed?

YH
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/