m1n1/proxyclient/hv/trace_all.py
Hector Martin edbe471804 run_guest.py: Add options to run external scripts:
-m <script>

  Run a script in hypervisor context prior to starting the guest.
  This is essentially the same as the shell context.

-c <code>
  Run a literal string of code prior to starting the guest.

-S
  Start a shell instead of directly starting the guest. Use `start` to
  actually begin guest execution.

This also adds a couple example scripts under hv/.

Signed-off-by: Hector Martin <marcan@marcan.st>
2021-06-10 22:37:12 +09:00

24 lines
610 B
Python

# SPDX-License-Identifier: MIT
# Map the entire MMIO range as traceable
map_sw(0x2_00000000,
0x2_00000000 | hv.SPTE_TRACE_READ | hv.SPTE_TRACE_WRITE,
0x5_00000000)
# Skip some noisy devices
try:
trace_device("/arm-io/usb-drd0", False)
except KeyError:
pass
try:
trace_device("/arm-io/usb-drd1", False)
except KeyError:
pass
trace_device("/arm-io/uart2", False)
trace_device("/arm-io/error-handler", False)
trace_device("/arm-io/aic", False)
trace_device("/arm-io/spi1", False)
trace_device("/arm-io/pmgr", False)
# Re-map the vuart, which the first map_sw undid...
map_vuart()