On Wed, May 19, 2021 at 4:51 PM Dan Williams <dan.j.williams@xxxxxxxxx> wrote: [..] > > The short answer is that lock requirement, in the above note, rules > > out safe direct userspace use of the DOE (unless we can tell the kernel > > is not going to ever use it). > > Linux has the mitigation for that situation defined already. It's the > mechanism for /dev/mem and pci-mmap exclusion: disable the driver to > enable unfettered userspace access (modulo kernel-lockdown is > disabled). > Note that when I say "driver" here, it need not necessarily be the cxl_pci driver for the memory expander. For example, DOE functionality could be handled by an aux-bus device+driver where that can be unloaded without taking down the rest of the CXL driver.