Skip to content
Commit 69690e35 authored by Aleksandar Radovanovic's avatar Aleksandar Radovanovic Committed by Carles Cufí
Browse files

ipc_service: static_vrings: Fix TX virtqueue alignment



This patch fixes an issues where the TX virtqueue is misaligned by
2 bytes due to the way the virtqueue start address is calculated.
It is currently set to immediatelly follow the RX virtqueue:

    vr->tx_addr = vr->rx_addr + vring_size(num_desc, VRING_ALIGNMENT);

but the RX virtqueue does not end on an aligned boundary (last field,
avail_event is uint16_t). The resulting misaligned virtqueue causes
alignment faults on architectures that do not support unaligned
accesses (and is suboptimal otherwise)

The fix is to realign tx_addr to requested VRING_ALIGNMENT.

Signed-off-by: default avatarAleksandar Radovanovic <aleksandar.radovanovic@amd.com>
parent d32d4af9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment