patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Maxime Coquelin <maxime.coquelin@redhat.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: dev@dpdk.org, stable@dpdk.org, jianfeng.tan@intel.com,
	santosh.shukla@caviumnetworks.com, anatoly.burakov@intel.com,
	thomas@monjalon.net, peterx@redhat.com
Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] bus/pci: forbid VA as IOVA mode if IOMMU address width too small
Date: Mon, 8 Jan 2018 17:48:46 +0100	[thread overview]
Message-ID: <2ee389ac-1915-d9dd-01aa-0447b4f0008f@redhat.com> (raw)
In-Reply-To: <62b32cc7-68a8-806c-d4fb-e15addbeabfb@redhat.com>



On 01/08/2018 04:54 PM, Maxime Coquelin wrote:
> 
> 
> On 01/08/2018 04:38 PM, Stephen Hemminger wrote:
>> On Mon,  8 Jan 2018 14:51:27 +0100
>> Maxime Coquelin <maxime.coquelin@redhat.com> wrote:
>>
>>> +static inline bool
>>> +pci_one_device_iommu_support_va(struct rte_pci_device *dev)
>>> +{
>>> +#if defined(RTE_ARCH_PPC_64)
>>> +    return false;
>>> +#elif defined(RTE_ARCH_X86)
>>> +
>>
>> The cleaner way to handle this kind of ifdef is:
>>
>> #ifdef RTE_ARCH_X86
>> static bool
>> pci_one_device_iommu_support_va(struct rte_pci_device *dev)
>> {
>> ....
>> }
>> #elif defined(RTE_ARCH_PPC_64)
>> static inline bool
>> pci_one_device_iommu_support_va(struct rte_pci_device *dev)
>> {
>>     return false;
>> }
>> #endif
> 
> Ok, thanks. I do this in v2.
> 
>> What about AMD64?
> 
> I haven't checked AMD64 spec yet.

 From AMD IOMMU spec (see [0], page 178), the only supported Guest
Virtual Address size is 48bits, so above the 47 bits of user VA on x86.

So in this regard, AMD IOMMU is compatible with using VA as IOVA.

Cheers,
Maxime

[0]: https://support.amd.com/TechDocs/48882_IOMMU.pdf

      reply	other threads:[~2018-01-08 16:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-08 13:51 [dpdk-stable] " Maxime Coquelin
2018-01-08 15:34 ` [dpdk-stable] [dpdk-dev] " Stephen Hemminger
2018-01-08 15:48   ` Maxime Coquelin
2018-01-08 15:38 ` Stephen Hemminger
2018-01-08 15:54   ` Maxime Coquelin
2018-01-08 16:48     ` Maxime Coquelin [this message]

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=2ee389ac-1915-d9dd-01aa-0447b4f0008f@redhat.com \
    --to=maxime.coquelin@redhat.com \
    --cc=anatoly.burakov@intel.com \
    --cc=dev@dpdk.org \
    --cc=jianfeng.tan@intel.com \
    --cc=peterx@redhat.com \
    --cc=santosh.shukla@caviumnetworks.com \
    --cc=stable@dpdk.org \
    --cc=stephen@networkplumber.org \
    --cc=thomas@monjalon.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).