tests: x86: pagetables: pass if userspace disabled

_app_smem doesn't exist in this case.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
Andrew Boie 2020-12-16 20:08:26 -08:00 committed by Anas Nashif
commit 35ec07dfe0

View file

@ -101,7 +101,8 @@ void test_ram_perms(void)
expected = MMU_P | MMU_XD;
}
#endif /* CONFIG_X86_64 */
#if !defined(CONFIG_X86_KPTI) && !defined(CONFIG_X86_COMMON_PAGE_TABLE)
#if !defined(CONFIG_X86_KPTI) && !defined(CONFIG_X86_COMMON_PAGE_TABLE) && \
defined(CONFIG_USERSPACE)
} else if (IN_REGION(_app_smem, pos)) {
/* If KPTI is not enabled, then the default memory
* domain affects our page tables even though we are
@ -155,11 +156,13 @@ void z_impl_dump_my_ptables(void)
z_x86_dump_page_tables(z_x86_thread_page_tables_get(cur));
}
#ifdef CONFIG_USERSPACE
void z_vrfy_dump_my_ptables(void)
{
z_impl_dump_my_ptables();
}
#include <syscalls/dump_my_ptables_mrsh.c>
#endif /* CONFIG_USERSPACE */
/**
* Dump kernel's page tables to console