-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net/virtio: fix descriptor addresses in 32-bit build
[ upstream commit 8c41645be010ec7fa0df4f6c3790b167945154b4 ] With Virtio-user, the Virtio descriptor buffer address is the virtual address of the mbuf's buffer. On 32-bit 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-bit builds running on 64-bit 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-bit builds to remove the masking, as the address is always 64 bits wide. Fixes: ba55c94 ("net/virtio: revert forcing IOVA as VA mode for virtio-user") Reported-by: Sampath Peechu <[email protected]> Signed-off-by: Maxime Coquelin <[email protected]> Reviewed-by: David Marchand <[email protected]> Signed-off-by: Maxime Coquelin <[email protected]>
- Loading branch information
1 parent
93f0406
commit 9b63dd4
Showing
3 changed files
with
20 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1182,6 +1182,7 @@ Salem Sol <[email protected]> | |
Sameh Gobriel <[email protected]> | ||
Sam Grove <[email protected]> | ||
Samik Gupta <[email protected]> | ||
Sampath Peechu <[email protected]> | ||
Samuel Gauthier <[email protected]> | ||
Sangjin Han <[email protected]> | ||
Sankar Chokkalingam <[email protected]> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters