arch/x86/kvm/xen.h
Source file repositories/reference/linux-study-clean/arch/x86/kvm/xen.h
File Facts
- System
- Linux kernel
- Corpus path
arch/x86/kvm/xen.h- Extension
.h- Size
- 6973 bytes
- Lines
- 265
- Domain
- Architecture Layer
- Bucket
- arch/x86
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
asm/xen/cpuid.hasm/xen/hypervisor.hlinux/jump_label_ratelimit.hasm/pvclock-abi.hasm/xen/interface.hxen/interface/vcpu.h
Detected Declarations
struct compat_arch_vcpu_infostruct compat_vcpu_infostruct compat_arch_shared_infostruct compat_shared_infostruct compat_vcpu_runstate_infostruct compat_sched_pollfunction kvm_xen_sw_enable_lapicfunction kvm_xen_is_tsc_leaffunction kvm_xen_msr_enabledfunction kvm_xen_is_hypercall_page_msrfunction kvm_xen_hypercall_enabledfunction kvm_xen_has_interruptfunction kvm_xen_has_pending_eventsfunction kvm_xen_timer_enabledfunction kvm_xen_has_pending_timerfunction kvm_xen_write_hypercall_pagefunction kvm_xen_init_vmfunction kvm_xen_is_hypercall_page_msrfunction kvm_xen_hypercall_enabledfunction kvm_xen_has_interruptfunction kvm_xen_inject_pending_eventsfunction kvm_xen_has_pending_timerfunction kvm_xen_inject_timer_irqsfunction kvm_xen_is_tsc_leaffunction kvm_xen_runstate_set_runningfunction kvm_xen_runstate_set_preempted
Annotated Snippet
struct compat_arch_vcpu_info {
unsigned int cr2;
unsigned int pad[5];
};
struct compat_vcpu_info {
uint8_t evtchn_upcall_pending;
uint8_t evtchn_upcall_mask;
uint16_t pad;
uint32_t evtchn_pending_sel;
struct compat_arch_vcpu_info arch;
struct pvclock_vcpu_time_info time;
}; /* 64 bytes (x86) */
struct compat_arch_shared_info {
unsigned int max_pfn;
unsigned int pfn_to_mfn_frame_list_list;
unsigned int nmi_reason;
unsigned int p2m_cr3;
unsigned int p2m_vaddr;
unsigned int p2m_generation;
uint32_t wc_sec_hi;
};
struct compat_shared_info {
struct compat_vcpu_info vcpu_info[MAX_VIRT_CPUS];
uint32_t evtchn_pending[32];
uint32_t evtchn_mask[32];
struct pvclock_wall_clock wc;
struct compat_arch_shared_info arch;
};
#define COMPAT_EVTCHN_2L_NR_CHANNELS (8 * \
sizeof_field(struct compat_shared_info, \
evtchn_pending))
struct compat_vcpu_runstate_info {
int state;
uint64_t state_entry_time;
uint64_t time[4];
} __attribute__((packed));
struct compat_sched_poll {
/* This is actually a guest virtual address which points to ports. */
uint32_t ports;
unsigned int nr_ports;
uint64_t timeout;
};
#endif /* __ARCH_X86_KVM_XEN_H__ */
Annotation
- Immediate include surface: `asm/xen/cpuid.h`, `asm/xen/hypervisor.h`, `linux/jump_label_ratelimit.h`, `asm/pvclock-abi.h`, `asm/xen/interface.h`, `xen/interface/vcpu.h`.
- Detected declarations: `struct compat_arch_vcpu_info`, `struct compat_vcpu_info`, `struct compat_arch_shared_info`, `struct compat_shared_info`, `struct compat_vcpu_runstate_info`, `struct compat_sched_poll`, `function kvm_xen_sw_enable_lapic`, `function kvm_xen_is_tsc_leaf`, `function kvm_xen_msr_enabled`, `function kvm_xen_is_hypercall_page_msr`.
- Atlas domain: Architecture Layer / arch/x86.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.