Re: AMD SME encrpytion and PCI BAR pages to user space
From: Jason Gunthorpe
Date: Mon Oct 19 2020 - 13:26:44 EST
On Mon, Oct 19, 2020 at 12:11:36PM -0500, Tom Lendacky wrote:
> > Hum, I assume it is broken also. Actually quite a swath of drivers
> > and devices will be broken under this :\
>
> Not sure what you mean by the last statement - in general or when running
> under VFIO/DPDK? In general, traditional in kernel drivers work just fine
> under SME without any changes.
Split user/kernel drivers are common enough. Looks like maybe ~50
drivers in the kernel potentially are mmaping IO memory so would be
broken here.
Looking for pgprot_noncached() or pgprot_writecombine() around VMA
mappings is a pretty good clue it is working on IO memory.
I checked through the infiniband ones and they seem to be using
io_remap vs remap properly, but other places may need fixing.
Jason