hftest: Write-back cpu_start_state before starting a new vCPU

New vCPU is started with caching disabled but it is meant to read data
provided by the vCPU which started it and had caching enabled. Because
the data is needed before it is possible to set up the MMU and enable
data caching, the original vCPU must ensure that the data is written
back to memory prior to spawning the new vCPU.

This patch restructures the way hftests start new CPUs to accommodate
this requirement. A new architecture-agnostic power_mgmt build target is
created which handles the high-level logic of this process. The
power_mgmt target in src/arch is reduced to the thinnest layer possible,
merely performing an SMC call to spawn a new vCPU and then setting up
the stack pointer and jumping to the high-level entry point when the
vCPU is powered up.

It is now the task of the high-level power_mgmt module to ensure the
state struct is properly written back to memory and that it does not get
freed until the new vCPU is finished both low- and high-level
initialization.

Bug: 141103913
Test: smp.two_vcpus on RPi4
Change-Id: Ie77c6b5ad0aeecaceb0b56623908353843d03c3e
10 files changed
tree: 0f7244d2004fc5101e1fbace2f13a6f29102083a
  1. .vscode/
  2. build/
  3. docs/
  4. driver/
  5. inc/
  6. kokoro/
  7. project/
  8. src/
  9. test/
  10. third_party/
  11. .clang-format
  12. .clang-tidy
  13. .gitignore
  14. .gitmodules
  15. .gn
  16. AUTHORS
  17. BUILD.gn
  18. CONTRIBUTING.md
  19. LICENSE
  20. Makefile
  21. README.md
README.md

Hafnium

Hafnium is a hypervisor, initially supporting aarch64 (64-bit ARMv8 CPUs).

Get in touch and keep up-to-date at hafnium-discuss@googlegroups.com.

Getting started

To jump in and build Hafnium, follow the getting started instructions.

If you want to contribute to the project, see details of how we accept contributions.

Documentation

More documentation is available on: