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

[Xen-devel] [PATCH v7 00/11] Handle SMCs and HVCs in conformance with SMCCC



Hello all,

v7:

 * Added new patch "arm: traps: use only least 32 bits of fid in PSCI handler"
   It fixes fid usage on 64 bit machines. Now only least 32 bits are used,
   as required by SMCCC. It is a separate change, so it can be back-ported.
 * Fixed the same issue in "arm: traps: handle PSCI calls inside `vsmc.c`"
 * Reworked definition of XEN_DEFINE_UUID() for C90/C99 compilers
 * Fixed message for "public: xen.h: add definitions for UUID handling":
   invalid usage for XEN_DEFINE_UUID() was provided
 * Fixed formatting in "arm: PSCI: use definitions provided by asm/smccc.h"

As series [1] for traps.c cleanup were merged, there are no dependencies
for this patch series.

---
v6:

 * XEN_DEFINE_UUID() now is in two variants: strict ANSI C and GCC,
   more in corresponding patch
 * added/reworked helpers that return information about SMCCC service
 * fixed bug with compilation of "arm: traps: handle PSCI calls inside `vsmc.c`"
   Next patch fixed that bug anyways, but xen tree would be broken at that
   exact point
 * More changes are described in corresponding patches

This patch series still depend on Julien's patches for traps.c cleanup ([1]).

---
v5:
 * Patches that add end enable XENFEAT_ARM_SMCCC_supported were
   squashed together
 * All other chages are described in corresponding patches

This patch series still depend on Julien's patches for traps.c cleanup ([1]).

---
v4:

 * Added patch with public definitiod for xen_uuid_t
 * Added patch with immediate value mask for SMC, HVC and SVC
 * Added patch with header smccc.h (generic SMCCC definitions)
 * Added patches that add and enable XENFEAT_ARM_SMCCC_supported
 * Removed patch that added inject_undef_exception() and friends
   to the processor.h

This patch series depends on Julien's patches for traps.c cleanup ([1]).

There was discussion about SMCCC bindings (e.g. how to tell guest, that
it can safelly call SMCCC routines). As temporary solution, we'll
provide XENFEAT_ARM_SMCCC_supported feature. More generic solution
is still under discussion.

[1] https://www.mail-archive.com/xen-devel@xxxxxxxxxxxxx/msg117839.html

---
v3:

This is third version. Instead of 4 patches, there are 7 now.
As part of the series, I make some functions in traps.c
available globally, moved SMC conditional check into
separate patch, changed how PSCI functiond numbers are defined.

---
v2:

This is second version. Instead of 2 patches, there are 4 now.
I have divided PSCI patch into two: one changes how PSCI
code accesses registers and second one moves PSCI code with
new accessors to vsmc.c.

Also I had removed redundant 64 bit mode check in PSCI code, as it
does not conforms with SMCCC.

---
v1:

This patch series adds a generic way to handle standard calls
that are defined in ARM SMC calling convention (SMCCC).

First patch adds generic handler and second one moves PSCI
handling code to that generic handler.

With this patch series guest can query hypervisor in a standard
way to determine which virtualization system is used.
The same applies to PSCI calls. Now guest can tell if PSCI calls
are handled by hypervisor or by, say, ARM TF.

Also those patches are needed for upcoming TEE support.
---


Volodymyr Babchuk (11):
  arm: traps: use only least 32 bits of fid in PSCI handler
  arm: traps: use generic register accessors in the PSCI code
  arm: traps: check if SMC was conditional before handling it
  public: xen.h: add definitions for UUID handling
  arm: processor.h: add definition for immediate value mask
  arm: add SMCCC protocol definitions
  arm: smccc: handle SMCs according to SMCCC
  arm: traps: handle PSCI calls inside `vsmc.c`
  arm: PSCI: use definitions provided by asm/smccc.h
  arm: vsmc: remove 64 bit mode check in PSCI handler
  public: add and enable XENFEAT_ARM_SMCCC_supported feature

 xen/arch/arm/Makefile               |   1 +
 xen/arch/arm/platforms/seattle.c    |   4 +-
 xen/arch/arm/psci.c                 |  10 +-
 xen/arch/arm/traps.c                | 132 +------------
 xen/arch/arm/vsmc.c                 | 356 ++++++++++++++++++++++++++++++++++++
 xen/common/kernel.c                 |   3 +
 xen/include/asm-arm/processor.h     |   3 +
 xen/include/asm-arm/psci.h          |  43 ++---
 xen/include/asm-arm/smccc.h         | 105 +++++++++++
 xen/include/asm-arm/traps.h         |   4 +
 xen/include/public/arch-arm/smccc.h |  66 +++++++
 xen/include/public/features.h       |   3 +
 xen/include/public/xen.h            |  33 ++++
 13 files changed, 603 insertions(+), 160 deletions(-)
 create mode 100644 xen/arch/arm/vsmc.c
 create mode 100644 xen/include/asm-arm/smccc.h
 create mode 100644 xen/include/public/arch-arm/smccc.h

-- 
2.7.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

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