arch/arm64/include/asm/kvm_pkvm.h
Source file repositories/reference/linux-study-clean/arch/arm64/include/asm/kvm_pkvm.h
File Facts
- System
- Linux kernel
- Corpus path
arch/arm64/include/asm/kvm_pkvm.h- Extension
.h- Size
- 6438 bytes
- Lines
- 225
- 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.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/arm_ffa.hlinux/memblock.hlinux/scatterlist.hasm/kvm_host.hasm/kvm_pgtable.h
Detected Declarations
struct pkvm_mappingfunction VMfunction VMfunction hyp_vmemmap_memblock_sizefunction hyp_vmemmap_pagesfunction hyp_vm_table_pagesfunction __hyp_pgtable_max_pagesfunction __hyp_pgtable_total_pagesfunction hyp_s1_pgtable_pagesfunction host_s2_pgtable_pagesfunction pkvm_selftest_pagesfunction pkvm_selftest_pagesfunction hyp_ffa_proxy_pagesfunction pkvm_host_sve_state_size
Annotated Snippet
struct pkvm_mapping {
struct rb_node node;
u64 gfn;
u64 pfn;
u64 nr_pages;
u64 __subtree_last; /* Internal member for interval tree */
};
int pkvm_pgtable_stage2_init(struct kvm_pgtable *pgt, struct kvm_s2_mmu *mmu,
struct kvm_pgtable_mm_ops *mm_ops);
void pkvm_pgtable_stage2_destroy_range(struct kvm_pgtable *pgt,
u64 addr, u64 size);
void pkvm_pgtable_stage2_destroy_pgd(struct kvm_pgtable *pgt);
int pkvm_pgtable_stage2_map(struct kvm_pgtable *pgt, u64 addr, u64 size, u64 phys,
enum kvm_pgtable_prot prot, void *mc,
enum kvm_pgtable_walk_flags flags);
int pkvm_pgtable_stage2_unmap(struct kvm_pgtable *pgt, u64 addr, u64 size);
int pkvm_pgtable_stage2_wrprotect(struct kvm_pgtable *pgt, u64 addr, u64 size);
int pkvm_pgtable_stage2_flush(struct kvm_pgtable *pgt, u64 addr, u64 size);
bool pkvm_pgtable_stage2_test_clear_young(struct kvm_pgtable *pgt, u64 addr, u64 size, bool mkold);
int pkvm_pgtable_stage2_relax_perms(struct kvm_pgtable *pgt, u64 addr, enum kvm_pgtable_prot prot,
enum kvm_pgtable_walk_flags flags);
void pkvm_pgtable_stage2_mkyoung(struct kvm_pgtable *pgt, u64 addr,
enum kvm_pgtable_walk_flags flags);
int pkvm_pgtable_stage2_split(struct kvm_pgtable *pgt, u64 addr, u64 size,
struct kvm_mmu_memory_cache *mc);
void pkvm_pgtable_stage2_free_unlinked(struct kvm_pgtable_mm_ops *mm_ops, void *pgtable, s8 level);
kvm_pte_t *pkvm_pgtable_stage2_create_unlinked(struct kvm_pgtable *pgt, u64 phys, s8 level,
enum kvm_pgtable_prot prot, void *mc,
bool force_pte);
#endif /* __ARM64_KVM_PKVM_H__ */
Annotation
- Immediate include surface: `linux/arm_ffa.h`, `linux/memblock.h`, `linux/scatterlist.h`, `asm/kvm_host.h`, `asm/kvm_pgtable.h`.
- Detected declarations: `struct pkvm_mapping`, `function VM`, `function VM`, `function hyp_vmemmap_memblock_size`, `function hyp_vmemmap_pages`, `function hyp_vm_table_pages`, `function __hyp_pgtable_max_pages`, `function __hyp_pgtable_total_pages`, `function hyp_s1_pgtable_pages`, `function host_s2_pgtable_pages`.
- Atlas domain: Architecture Layer / arch/arm64.
- Implementation status: source implementation candidate.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.