All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v7 00/11] Handle SMCs and HVCs in conformance with SMCCC
@ 2017-10-04 21:00 Volodymyr Babchuk
  2017-10-04 21:00 ` [PATCH v7 01/11] arm: traps: use only least 32 bits of fid in PSCI handler Volodymyr Babchuk
                   ` (10 more replies)
  0 siblings, 11 replies; 26+ messages in thread
From: Volodymyr Babchuk @ 2017-10-04 21:00 UTC (permalink / raw)
  To: xen-devel
  Cc: Edgar E . Iglesias, Julien Grall, Stefano Stabellini, Volodymyr Babchuk

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@lists.xen.org/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@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2017-10-10 15:26 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-04 21:00 [PATCH v7 00/11] Handle SMCs and HVCs in conformance with SMCCC Volodymyr Babchuk
2017-10-04 21:00 ` [PATCH v7 01/11] arm: traps: use only least 32 bits of fid in PSCI handler Volodymyr Babchuk
2017-10-06 13:48   ` Julien Grall
2017-10-04 21:00 ` [PATCH v7 02/11] arm: traps: use generic register accessors in the PSCI code Volodymyr Babchuk
2017-10-04 21:00 ` [PATCH v7 03/11] arm: traps: check if SMC was conditional before handling it Volodymyr Babchuk
2017-10-04 21:00 ` [PATCH v7 04/11] public: xen.h: add definitions for UUID handling Volodymyr Babchuk
2017-10-05 13:03   ` Konrad Rzeszutek Wilk
2017-10-05 14:50     ` Volodymyr Babchuk
2017-10-09  9:40       ` George Dunlap
2017-10-10 15:19         ` Julien Grall
2017-10-10 15:26           ` Volodymyr Babchuk
2017-10-04 21:00 ` [PATCH v7 05/11] arm: processor.h: add definition for immediate value mask Volodymyr Babchuk
2017-10-04 21:00 ` [PATCH v7 06/11] arm: add SMCCC protocol definitions Volodymyr Babchuk
2017-10-04 21:00 ` [PATCH v7 07/11] arm: smccc: handle SMCs according to SMCCC Volodymyr Babchuk
2017-10-04 21:00 ` [PATCH v7 08/11] arm: traps: handle PSCI calls inside `vsmc.c` Volodymyr Babchuk
2017-10-06 13:52   ` Julien Grall
2017-10-04 21:00 ` [PATCH v7 09/11] arm: PSCI: use definitions provided by asm/smccc.h Volodymyr Babchuk
2017-10-06 13:55   ` Julien Grall
2017-10-04 21:00 ` [PATCH v7 10/11] arm: vsmc: remove 64 bit mode check in PSCI handler Volodymyr Babchuk
2017-10-06 14:00   ` Julien Grall
2017-10-09 20:32     ` Stefano Stabellini
2017-10-10 15:14       ` Julien Grall
2017-10-10 15:17   ` Julien Grall
2017-10-04 21:00 ` [PATCH v7 11/11] public: add and enable XENFEAT_ARM_SMCCC_supported feature Volodymyr Babchuk
2017-10-06 14:01   ` Julien Grall
2017-10-06 14:17     ` Jan Beulich

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.