|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 1/5] xen/arm: optee: impose limit on shared buffer size
Hi Volodymyr, On 8/23/19 7:48 PM, Volodymyr Babchuk wrote: We want to limit number of calls to lookup_and_pin_guest_ram_addr() per one request. There are two ways to do this: either preempt translate_noncontig() or to limit size of one shared buffer size. It is quite hard to preempt translate_noncontig(), because it is deep nested. So we chose second option. We will allow 512 pages per one shared buffer. This does not interfere with GP standard, as it requires that size limit for shared buffer should be at lest 512kB. Do you mean "least" instead of "lest"? If so, why 512 pages (i.e 1MB) is plenty enough for most of the use cases? What does "xtest" consist on? Also, with this limitation OP-TEE still passes own "xtest" test suite, so this is okay for now. Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@xxxxxxxx> --- xen/arch/arm/tee/optee.c | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/xen/arch/arm/tee/optee.c b/xen/arch/arm/tee/optee.c index ec5402e89b..f4fa8a7758 100644 --- a/xen/arch/arm/tee/optee.c +++ b/xen/arch/arm/tee/optee.c @@ -72,6 +72,17 @@ */ #define MAX_TOTAL_SMH_BUF_PG 16384+/* Without the comment, the BUILD_BUG_ON() looks random. So either you want to have a different version of the comment or you want to move the BUILD_BUG_ON() to somewhere else. Cheers, -- Julien Grall _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |