2014-12-12 00:50:32

by Kallol Biswas

[permalink] [raw]
Subject: Fwd: dma_alloc_coherent allocates same dma address for VF Queue's

Hi,
I am trying to bring up a SR-IOV capable device. It seems that the routine
dma_alloc_coherent returns the DMA address for VF that has been
allocated for PF.

For PF:
241.005637] XXX: ffff880851576600
[ 241.005911] XXX: dmadev ffff881053344098 cqes ffff88084a7ed000
cq_dma_addr 0xfffff000
[ 241.005917] XXX: dmadev ffff881053344098 sq_cmds ffff880850062000
sq_dma_addr 0xffffe000

FOR VF:

[ 242.208847] XXX: ffff880851574600
[ 242.208868] XXX 0000:01:08.0: enabling device (0000 -> 0002)
[ 242.208975] XXX: dmadev ffff88085108f098 cqes ffff8808507c6000
cq_dma_addr 0xfffff000
[ 242.208979] XXX: dmadev ffff88085108f098 sq_cmds ffff88084a4dd000
sq_dma_addr 0xffffe000

Most likely the device returns wrong information to OS when I enable VFs.

I have been looking at live kernel memory with the command crash and
trying to understand intel DMA mapping code. If anyone has any input
kindly send a reply.

Thanks,
Kallol