AArch64 EL2 hypervisor for QEMU virt that boots at EL2
1

Configure Feed

Select the types of activity you want to include in your feed.

ariel / include / hv / log.h
1.2 kB 60 lines
1#ifndef HV_LOG_H 2#define HV_LOG_H 3 4#include "hv/types.h" 5 6enum log_kind { 7 LOG_BOOT = 1, 8 LOG_TRAP = 2, 9 LOG_POLICY = 3, 10 LOG_HVC = 4, 11 LOG_ABORT = 5, 12 LOG_MONITOR = 6, 13 LOG_PANIC = 7, 14 LOG_SELFTEST = 8, 15}; 16 17enum log_action { 18 LOG_ACT_NONE = 0, 19 LOG_ACT_EMULATE_READ, 20 LOG_ACT_EMULATE_WRITE, 21 LOG_ACT_WRITE_MASK, 22 LOG_ACT_DENY_SKIP, 23 LOG_ACT_DENY_UNDEF, 24 LOG_ACT_PAUSE, 25 LOG_ACT_PANIC, 26}; 27 28struct log_event { 29 uint64_t seq; 30 uint64_t cpu; 31 uint64_t vcpu; 32 uint64_t timestamp; 33 uint32_t kind; 34 uint32_t ec; 35 uint64_t iss; 36 uint64_t elr; 37 uint64_t far; 38 uint64_t hpfar; 39 uint64_t sysreg_key; 40 uint32_t is_read; 41 uint32_t rt; 42 uint64_t operand; 43 uint64_t result; 44 uint32_t action; 45 uint32_t reason; 46 uint32_t policy_class; 47 uint64_t pstate; 48 const char *name; 49}; 50 51void log_init(void); 52void log_event_commit(const struct log_event *event); 53void log_simple(enum log_kind kind, uint32_t reason, uint64_t a, uint64_t b); 54void log_dump(unsigned limit); 55void log_clear(void); 56uint64_t log_next_sequence(void); 57uint32_t log_event_count(void); 58bool log_selftest(void); 59 60#endif