Skip to content

target-arm: add Security Extensions for CPUs

Fabian Aggeler qemu-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest32 patches 45 repliesIn review
  2. v223 patches 51 repliesSuperseded

Changes in v3 from the cover letter

* rebased
* reordered
* changed from ARM_FEATURE_SECURITY_EXTENSIONS to ARM_FEATURE_EL3
* renamed tz_cp_reginfo to security_cp_reginfo
* extended arm_is_secure() with EL3 handling
* rewrote nsacr patch
* removed MMU split for secure/nonsecure world
* removed arm_current_sctlr
* new banking scheme

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/32target-arm: add cpu feature EL3 to CPUs with Security Extensionstarget-arm/cpu.c+4 -00 replies
2/32target-arm: move Aarch32 SCR into security reglisttarget-arm/helper.c+8 -32 replies
3/32target-arm: increase arrays of registers R13 & R14target-arm/cpu.h target-arm/machine.c+4 -41 reply
4/32target-arm: add arm_is_secure() functiontarget-arm/cpu.h+38 -06 replies
5/32target-arm: reject switching to monitor modetarget-arm/helper.c+2 -04 replies
6/32target-arm: make arm_current_pl() return PL3target-arm/cpu.h+9 -63 replies
7/32target-arm: add non-secure Translation Block flagtarget-arm/cpu.h target-arm/translate-a64.c target-arm/translate.c +1 more+15 -04 replies
8/32target-arm: A32: Emulate the SMC instructiontarget-arm/helper.c target-arm/internals.h target-arm/translate.c+41 -100 replies
9/32target-arm: extend Aarch32 async excp maskingtarget-arm/cpu.h+61 -161 reply
10/32target-arm: extend Aarch64 SCR.{FIQ|IRQ} handlingtarget-arm/cpu.h+72 -261 reply
11/32target-arm: add async excp target_el&mode functiontarget-arm/cpu.h target-arm/helper.c+140 -02 replies
12/32target-arm: use dedicated target_el functiontarget-arm/helper.c+6 -180 replies
13/32target-arm: implement IRQ/FIQ routing to Monitor modetarget-arm/helper.c+9 -00 replies
14/32target-arm: Respect SCR.FW, SCR.AW and SCTLR.NMFItarget-arm/helper.c+39 -32 replies
15/32target-arm: add NSACR registertarget-arm/cpu.h target-arm/helper.c+73 -13 replies
16/32target-arm: add SDER definitiontarget-arm/cpu.h target-arm/helper.c+4 -00 replies
17/32target-arm: add MVBAR supporttarget-arm/cpu.h target-arm/helper.c+10 -60 replies
18/32target-arm: add macros to access banked registerstarget-arm/cpu.h+35 -00 replies
19/32target-arm: insert Aarch32 cpregs twice into hashtabletarget-arm/cpu.h target-arm/helper.c target-arm/translate.c+40 -134 replies
20/32target-arm: arrayfying fieldoffset for bankingtarget-arm/cpu.h target-arm/helper.c+36 -151 reply
21/32target-arm: add SCTLR_EL3 and make SCTLR bankedhw/arm/pxa2xx.c target-arm/cpu.c target-arm/cpu.h +2 more+62 -380 replies
22/32target-arm: make CSSELR bankedtarget-arm/cpu.h target-arm/helper.c+14 -50 replies
23/32target-arm: add TTBR0_EL3 and make TTBR0/1 bankedtarget-arm/cpu.h target-arm/helper.c+54 -120 replies
24/32target-arm: add TCR_EL3 and make TTBCR bankedtarget-arm/cpu.h target-arm/helper.c+44 -130 replies
25/32target-arm: make c2_mask and c2_base_mask bankedtarget-arm/cpu.h target-arm/helper.c+20 -90 replies
26/32target-arm: make DACR bankedhw/arm/pxa2xx.c target-arm/cpu.h target-arm/helper.c+23 -110 replies
27/32target-arm: make IFSR bankedtarget-arm/cpu.h target-arm/helper.c+14 -50 replies
28/32target-arm: make DFSR bankedtarget-arm/cpu.h target-arm/helper-a64.c target-arm/helper.c+34 -114 replies
29/32target-arm: make IFAR/DFAR bankedtarget-arm/cpu.c target-arm/cpu.h target-arm/helper-a64.c +1 more+47 -150 replies
30/32target-arm: make PAR bankedtarget-arm/cpu.h target-arm/helper.c+23 -122 replies
31/32target-arm: make VBAR bankedtarget-arm/cpu.h target-arm/helper-a64.c target-arm/helper.c+23 -92 replies
32/32target-arm: make c13 cp regs banked (FCSEIDR, ...)target-arm/cpu.h target-arm/helper.c+57 -152 replies

Reviews trailers per patch

3 of 32 patches have a Reviewed-by or Acked-by.

PatchEdgar E. Iglesias
1/32
2/32
3/32R-b
4/32
5/32R-b
6/32
7/32R-b
8/32
9/32
10/32
11/32
12/32
13/32
14/32
15/32
16/32
17/32
18/32
19/32
20/32
21/32
22/32
23/32
24/32
25/32
26/32
27/32
28/32
29/32
30/32
31/32
32/32

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [Qemu-devel] [PATCH v3 00/32] target-arm: add Security Extensions for CPUs

Hi,

this is round 3 of the Security Extension patches which started with the TrustZone patchset by Samsung. Many patches were dropped or got separated from this patchset. It shows yet another mechanism of register banking for EL3 running in Aarch32 mode. This version also conforms better with the ARM ARMv8. The patches got reordered with banking related patches at the end. Most of the registers get converted separately now.

The whole patchset is based on master with Edgar's patches of yesterday (v2 target-arm: Parts of the Aarch64 EL2/3 exception model) applied.

Patch 9,10,11 and 12 are added for some more discussion about Edgar's patches which break out masking and target_el. Parts of it could probably be added to Edgar's patchset.

v2 -> v3:
* rebased
* reordered
* changed from ARM_FEATURE_SECURITY_EXTENSIONS to ARM_FEATURE_EL3
* renamed tz_cp_reginfo to security_cp_reginfo
* extended arm_is_secure() with EL3 handling
* rewrote nsacr patch
* removed MMU split for secure/nonsecure world
* removed arm_current_sctlr
* new banking scheme

v2: http://lists.gnu.org/archive/html/qemu-devel/2014-05/msg02522.html

Thanks,
Fabian

Fabian Aggeler (29):
target-arm: add cpu feature EL3 to CPUs with Security Extensions
target-arm: move Aarch32 SCR into security reglist
target-arm: increase arrays of registers R13 & R14
target-arm: add arm_is_secure() function
target-arm: make arm_current_pl() return PL3
target-arm: A32: Emulate the SMC instruction
target-arm: extend Aarch32 async excp masking
target-arm: extend Aarch64 SCR.{FIQ|IRQ} handling
target-arm: add async excp target_el&mode function
target-arm: use dedicated target_el function
target-arm: implement IRQ/FIQ routing to Monitor mode
target-arm: Respect SCR.FW, SCR.AW and SCTLR.NMFI
target-arm: add NSACR register
target-arm: add MVBAR support
target-arm: add macros to access banked registers
target-arm: insert Aarch32 cpregs twice into hashtable
target-arm: arrayfying fieldoffset for banking
target-arm: add SCTLR_EL3 and make SCTLR banked
target-arm: make CSSELR banked
target-arm: add TTBR0_EL3 and make TTBR0/1 banked
target-arm: add TCR_EL3 and make TTBCR banked
target-arm: make c2_mask and c2_base_mask banked
target-arm: make DACR banked
target-arm: make IFSR banked
target-arm: make DFSR banked
target-arm: make IFAR/DFAR banked
target-arm: make PAR banked
target-arm: make VBAR banked
target-arm: make c13 cp regs banked (FCSEIDR,...)

Sergey Fedorov (3):
target-arm: reject switching to monitor mode
target-arm: add non-secure Translation Block flag
target-arm: add SDER definition

 hw/arm/pxa2xx.c            |   4 +-
 target-arm/cpu.c           |  11 +-
 target-arm/cpu.h           | 453 +++++++++++++++++++++++++----
 target-arm/helper-a64.c    |  37 ++-
 target-arm/helper.c        | 702 ++++++++++++++++++++++++++++++++++-----------
 target-arm/internals.h     |   5 +
 target-arm/machine.c       |   4 +-
 target-arm/op_helper.c     |   2 +-
 target-arm/translate-a64.c |   1 +
 target-arm/translate.c     |  57 ++--
 target-arm/translate.h     |   1 +
 11 files changed, 1031 insertions(+), 246 deletions(-)
Signature · 1 line
1.8.3.2