Hi,

this series adds PSCI support for ARM inmates.

A new psci-demo inmate boots a secondary CPU and issues SGIs back and forth.
After some rounds, it shuts down the secondary CPU again.

Tested in Jailhouse on a TK1 and TX1.
Tested on bare-metal on a TK1. (Note: U-Boot must not boot in HYP mode)

This series requires my inmate-decouple series.

Not working:
  - PSCI support on bare-metal ARM64 without Jailhouse (WIP, I have some
    problems with activating interrupts on bare-metal, as u-boot boots into
    EL2...)
  - Offlining a CPU currently does not decrease cpus_online

Find the series (on top of inmate-decouple on top of next) here:
  https://github.com/lfd/jailhouse/tree/arm-psci

  Ralf

Changes since v1:
  - Fix SGI CPU ID reinjection for GICv2
  - Initialise stacks as proposed by Jan
  - Remove unnecessary patch

Changes since the first RFC series:
  - Jan alread removed virt_id. This made my approach of removing it
    obselete. Removed those patches
  - Removed the TX1 non-root Linux inmate support patches, sent them
    separately
  - Switched to dual-license header

Ralf Ramsauer (16):
  arm: remove superfluous include guards
  inmates: arm: correct decoding of SGIs
  arm: provide correct caller CPU ID when reinjecting SGIs
  inmates: define PAGE_SIZE for ARM architectures
  inmates: arm: Improve calculation of stack location
  inmates: arm64: Improve calculation of stack location
  arm: pass irq_stack pointer to inmate_main
  inmates: arm: allow to specify irq stack location
  inmates: arm-common: add simple PSCI interface for inmates
  inmates: arm-common: introduce processor.h
  inmates: arm: Add cpu_id routine
  inmates: arm: add CPU_ON support for PSCI
  inmates: arm: add support for CPU offlining
  inmates: arm-common: add support for issuing SGIs
  configs: Jetson family: assign two CPUs to demo cells
  inmates: demos: Add PSCI demo

 configs/jetson-tk1-demo.c                         |   4 +-
 configs/jetson-tx1-demo.c                         |   4 +-
 hypervisor/arch/arm-common/control.c              |   2 +-
 hypervisor/arch/arm-common/gic-v2.c               |   4 +-
 hypervisor/arch/arm-common/include/asm/irqchip.h  |   4 +-
 hypervisor/arch/arm-common/include/asm/psci.h     |   5 -
 hypervisor/arch/arm-common/irqchip.c              |  22 ++--
 hypervisor/arch/arm-common/ivshmem.c              |   2 +-
 hypervisor/arch/arm/gic-v3.c                      |   5 +-
 hypervisor/arch/arm/include/asm/percpu.h          |   4 +-
 hypervisor/arch/arm64/include/asm/percpu.h        |   4 +-
 inmates/demos/arm/Makefile                        |   3 +-
 inmates/demos/arm/gic-demo.c                      |   4 +-
 inmates/demos/arm/psci-demo.c                     | 125 ++++++++++++++++++++++
 inmates/demos/arm/uart-demo.c                     |   2 +-
 inmates/demos/arm64/Makefile                      |   3 +-
 inmates/lib/arm-common/Makefile.lib               |   2 +-
 inmates/lib/arm-common/gic-v2.c                   |   9 ++
 inmates/lib/arm-common/gic.c                      |   9 +-
 inmates/lib/arm-common/include/asm/processor.h    |  49 +++++++++
 inmates/lib/arm-common/include/asm/psci_generic.h |  42 ++++++++
 inmates/lib/arm-common/include/gic.h              |   6 +-
 inmates/lib/arm-common/include/inmate.h           |  15 ++-
 inmates/lib/arm-common/include/psci.h             |  41 +++++++
 inmates/lib/arm-common/psci.c                     |  79 ++++++++++++++
 inmates/lib/arm/header.S                          |  74 ++++++++++++-
 inmates/lib/arm/include/arch/gic.h                |   4 +-
 inmates/lib/arm/include/asm/psci_call.h           |  61 +++++++++++
 inmates/lib/arm/include/asm/sysregs.h             |   3 +
 inmates/lib/arm/include/mach.h                    |   4 +
 inmates/lib/arm/inmate.lds.S                      |   3 +-
 inmates/lib/arm64/header.S                        |  73 +++++++++++--
 inmates/lib/arm64/include/arch/gic.h              |   2 +-
 inmates/lib/arm64/include/asm/psci_call.h         |  60 +++++++++++
 inmates/lib/arm64/include/asm/sysregs.h           |   2 +
 inmates/lib/arm64/include/mach.h                  |   4 +
 inmates/lib/arm64/inmate.lds.S                    |   3 +-
 inmates/lib/inmate_common.h                       |   2 -
 inmates/lib/x86/inmate.h                          |   3 +
 inmates/tools/arm/linux-loader.c                  |   2 +-
 inmates/tools/arm64/linux-loader.c                |   2 +-
 41 files changed, 693 insertions(+), 58 deletions(-)
 create mode 100644 inmates/demos/arm/psci-demo.c
 create mode 100644 inmates/lib/arm-common/include/asm/processor.h
 create mode 100644 inmates/lib/arm-common/include/asm/psci_generic.h
 create mode 100644 inmates/lib/arm-common/include/psci.h
 create mode 100644 inmates/lib/arm-common/psci.c
 create mode 100644 inmates/lib/arm/include/asm/psci_call.h
 create mode 100644 inmates/lib/arm64/include/asm/psci_call.h

-- 
2.14.1

-- 
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to