[PATCH] net/virtio: fix descriptors buffer addresses on 32 bits builds

David Marchand david.marchand at redhat.com
Wed Sep 20 15:53:28 CEST 2023


On Wed, Sep 20, 2023 at 3:02 PM Maxime Coquelin
<maxime.coquelin at redhat.com> wrote:
>
> With Virtio-user, the Virtio descriptor buffer address is the
> virtual address of the mbuf's buffer. On 32 bits builds, it is
> expected to be 32 bits.
>
> With Virtio-PCI, the Virtio descriptor buffer address is the
> physical address of the mbuf's buffer. On 32 bits builds running
> on 64 bits kernel, it is expected to be up to 64 bits.
>
> This patch introduces a new mask field in virtqueue's struct to
> filter our the upper 4 bytes of the address only when necessary.
> An optimization is introduced for 64 bits builds to remove the
> masking, as the address is always 64 bits wide.
>
> Fixes: ba55c94a7ebc ("net/virtio: revert forcing IOVA as VA mode for virtio-user")
> Cc: stable at dpdk.org
>
> Reported-by: Sampath Peechu <speechu at cisco.com>
> Signed-off-by: Maxime Coquelin <maxime.coquelin at redhat.com>

Reviewed-by: David Marchand <david.marchand at redhat.com>

-- 
David Marchand



More information about the stable mailing list