[kernel][x86] Save/restore regs early in syscall

Save general purpose registers upon entering the kernel for a syscall.
Restore general purpose registers just before returning to user mode.
By saving/restoring all the registers:

* Debuggers will get a more accurate picture of the thread's state.
* Scratch register clearing can be removed.
* Pending thread signal processing can be moved into C/C++ code in a
future CL.

Add new core tests, Threads.SyscallSuspendedRegisterState and
Threads.SyscallDebuggerModifyResult.

Performance impact appears to be about 7ns - 18ns per syscall.

Bug: 60654
Bug: 62790
Test: /boot/test/core-threads
Change-Id: I1feb00db839bda0788d67a0ac63ab6937fdc64e7
Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/430647
Commit-Queue: Nick Maniscalco <maniscalco@google.com>
Reviewed-by: Roland McGrath <mcgrathr@google.com>
Reviewed-by: Venkatesh Srinivas <venkateshs@google.com>
Testability-Review: Roland McGrath <mcgrathr@google.com>
5 files changed
tree: a166f78f5e4ae68513545fec9c3118d5ec35aa6b
  1. boards/
  2. build/
  3. bundles/
  4. docs/
  5. examples/
  6. garnet/
  7. products/
  8. scripts/
  9. sdk/
  10. src/
  11. third_party/
  12. tools/
  13. zircon/
  14. .clang-format
  15. .clang-tidy
  16. .gitattributes
  17. .gitignore
  18. .gn
  19. .style.yapf
  20. AUTHORS
  21. BUILD.gn
  22. CODE_OF_CONDUCT.md
  23. CONTRIBUTING.md
  24. LICENSE
  25. OWNERS
  26. PATENTS
  27. README.md
  28. rustfmt.toml
README.md

Fuchsia

Pink + Purple == Fuchsia (a new operating system)

What is Fuchsia?

Fuchsia is a modular, capability-based operating system. Fuchsia runs on modern 64-bit Intel and ARM processors.

Fuchsia is an open source project with a code of conduct that we expect everyone who interacts with the project to respect.

Read more about Fuchsia's principles.

How can I build and run Fuchsia?

See Getting Started.

Where can I learn more about Fuchsia?

See fuchsia.dev.