[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v2 02/13] domctl: add tee_op domctl
Currently this call used only to enable TEE support for a domain. It is planed to extend it when there will be multiple TEE mediators, so toolstack can determine which TEE is available on a platform. Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@xxxxxxxx> --- xen/arch/arm/domctl.c | 10 ++++++++++ xen/include/public/domctl.h | 8 ++++++++ 2 files changed, 18 insertions(+) diff --git a/xen/arch/arm/domctl.c b/xen/arch/arm/domctl.c index 4587c75..f128d34 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, @@ -171,6 +172,15 @@ long arch_do_domctl(struct xen_domctl *domctl, struct domain *d, return rc; } + case XEN_DOMCTL_tee_op: + switch ( domctl->u.tee_op.cmd ) + { + case XEN_DOMCTL_TEE_OP_ENABLE: + return tee_enable(d); + + default: + return -EINVAL; + } default: { int rc; diff --git a/xen/include/public/domctl.h b/xen/include/public/domctl.h index 7fc07cc..d9820e0 100644 --- a/xen/include/public/domctl.h +++ b/xen/include/public/domctl.h @@ -1093,6 +1093,12 @@ struct xen_domctl_vuart_op { */ }; +/* XEN_DOMCTL_tee_op */ +struct xen_domctl_tee_op { +#define XEN_DOMCTL_TEE_OP_ENABLE 0 + uint32_t cmd; /* XEN_DOMCTL_TEE_OP_ */ +}; + struct xen_domctl { uint32_t cmd; #define XEN_DOMCTL_createdomain 1 @@ -1172,6 +1178,7 @@ struct xen_domctl { #define XEN_DOMCTL_soft_reset 79 #define XEN_DOMCTL_set_gnttab_limits 80 #define XEN_DOMCTL_vuart_op 81 +#define XEN_DOMCTL_tee_op 82 #define XEN_DOMCTL_gdbsx_guestmemio 1000 #define XEN_DOMCTL_gdbsx_pausevcpu 1001 #define XEN_DOMCTL_gdbsx_unpausevcpu 1002 @@ -1233,6 +1240,7 @@ struct xen_domctl { struct xen_domctl_psr_alloc psr_alloc; struct xen_domctl_set_gnttab_limits set_gnttab_limits; struct xen_domctl_vuart_op vuart_op; + struct xen_domctl_tee_op tee_op; uint8_t pad[128]; } u; }; -- 2.7.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |