Bug #534
closedDMA KVA cache attributes incorrect
0%
Description
http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=7001754
Related Bugs 6896869 , 6212057
The KVA mapping created by ddi_dma_mem_alloc() always gets WB/cached cached
attributes even when UC/uncached (DDI_STRICTORDER_ACC) or WC/writecombine
(DDI_MERGING_OK_ACC) are requested. On b151a, the KVA for a single page DMA
buffer that should be UC (KVA 0xffffff01d8828000 PA 0x110412000):
110412::report_maps
hat=ffffff01c707ee78 maps addr=ffffff01d8828000
level=0 htable=ffffff01d2f288a0 pte=110412363ffffff01d8828000::vatopfn
level=1 htable=ffffff01c7377df0 pte=11b9fc027
level=2 htable=ffffff01c7377d60 pte=b85fb027
level=3 htable=ffffff01c7378ed0 pte=b85ff027
Virtual address 0xffffff01d8828000 maps pfn 0x110412
110412363::pte
pte=110412363: pfn=0x110412 nosync global write
level=0 htable=ffffff01d2f288a0 pte=110412363ffffff01d8828000::vatopfn
level=1 htable=ffffff01c7377df0 pte=11b9fc027
level=2 htable=ffffff01c7377d60 pte=b85fb027
level=3 htable=ffffff01c7378ed0 pte=b85ff027
Virtual address 0xffffff01d8828000 maps pfn 0x110412
The PTE should say "uncached" (PT_NOCACHE not set). Note this is with
gfx_private::gfxp_fix_mem_cache_attrs() now a NOP.
Here's a single page DMA buffer (KVA 0xffffff01d8828000 PA 0x110412000)
with gfx_private::gfxp_fix_mem_cache_attrs() restored:
13bd36::report_maps
hat=ffffff01c707ee78 maps addr=ffffff01d8a8c000
level=0 htable=ffffff01d395d158 pte=13bd36373ffffff01d8a8c000::vatopfn
level=1 htable=ffffff01c7377df0 pte=11c14c027
level=2 htable=ffffff01c7377d60 pte=b85fb027
level=3 htable=ffffff01c7378ed0 pte=b85ff027
Virtual address 0xffffff01d8a8c000 maps pfn 0x13bd36
13bd36373::pte
pte=13bd36373: pfn=0x13bd36 nosync global write uncached
level=0 htable=ffffff01d395d158 pte=13bd36373ffffff01d8a8c000::vatopfn
level=1 htable=ffffff01c7377df0 pte=11c14c027
level=2 htable=ffffff01c7377d60 pte=b85fb027
level=3 htable=ffffff01c7378ed0 pte=b85ff027
Virtual address 0xffffff01d8a8c000 maps pfn 0x13bd36
Note the PTE has "uncached" (PT_NOCACHE set).
Related issues
Updated by Albert Lee over 12 years ago
- Category set to kernel
- Priority changed from Normal to High
This is a very serious problem. We need to determine if this affects write ordering for e.g. storage devices.
Updated by Eric Schrock almost 12 years ago
- Status changed from New to Resolved
- Difficulty set to Medium
- Tags set to needs-triage
changeset: 13392:0ad5890414dc
tag: tip
user: Michael Tsymbalyuk <mtzaurus@gmail.com>
date: Thu Jun 23 11:00:11 2011 -0700
description:
534 DMA KVA cache attributes incorrect
Reviewed by: Garrett D'Amore <garrett@nexenta.com>
Reviewed by: Albert Lee <trisk@nexenta.com>
Approved by: Eric Schrock <Eric.Schrock@delphix.com>
Updated by Rich Lowe almost 12 years ago
- Status changed from Resolved to Rejected
Backed out by #1402 and, for the moment, decided invalid.