arch/x86/include/asm/paravirt.h
Source file repositories/reference/linux-study-clean/arch/x86/include/asm/paravirt.h
File Facts
- System
- Linux kernel
- Corpus path
arch/x86/include/asm/paravirt.h- Extension
.h- Size
- 13329 bytes
- Lines
- 570
- 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/paravirt-base.hasm/paravirt_types.hasm/pgtable_types.hasm/asm.hasm/nospec-branch.hlinux/types.hlinux/cpumask.hasm/frame.h
Detected Declarations
function __flush_tlb_localfunction __flush_tlb_globalfunction __flush_tlb_one_userfunction __flush_tlb_multifunction paravirt_arch_exit_mmapfunction notify_page_enc_status_changedfunction arch_safe_haltfunction haltfunction load_sp0function __cpuidfunction paravirt_get_debugregfunction set_debugregfunction read_cr0function write_cr0function read_cr2function write_cr2function __read_cr3function write_cr3function __write_cr4function paravirt_read_msrfunction paravirt_write_msrfunction paravirt_read_msr_safefunction paravirt_write_msr_safefunction wrmsrfunction wrmsrqfunction wrmsrq_safefunction rdmsrq_safefunction rdpmcfunction paravirt_alloc_ldtfunction paravirt_free_ldtfunction load_TR_descfunction load_gdtfunction load_idtfunction set_ldtfunction paravirt_store_trfunction load_TLSfunction load_gs_indexfunction write_ldt_entryfunction write_gdt_entryfunction write_idt_entryfunction tss_invalidate_io_bitmapfunction tss_update_io_bitmapfunction paravirt_enter_mmapfunction paravirt_pgd_allocfunction paravirt_pgd_freefunction paravirt_alloc_ptefunction paravirt_release_ptefunction paravirt_alloc_pmd
Annotated Snippet
set_p4d((p4d_t *)(pgdp), (p4d_t) { (pgdval).pgd }); \
} while (0)
#define pgd_clear(pgdp) do { \
if (pgtable_l5_enabled()) \
set_pgd(pgdp, native_make_pgd(0)); \
} while (0)
static inline void p4d_clear(p4d_t *p4dp)
{
set_p4d(p4dp, native_make_p4d(0));
}
static inline void set_pte_atomic(pte_t *ptep, pte_t pte)
{
set_pte(ptep, pte);
}
static inline void pte_clear(struct mm_struct *mm, unsigned long addr,
pte_t *ptep)
{
set_pte(ptep, native_make_pte(0));
}
static inline void pmd_clear(pmd_t *pmdp)
{
set_pmd(pmdp, native_make_pmd(0));
}
#define __HAVE_ARCH_START_CONTEXT_SWITCH
static inline void arch_start_context_switch(struct task_struct *prev)
{
PVOP_VCALL1(pv_ops, cpu.start_context_switch, prev);
}
static inline void arch_end_context_switch(struct task_struct *next)
{
PVOP_VCALL1(pv_ops, cpu.end_context_switch, next);
}
static inline void arch_enter_lazy_mmu_mode(void)
{
}
static inline void arch_flush_lazy_mmu_mode(void)
{
PVOP_VCALL0(pv_ops, mmu.lazy_mode_flush);
}
static inline void arch_leave_lazy_mmu_mode(void)
{
arch_flush_lazy_mmu_mode();
}
static inline void __set_fixmap(unsigned /* enum fixed_addresses */ idx,
phys_addr_t phys, pgprot_t flags)
{
pv_ops.mmu.set_fixmap(idx, phys, flags);
}
static __always_inline unsigned long arch_local_save_flags(void)
{
return PVOP_ALT_CALLEE0(unsigned long, pv_ops, irq.save_fl, "pushf; pop %%rax",
ALT_NOT_XEN);
}
static __always_inline void arch_local_irq_disable(void)
{
PVOP_ALT_VCALLEE0(pv_ops, irq.irq_disable, "cli", ALT_NOT_XEN);
}
static __always_inline void arch_local_irq_enable(void)
{
PVOP_ALT_VCALLEE0(pv_ops, irq.irq_enable, "sti", ALT_NOT_XEN);
}
static __always_inline unsigned long arch_local_irq_save(void)
{
unsigned long f;
f = arch_local_save_flags();
arch_local_irq_disable();
return f;
}
#endif
#else /* __ASSEMBLER__ */
#ifdef CONFIG_X86_64
#ifdef CONFIG_PARAVIRT_XXL
Annotation
- Immediate include surface: `asm/paravirt-base.h`, `asm/paravirt_types.h`, `asm/pgtable_types.h`, `asm/asm.h`, `asm/nospec-branch.h`, `linux/types.h`, `linux/cpumask.h`, `asm/frame.h`.
- Detected declarations: `function __flush_tlb_local`, `function __flush_tlb_global`, `function __flush_tlb_one_user`, `function __flush_tlb_multi`, `function paravirt_arch_exit_mmap`, `function notify_page_enc_status_changed`, `function arch_safe_halt`, `function halt`, `function load_sp0`, `function __cpuid`.
- 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.