lkml.org 
[lkml]   [2022]   [Aug]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] swiotlb: avoid potential left shift overflow
On Sat, Aug 20, 2022 at 09:42:38AM +0800, Chao Gao wrote:
> In an internal effort to measure the impact of swiotlb size to IO
> performance of confidential VM (e.g., TDX VM), we simply added
> SWIOTLB_ANY to the default io_tlb_mem to lift the restriction on swiotlb
> size. Then we hit this issue and worked out this fix. I posted this
> fix because I think the fix by itself is helpful because it removes the
> implicit dependency of the left-shift in slot_addr() on swiotlb size and
> then someone trying to lift the size limitation won't hit the same issue.

SWIOTLB_ANY is used for real, so I think this is a legitimate fix.
I'll apply it.

\
 
 \ /
  Last update: 2022-08-22 13:17    [W:0.071 / U:0.288 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site