arch/x86/include/asm/hypervisor.h
Source file repositories/reference/linux-study-clean/arch/x86/include/asm/hypervisor.h
File Facts
- System
- Linux kernel
- Corpus path
arch/x86/include/asm/hypervisor.h- Extension
.h- Size
- 2430 bytes
- Lines
- 86
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
asm/kvm_para.hasm/x86_init.hasm/xen/hypervisor.h
Detected Declarations
struct hypervisor_x86enum x86_hypervisor_typefunction hypervisor_is_typefunction init_hypervisor_platform
Annotated Snippet
struct hypervisor_x86 {
/* Hypervisor name */
const char *name;
/* Detection routine */
uint32_t (*detect)(void);
/* Hypervisor type */
enum x86_hypervisor_type type;
/* init time callbacks */
struct x86_hyper_init init;
/* runtime callbacks */
struct x86_hyper_runtime runtime;
/* ignore nopv parameter */
bool ignore_nopv;
};
extern const struct hypervisor_x86 x86_hyper_vmware;
extern const struct hypervisor_x86 x86_hyper_ms_hyperv;
extern const struct hypervisor_x86 x86_hyper_xen_pv;
extern const struct hypervisor_x86 x86_hyper_kvm;
extern const struct hypervisor_x86 x86_hyper_jailhouse;
extern const struct hypervisor_x86 x86_hyper_acrn;
extern const struct hypervisor_x86 x86_hyper_bhyve;
extern struct hypervisor_x86 x86_hyper_xen_hvm;
extern bool nopv;
extern enum x86_hypervisor_type x86_hyper_type;
extern void init_hypervisor_platform(void);
static inline bool hypervisor_is_type(enum x86_hypervisor_type type)
{
return x86_hyper_type == type;
}
#else
static inline void init_hypervisor_platform(void) { }
static inline bool hypervisor_is_type(enum x86_hypervisor_type type)
{
return type == X86_HYPER_NATIVE;
}
#endif /* CONFIG_HYPERVISOR_GUEST */
#endif /* _ASM_X86_HYPERVISOR_H */
Annotation
- Immediate include surface: `asm/kvm_para.h`, `asm/x86_init.h`, `asm/xen/hypervisor.h`.
- Detected declarations: `struct hypervisor_x86`, `enum x86_hypervisor_type`, `function hypervisor_is_type`, `function init_hypervisor_platform`.
- Atlas domain: Architecture Layer / arch/x86.
- 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.