[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v3 02/11] arm: add tee_enabled flag to xen_arch_domainconfig



Hi,

On 12/18/18 9:11 PM, Volodymyr Babchuk wrote:
From: Volodymyr Babchuk <vlad.babchuk@xxxxxxxxx>

This flag enables TEE support for a domain.

Signed-off-by: Volodymyr Babchuk <vlad.babchuk@xxxxxxxxx>
---
  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 )

This function does not yet exist. But I think it would make sense to fold this patch in the next one.

+            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;

Can you move this after gic_version? So we don't introduce more padding.

  };
  #endif /* __XEN__ || __XEN_TOOLS__ */

Cheers,

--
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.