Set or clear VI bit in hvc_handler just before returning, using count.

A count of enabled/pending interrupts is kept for this purpose whenever
the enabled and pending bits are updated. This handles the case where the
target vCPU was already running on a different physical CPU when an
interrupt was injected and so it had to be kicked by the primary.

Also add comments explaining what happens in case that the target of an
injected interrupt is already running on a different physical CPU.

Also also, add a test for the case of injecting an interrupt ID which is
not enabled, then enabling it later.

Bug: 117270899
Change-Id: I200f547a5a72332a5e24b5109a3e6e7b66c0b59e
12 files changed
tree: bacc4e61bd1ace31cd14b0bc2fab40456825ac36
  1. build/
  2. docs/
  3. driver/
  4. inc/
  5. kokoro/
  6. project/
  7. src/
  8. test/
  9. third_party/
  10. .clang-format
  11. .clang-tidy
  12. .gitignore
  13. .gitmodules
  14. .gn
  15. BUILD.gn
  16. CONTRIBUTING.md
  17. LICENSE
  18. Makefile
  19. 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.