diff options
Diffstat (limited to 'kernel/dma')
-rw-r--r-- | kernel/dma/direct.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/kernel/dma/direct.c b/kernel/dma/direct.c index 79da61b49fa4..355d16acee6d 100644 --- a/kernel/dma/direct.c +++ b/kernel/dma/direct.c @@ -373,5 +373,10 @@ int dma_direct_supported(struct device *dev, u64 mask) min_mask = min_t(u64, min_mask, (max_pfn - 1) << PAGE_SHIFT); - return mask >= phys_to_dma(dev, min_mask); + /* + * This check needs to be against the actual bit mask value, so + * use __phys_to_dma() here so that the SME encryption mask isn't + * part of the check. + */ + return mask >= __phys_to_dma(dev, min_mask); } |