[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CAPSaadwWXXF3N4BaUYS_Aqas27eqNX+mcx3a7MnohqPy7+--ug@mail.gmail.com>
Date: Fri, 9 Dec 2022 13:47:08 -0800
From: davide rossetti <davide.rossetti@...il.com>
To: linux-kernel <linux-kernel@...r.kernel.org>
Subject: dma_to_phys on Intel CC platforms
looking at https://elixir.bootlin.com/linux/v6.1-rc8/source/include/linux/dma-direct.h#L86,
it looks like it assume the AMD CC convention, i.e. CC bit set means
encrypted:
static inline phys_addr_t dma_to_phys(struct device *dev, dma_addr_t dma_addr)
{
phys_addr_t paddr;
if (dev->dma_range_map)
paddr = translate_dma_to_phys(dev, dma_addr);
else
paddr = dma_addr;
return __sme_clr(paddr);
}
What guarantees that this works on Intel too?
--
sincerely,
d.
Powered by blists - more mailing lists