Files
android_kernel_xiaomi_sm8450/include/linux
Arnd Bergmann bad19e0d04 Merge tag 'tee-drv-dynamic-shm-for-v4.16' of https://git.linaro.org/people/jens.wiklander/linux-tee into next/drivers
Pull "tee dynamic shm for v4.16" from Jens Wiklander:

This pull request enables dynamic shared memory support in the TEE
subsystem as a whole and in OP-TEE in particular.

Global Platform TEE specification [1] allows client applications
to register part of own memory as a shared buffer between
application and TEE. This allows fast zero-copy communication between
TEE and REE. But current implementation of TEE in Linux does not support
this feature.

Also, current implementation of OP-TEE transport uses fixed size
pre-shared buffer for all communications with OP-TEE OS. This is okay
in the most use cases. But this prevents use of OP-TEE in virtualized
environments, because:
 a) We can't share the same buffer between different virtual machines
 b) Physically contiguous memory as seen by VM can be non-contiguous
    in reality (and as seen by OP-TEE OS) due to second stage of
    MMU translation.
 c) Size of this pre-shared buffer is limited.

So, first part of this pull request adds generic register/unregister
interface to tee subsystem. The second part adds necessary features into
OP-TEE driver, so it can use not only static pre-shared buffer, but
whole RAM to communicate with OP-TEE OS.

This change is backwards compatible allowing older secure world or
user space to work with newer kernels and vice versa.

[1] https://www.globalplatform.org/specificationsdevice.asp

* tag 'tee-drv-dynamic-shm-for-v4.16' of https://git.linaro.org/people/jens.wiklander/linux-tee:
  tee: shm: inline tee_shm_get_id()
  tee: use reference counting for tee_context
  tee: optee: enable dynamic SHM support
  tee: optee: add optee-specific shared pool implementation
  tee: optee: store OP-TEE capabilities in private data
  tee: optee: add registered buffers handling into RPC calls
  tee: optee: add registered shared parameters handling
  tee: optee: add shared buffer registration functions
  tee: optee: add page list manipulation functions
  tee: optee: Update protocol definitions
  tee: shm: add page accessor functions
  tee: shm: add accessors for buffer size and page offset
  tee: add register user memory
  tee: flexible shared memory pool creation
2017-12-21 17:23:52 +01:00
..
2016-07-08 16:23:11 +02:00
2010-11-23 20:14:46 +00:00
2017-11-13 01:34:49 +01:00
2012-10-08 13:50:20 +10:30
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2011-03-11 14:25:50 +00:00
2017-06-08 18:52:36 -07:00
2017-11-23 10:56:35 +01:00
2017-11-22 21:40:54 +01:00
2017-07-03 16:56:28 -06:00
2017-11-15 18:21:04 -08:00
2011-03-31 11:26:23 -03:00
2017-12-12 13:22:10 +01:00
2011-10-29 21:20:22 +02:00
2017-08-30 14:40:40 +02:00
2017-09-04 00:06:02 +02:00
2017-08-24 13:23:03 -07:00
2012-02-20 19:46:36 +11:00
2009-12-10 23:52:01 +00:00
2016-10-28 08:48:16 -06:00
2017-07-17 13:42:48 +02:00
2012-10-16 18:49:15 -07:00
2017-11-05 16:42:02 -08:00
2017-08-07 17:22:14 +02:00
2014-12-31 13:06:50 -05:00
2014-10-09 11:35:48 +03:00
2017-11-13 01:41:20 +01:00
2014-10-08 16:01:41 -04:00
2017-11-15 18:21:06 -08:00
2017-03-21 10:15:47 +02:00
2010-02-09 11:13:56 +01:00
2011-03-31 11:26:23 -03:00
2012-03-26 21:47:19 +02:00
2012-03-26 21:47:19 +02:00
2014-01-16 11:15:50 +01:00
2011-07-01 10:37:15 +02:00
2017-05-18 10:07:40 -04:00
2017-06-21 14:37:12 -04:00
2017-11-17 16:10:04 -08:00
2017-11-15 18:21:05 -08:00
2006-10-10 15:37:22 -07:00
2013-06-17 16:38:57 -07:00
2016-05-11 22:37:54 +02:00
2014-03-13 12:11:00 +10:30
2016-01-28 14:19:12 -08:00
2017-11-15 18:21:01 -08:00
2017-11-17 16:10:04 -08:00
2017-10-12 15:41:05 +02:00
2015-07-28 08:50:42 +01:00
2017-11-15 18:21:01 -08:00
2013-08-28 21:35:14 -07:00
2008-07-04 10:40:05 -07:00
2009-04-06 16:06:26 +01:00
2017-12-01 13:09:40 -08:00
2017-10-19 10:08:56 +02:00
2017-10-07 10:45:02 -06:00
2017-02-24 17:46:57 -08:00
2017-08-28 20:51:22 +02:00
2017-11-15 18:21:04 -08:00
2015-06-24 17:49:41 -07:00
2017-11-29 18:40:42 -08:00
2017-11-15 18:21:04 -08:00
2016-04-25 15:09:11 -04:00
2017-11-17 16:10:00 -08:00
2017-07-25 18:05:25 +02:00
2017-10-20 09:37:32 +02:00
2014-11-04 13:29:38 +00:00
2017-12-14 16:00:49 -08:00
2017-11-15 18:21:03 -08:00
2017-11-15 18:21:06 -08:00
2017-11-09 10:23:28 +01:00
2017-08-06 20:55:29 -07:00
2017-11-17 16:10:04 -08:00
2017-11-17 16:10:04 -08:00
2017-11-13 01:33:48 +01:00
2010-08-04 21:53:17 -07:00
2017-12-11 10:52:23 -05:00
2017-11-15 18:21:04 -08:00
2016-03-22 15:36:02 -07:00
2017-11-07 12:22:21 +01:00
2009-04-08 14:33:38 -07:00
2017-07-06 16:24:30 -07:00
2017-08-16 16:28:47 -07:00
2017-11-15 18:21:01 -08:00
2017-11-15 18:21:06 -08:00
2017-11-15 18:21:01 -08:00
2013-04-30 15:50:12 +05:30
2010-03-25 17:18:43 -07:00
2015-10-01 09:57:59 -07:00
2017-10-11 22:36:54 -04:00
2005-04-16 15:20:36 -07:00
2017-07-24 17:50:37 +02:00
2014-11-28 16:08:16 +01:00
2017-10-04 10:29:22 +02:00
2015-12-03 07:24:29 -08:00
2015-03-24 09:48:14 -07:00
2017-08-15 09:02:07 -07:00
2011-01-13 08:03:24 -08:00
2013-10-17 15:53:09 -04:00
2017-08-15 09:02:08 -07:00