arch/arm64/include/asm/kvm_hypevents.h
Source file repositories/reference/linux-study-clean/arch/arm64/include/asm/kvm_hypevents.h
File Facts
- System
- Linux kernel
- Corpus path
arch/arm64/include/asm/kvm_hypevents.h- Extension
.h- Size
- 1324 bytes
- Lines
- 61
- Domain
- Architecture Layer
- Bucket
- arch/arm64
- Inferred role
- Architecture Layer: implementation source
- Status
- source implementation candidate
Why This File Exists
CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
nvhe/trace.h
Detected Declarations
enum hyp_enter_exit_reason
Annotated Snippet
#if !defined(__ARM64_KVM_HYPEVENTS_H_) || defined(HYP_EVENT_MULTI_READ)
#define __ARM64_KVM_HYPEVENTS_H_
#ifdef __KVM_NVHE_HYPERVISOR__
#include <nvhe/trace.h>
#endif
#ifndef __HYP_ENTER_EXIT_REASON
#define __HYP_ENTER_EXIT_REASON
enum hyp_enter_exit_reason {
HYP_REASON_SMC,
HYP_REASON_HVC,
HYP_REASON_PSCI,
HYP_REASON_HOST_ABORT,
HYP_REASON_GUEST_EXIT,
HYP_REASON_ERET_HOST,
HYP_REASON_ERET_GUEST,
HYP_REASON_UNKNOWN /* Must be last */
};
#endif
HYP_EVENT(hyp_enter,
HE_PROTO(struct kvm_cpu_context *host_ctxt, u8 reason),
HE_STRUCT(
he_field(u8, reason)
he_field(pid_t, vcpu)
),
HE_ASSIGN(
__entry->reason = reason;
__entry->vcpu = __tracing_get_vcpu_pid(host_ctxt);
),
HE_PRINTK("reason=%s vcpu=%d", __hyp_enter_exit_reason_str(__entry->reason), __entry->vcpu)
);
HYP_EVENT(hyp_exit,
HE_PROTO(struct kvm_cpu_context *host_ctxt, u8 reason),
HE_STRUCT(
he_field(u8, reason)
he_field(pid_t, vcpu)
),
HE_ASSIGN(
__entry->reason = reason;
__entry->vcpu = __tracing_get_vcpu_pid(host_ctxt);
),
HE_PRINTK("reason=%s vcpu=%d", __hyp_enter_exit_reason_str(__entry->reason), __entry->vcpu)
);
HYP_EVENT(selftest,
HE_PROTO(u64 id),
HE_STRUCT(
he_field(u64, id)
),
HE_ASSIGN(
__entry->id = id;
),
RE_PRINTK("id=%llu", __entry->id)
);
#endif
Annotation
- Immediate include surface: `nvhe/trace.h`.
- Detected declarations: `enum hyp_enter_exit_reason`.
- Atlas domain: Architecture Layer / arch/arm64.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.