Re: IOMMUs was Re: Intel vs AMD x86-64

From: Benjamin Herrenschmidt (benh_at_kernel.crashing.org)
Date: 02/25/04

  • Next message: Dave Jones: "usb-uhci rmmod fun"
    To: Andi Kleen <ak@suse.de>
    Date:	Wed, 25 Feb 2004 11:36:25 +1100
    
    

    > Arjan suggested it some time ago already. In fact I implemented it, it's in the current code.
    > But it caused data corruption with a few devices, in particular 3ware, so I had
    > to disable it again. I didn't find a bug in the code. It worked fine with others. My theory
    > was that it triggered some hardware bug that was normally masked by the frequent flushes, but
    > I wasn't able to track it down without heavy equipment.

    Interesting. I'm having a data corruption issue with the G5 iommu that
    I can fix by always mapping everything. That is non-mapped virtual
    IO pages are actually mapped to a dummy RAM page. It seems there is a
    problem with the PCI<->HT bridge doing prefetches beyond iommu mapped
    pages, thus triggering an iommu error, which in turns probably triggers
    some other chipset bug ending up in data corruption. Having everything
    mapped (allowing prefetch to complete even while prefetched data is
    actually useless) fixes the problem and we don't see any corruption.

    Of course, that means we can not longer use the mecanism we first
    implemented where we would only flush the iommu TLB once after runnning
    out of virtual pages to allocate. We have to flush on every insertion
    and removal now :( On the other hand, we can probably do per-tag TLB
    flushes instead of flushing the whole TLB once we properly figure out
    how to access the tag registers on the chipset and their format (the
    darwin source code seem to imply that is doable, but doesn't actually
    use that, but in this regard, apple's implementation is impressively
    sub-optimal).

    Ben.

    -
    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 message: Dave Jones: "usb-uhci rmmod fun"

    Relevant Pages

    • mysterious memory corruption, very confused
      ... I get random data corruption when trying to execute queries. ... This is not specific to boolean data; I have also had it happen on strings, ... I'm afraid I can't make this bug report much more useful, ... I don't know how the garbage collector works, ...
      (comp.lang.ruby)
    • Re: Privileged Instruction exception in Release build
      ... Did you do a full rebuild after changing the size of any structures ... virtual methods, or making an existing method virtual, or making an ... Possible uninitialised memory problem, leading to data corruption, ... Possible bad message map, leading to stack corruption, leading to bug ...
      (microsoft.public.vc.mfc)
    • Re: [PATCH] JMicron JM20337 USB-SATA data corruption bugfix - device 152d:2338
      ... the bug is not detected as an error and incorrect data is returned, causing insidious data corruption ... the patch provides a crude workaround by detecting the error condition ...
      (Linux-Kernel)
    • Re: patch: fix 30 second hang while resuming
      ... Augh. ... >> the import since the patches are minor and data corruption is ... > Your original message only mentioned a long-delay when resuming. ... The previous time this bug appeared, ...
      (freebsd-stable)
    • agpgart: when telling user youll corrupt his data, at least do it at KERN_CRIT
      ... IOMMU off means very bad stuff may happen, like data corruption on ... your hard drives. ... pomozte zachranit klanovicky les: http://www.ujezdskystrom.info/ ...
      (Linux-Kernel)