lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a2KD_ykmwtCYmLAGBAxgLQ4r-UWp00bBejaFZSSi=-cNA@mail.gmail.com>
Date:   Mon, 8 Oct 2018 14:08:34 +0200
From:   Arnd Bergmann <arnd@...db.de>
To:     Sunil Kovvuri <sunil.kovvuri@...il.com>
Cc:     Networking <netdev@...r.kernel.org>,
        David Miller <davem@...emloft.net>, linux-soc@...r.kernel.org,
        gakula@...vell.com, sgoutham@...vell.com
Subject: Re: [PATCH v8 10/15] octeontx2-af: Reconfig MSIX base with IOVA

On Sun, Oct 7, 2018 at 5:01 PM <sunil.kovvuri@...il.com> wrote:

>
> +       /* HW interprets RVU_AF_MSIXTR_BASE address as an IOVA, hence
> +        * create a IOMMU mapping for the physcial address configured by
> +        * firmware and reconfig RVU_AF_MSIXTR_BASE with IOVA.
> +        */
> +       cfg = rvu_read64(rvu, BLKADDR_RVUM, RVU_PRIV_CONST);
> +       max_msix = cfg & 0xFFFFF;
> +       phy_addr = rvu_read64(rvu, BLKADDR_RVUM, RVU_AF_MSIXTR_BASE);
> +       iova = dma_map_single(rvu->dev, (void *)phy_addr,
> +                             max_msix * PCI_MSIX_ENTRY_SIZE,
> +                             DMA_BIDIRECTIONAL);
> +       if (dma_mapping_error(rvu->dev, iova))
> +               return -ENOMEM;
> +
> +       rvu_write64(rvu, BLKADDR_RVUM, RVU_AF_MSIXTR_BASE, (u64)iova);
> +       rvu->msix_base_iova = iova;
> +

I'm a bit puzzled by how this works. Does this rely on a specific iommu
driver implementation? Normally a physical  address makes no sense to the
implementation backing dma_map_single() that tries to convert a
linear kernel virtual address into a physical address.

        Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ