commit | 3ad6e5460acdca25e35bfe9180245caa769e3798 | [log] [tgz] |
---|---|---|
author | David Brazdil <dbrazdil@google.com> | Fri Sep 13 17:17:09 2019 +0100 |
committer | David Brazdil <dbrazdil@google.com> | Wed Sep 18 12:32:39 2019 +0000 |
tree | 0f7244d2004fc5101e1fbace2f13a6f29102083a | |
parent | e7ea6c15faf4ab946b51bb3ee56803e0329375db [diff] |
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
Hafnium is a hypervisor, initially supporting aarch64 (64-bit ARMv8 CPUs).
Get in touch and keep up-to-date at hafnium-discuss@googlegroups.com.
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.
More documentation is available on: