All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: Ian.Jackson@eu.citrix.com
Cc: prashant@broadcom.com, mchan@broadcom.com,
	cascardo@linux.vnet.ibm.com, konrad.wilk@oracle.com,
	boris.ostrovsky@oracle.com, david.vrabel@citrix.com,
	vyasevich@gmail.com, xen-devel@lists.xensource.com,
	netdev@vger.kernel.org, siva.kallam@broadcom.com,
	sanjeevb@broadcom.com
Subject: Re: tg3 NIC driver bug in 3.14.x under Xen [and 3 more messages]
Date: Fri, 17 Apr 2015 13:19:56 -0400 (EDT)	[thread overview]
Message-ID: <20150417.131956.2235150293184897656.davem@davemloft.net> (raw)
In-Reply-To: <21809.13544.303033.990277@mariner.uk.xensource.com>

From: Ian Jackson <Ian.Jackson@eu.citrix.com>
Date: Fri, 17 Apr 2015 17:29:28 +0100

> Prashant Sreedharan writes ("Re: tg3 NIC driver bug in 3.14.x under Xen [and 3 more messages]"):
>> Ok this is what is causing the problem, the driver uses
>> DEFINE_DMA_UNMAP_ADDR(), dma_unmap_addr_set() to keep a copy of the dma
>> "mapping" and dma_unmap_addr() to get the "mapping" value. On most of
>> the platforms this is a no-op, but it appears with "iommu=soft and
>> swiotlb=force" this house keeping is required, when I pass the correct
>> dma_addr instead of 0 while calling pci_unmap_/pci_dma_sync_ I don't see
>> the corruption. ie If you set CONFIG_NEED_DMA_MAP_STATE=y in your kernel
>> config you should not see the problem. Can you confirm ? Thanks
> 
> That kernel config option is an automatically computed one:
> 
> config NEED_DMA_MAP_STATE
>         def_bool y
>         depends on X86_64 || INTEL_IOMMU || DMA_API_DEBUG
> 
> and grepping my .config shows:
> 
> # CONFIG_INTEL_IOMMU is not set
> # CONFIG_DMA_API_DEBUG is not set
> 
> It's a 32-bit kernel so it hasn't got X86_64 enabled either.
> 
> Arguably at least some of osstest's kernels should have INTEL_IOMMU
> enabled to detect conflicts between Xen's use of the iommu and
> possible attempts bo Linux to do the same thing, but not having it
> enabled should not cause a driver bug.

So the gist of the situation is, that NEED_DMA_MAP_STATE can be 'n' in
situations where we might actually need it to be 'y' based upon kernel
comman line boot options given.

Right?

  reply	other threads:[~2015-04-17 17:20 UTC|newest]

Thread overview: 67+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-07 15:12 tg3 NIC driver bug in 3.14.x under Xen Ian Jackson
2015-04-07 15:12 ` Ian Jackson
2015-04-07 15:37 ` Konrad Rzeszutek Wilk
2015-04-07 15:37   ` Konrad Rzeszutek Wilk
2015-04-07 18:25   ` Ian Jackson
2015-04-07 18:25     ` Ian Jackson
2015-04-07 16:55 ` Michael Chan
2015-04-07 16:55   ` Michael Chan
2015-04-07 17:58   ` Ian Jackson
2015-04-07 17:58     ` Ian Jackson
2015-04-07 18:13     ` Ian Jackson
2015-04-07 18:13       ` Ian Jackson
2015-04-07 23:21       ` Michael Chan
2015-04-07 23:21         ` Michael Chan
2015-04-07 23:22         ` Prashant Sreedharan
2015-04-07 23:22           ` Prashant Sreedharan
2015-04-08 13:59           ` tg3 NIC driver bug in 3.14.x under Xen [and 3 more messages] Ian Jackson
2015-04-08 13:59             ` Ian Jackson
2015-04-09  1:43             ` Prashant Sreedharan
2015-04-09  1:43               ` Prashant Sreedharan
2015-04-09 11:11               ` Ian Jackson
2015-04-09 11:11                 ` Ian Jackson
2015-04-09 16:10                 ` Prashant Sreedharan
2015-04-09 16:10                   ` Prashant Sreedharan
2015-04-09 16:57                   ` Ian Jackson
2015-04-09 16:57                     ` Ian Jackson
2015-04-09 17:25                     ` Ian Jackson
2015-04-09 17:25                       ` Ian Jackson
2015-04-09 18:08                       ` Prashant Sreedharan
2015-04-09 18:08                         ` Prashant Sreedharan
2015-04-10 15:06                         ` Ian Jackson
2015-04-10 15:06                           ` Ian Jackson
2015-04-11  8:01                           ` Prashant
2015-04-11  8:01                             ` Prashant
2015-04-15 10:54                             ` Ian Jackson
2015-04-15 10:54                               ` Ian Jackson
2015-04-16  2:53                               ` Prashant
2015-04-16  2:53                                 ` Prashant
2015-04-16 10:18                                 ` Ian Jackson
2015-04-16 10:18                                   ` Ian Jackson
2015-04-16 12:24                                   ` cascardo
2015-04-16 16:39                                     ` Michael Chan
2015-04-16 16:39                                       ` Michael Chan
2015-04-16 17:15                                       ` Ian Jackson
2015-04-16 17:15                                         ` Ian Jackson
2015-04-16 22:51                                         ` Prashant Sreedharan
2015-04-16 22:51                                           ` Prashant Sreedharan
2015-04-17 16:29                                           ` Ian Jackson
2015-04-17 16:29                                             ` Ian Jackson
2015-04-17 17:19                                             ` David Miller [this message]
2015-04-17 17:46                                               ` Michael Chan
2015-04-17 17:46                                                 ` Michael Chan
2015-04-17 19:04                                                 ` Konrad Rzeszutek Wilk
2015-04-17 19:12                                                   ` David Miller
2015-04-17 18:52                                                     ` Prashant Sreedharan
2015-04-17 18:52                                                       ` Prashant Sreedharan
2015-04-21 15:05                                                       ` Ian Jackson
2015-04-21 15:05                                                         ` Ian Jackson
2015-04-21 15:36                                                         ` [OSSTEST PATCH] ts-kernel-build: Enable x86 IOMMU options Ian Jackson
2015-04-21 15:44                                                           ` Ian Campbell
2015-04-21 16:51                                                             ` Konrad Rzeszutek Wilk
2015-04-18 12:39                                                   ` [tip:x86/urgent] config: Enable NEED_DMA_MAP_STATE by default when SWIOTLB is selected tip-bot for Konrad Rzeszutek Wilk
2015-04-16 18:14                                       ` tg3 NIC driver bug in 3.14.x under Xen [and 3 more messages] David Miller
2015-04-09 18:26                       ` Michael Chan
2015-04-09 18:26                         ` Michael Chan
2015-04-10 11:43                         ` Ian Jackson
2015-04-10 11:43                           ` Ian Jackson

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=20150417.131956.2235150293184897656.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=cascardo@linux.vnet.ibm.com \
    --cc=david.vrabel@citrix.com \
    --cc=konrad.wilk@oracle.com \
    --cc=mchan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    --cc=prashant@broadcom.com \
    --cc=sanjeevb@broadcom.com \
    --cc=siva.kallam@broadcom.com \
    --cc=vyasevich@gmail.com \
    --cc=xen-devel@lists.xensource.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.