From: Volodymyr Babchuk vlad.babchuk@gmail.com
This flag enables TEE support for a domain.
Signed-off-by: Volodymyr Babchuk vlad.babchuk@gmail.com --- xen/arch/arm/domain.c | 4 ++++ xen/arch/arm/domctl.c | 1 + xen/include/public/arch-arm.h | 3 +++ 3 files changed, 8 insertions(+)
diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c index 11b618515b..f04041931d 100644 --- a/xen/arch/arm/domain.c +++ b/xen/arch/arm/domain.c @@ -702,6 +702,10 @@ int arch_domain_create(struct domain *d, if ( (rc = domain_vtimer_init(d, &config->arch)) != 0 ) goto fail;
+ if ( config->arch.tee_enabled ) + if ( (rc = tee_enable(d)) != 0 ) + goto fail; + update_domain_wallclock_time(d);
/* diff --git a/xen/arch/arm/domctl.c b/xen/arch/arm/domctl.c index 20691528a6..f019e035e8 100644 --- a/xen/arch/arm/domctl.c +++ b/xen/arch/arm/domctl.c @@ -13,6 +13,7 @@ #include <xen/sched.h> #include <xen/types.h> #include <xsm/xsm.h> +#include <asm-arm/tee/tee.h> #include <public/domctl.h>
void arch_get_domain_info(const struct domain *d, diff --git a/xen/include/public/arch-arm.h b/xen/include/public/arch-arm.h index eb424e8286..b7a010e99e 100644 --- a/xen/include/public/arch-arm.h +++ b/xen/include/public/arch-arm.h @@ -323,6 +323,9 @@ struct xen_arch_domainconfig { * */ uint32_t clock_frequency; + + /* IN */ + uint8_t tee_enabled; }; #endif /* __XEN__ || __XEN_TOOLS__ */