OpenCloudOS-Kernel/drivers/misc/cxl
Ian Munsie 7a0d85d313 cxl: Add kernel API to allow a context to operate with relocate disabled
cxl devices typically access memory using an MMU in much the same way as
the CPU, and each context includes a state register much like the MSR in
the CPU. Like the CPU, the state register includes a bit to enable
relocation, which we currently always enable.

In some cases, it may be desirable to allow a device to access memory
using real addresses instead of effective addresses, so this adds a new
API, cxl_set_translation_mode, that can be used to disable relocation
on a given kernel context. This can allow for the creation of a special
privileged context that the device can use if it needs relocation
disabled, and can use regular contexts at times when it needs relocation
enabled.

This interface is only available to users of the kernel API for obvious
reasons, and will never be supported in a virtualised environment.

This will be used by the upcoming cxl support in the mlx5 driver.

Signed-off-by: Ian Munsie <imunsie@au1.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2016-05-11 21:54:10 +10:00
..
Kconfig cxl: Add CONFIG_CXL_EEH symbol 2015-08-17 13:56:29 +10:00
Makefile cxl: Support to flash a new image on the adapter from a guest 2016-03-09 23:39:56 +11:00
api.c cxl: Add kernel API to allow a context to operate with relocate disabled 2016-05-11 21:54:10 +10:00
base.c cxl: Parse device tree and create cxl device(s) at boot 2016-03-09 23:39:59 +11:00
context.c cxl: Delete an unnecessary check before the function call "kfree" 2016-04-12 21:05:21 +10:00
cxl.h cxl: Add kernel API to allow a context to operate with relocate disabled 2016-05-11 21:54:10 +10:00
debugfs.c cxl: Isolate a few bare-metal-specific calls 2016-03-09 13:05:47 +11:00
fault.c powerpc/mm: Replace _PAGE_USER with _PAGE_PRIVILEGED 2016-05-01 18:32:26 +10:00
file.c cxl: Adapter failure handling 2016-03-09 23:40:00 +11:00
flash.c cxl: Support to flash a new image on the adapter from a guest 2016-03-09 23:39:56 +11:00
guest.c cxl: Add kernel API to allow a context to operate with relocate disabled 2016-05-11 21:54:10 +10:00
hcalls.c cxl: Add tracepoints around the cxl hcall 2016-03-09 23:40:01 +11:00
hcalls.h cxl: Add guest-specific code 2016-03-09 23:36:52 +11:00
irq.c cxl: Separate bare-metal fields in adapter and AFU data structures 2016-03-09 13:05:54 +11:00
main.c cxl: Adapter failure handling 2016-03-09 23:40:00 +11:00
native.c cxl: Add kernel API to allow a context to operate with relocate disabled 2016-05-11 21:54:10 +10:00
of.c cxl: Add guest-specific code 2016-03-09 23:36:52 +11:00
pci.c cxl: Increase timeout for detection of AFU mmio hang 2016-04-22 21:45:50 +10:00
sysfs.c cxl: Allow initialization on timebase sync failures 2016-04-22 21:45:44 +10:00
trace.c cxl: Add tracepoints 2015-01-22 17:31:51 +11:00
trace.h cxl: Add tracepoints around the cxl hcall 2016-03-09 23:40:01 +11:00
vphb.c cxl: Ignore probes for virtual afu pci devices 2016-03-09 23:40:03 +11:00