arch/s390/kvm/dat.h
Source file repositories/reference/linux-study-clean/arch/s390/kvm/dat.h
File Facts
- System
- Linux kernel
- Corpus path
arch/s390/kvm/dat.h- Extension
.h- Size
- 27963 bytes
- Lines
- 979
- Domain
- Architecture Layer
- Bucket
- arch/s390
- 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.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/radix-tree.hlinux/refcount.hlinux/io.hlinux/kvm_types.hlinux/pgalloc.hasm/tlbflush.hasm/dat-bits.h
Detected Declarations
struct segment_tablestruct region3_tablestruct region2_tablestruct region1_tablestruct crst_tablestruct page_tablestruct dat_walkstruct dat_walk_opsstruct dat_walkstruct ptval_paramstruct vsie_rmapstruct kvm_s390_mmu_cachestruct guest_faultenum dat_walk_flagsenum pgste_gps_usagefunction Authorfunction _ptefunction _crste_fc0function _crste_fc1function crdte_crstefunction idte_crstefunction dat_init_pgstesfunction dat_init_page_tablefunction asce_endfunction asce_contains_gfnfunction is_pmdfunction is_pudfunction is_p4dfunction is_pgdfunction pmd_origin_largefunction pud_origin_largefunction crste_origin_largefunction pte_originfunction pmd_prefixfunction pud_prefixfunction crste_leaffunction crste_prefixfunction crste_dirtyfunction pte_holefunction _crste_holefunction _crste_nonefunction large_pud_to_physfunction large_pmd_to_physfunction large_crste_to_physfunction cspg_crstefunction asce_flush_tlbfunction pgste_get_trylockfunction pgste_get_lock
Annotated Snippet
struct segment_table {
union pmd pmds[_CRST_ENTRIES];
};
struct region3_table {
union pud puds[_CRST_ENTRIES];
};
struct region2_table {
union p4d p4ds[_CRST_ENTRIES];
};
struct region1_table {
union pgd pgds[_CRST_ENTRIES];
};
struct crst_table {
union {
union crste crstes[_CRST_ENTRIES];
struct segment_table segment;
struct region3_table region3;
struct region2_table region2;
struct region1_table region1;
};
};
struct page_table {
union pte ptes[_PAGE_ENTRIES];
union pgste pgstes[_PAGE_ENTRIES];
};
static_assert(sizeof(struct crst_table) == _CRST_TABLE_SIZE);
static_assert(sizeof(struct page_table) == PAGE_SIZE);
struct dat_walk;
typedef long (*dat_walk_op)(union crste *crste, gfn_t gfn, gfn_t next, struct dat_walk *w);
struct dat_walk_ops {
union {
dat_walk_op crste_ops[4];
struct {
dat_walk_op pmd_entry;
dat_walk_op pud_entry;
dat_walk_op p4d_entry;
dat_walk_op pgd_entry;
};
};
long (*pte_entry)(union pte *pte, gfn_t gfn, gfn_t next, struct dat_walk *w);
};
struct dat_walk {
const struct dat_walk_ops *ops;
union crste *last;
union pte *last_pte;
union asce asce;
gfn_t start;
gfn_t end;
int flags;
void *priv;
};
struct ptval_param {
unsigned char offset : 6;
unsigned char len : 2;
};
/**
* _pte() - Useful constructor for union pte
* @pfn: the pfn this pte should point to.
* @writable: whether the pte should be writable.
* @dirty: whether the pte should be dirty.
* @special: whether the pte should be marked as special
*
* The pte is also marked as young and present. If the pte is marked as dirty,
* it gets marked as soft-dirty too. If the pte is not dirty, the hardware
* protect bit is set (independently of the write softbit); this way proper
* dirty tracking can be performed.
*
* Return: a union pte value.
*/
static inline union pte _pte(kvm_pfn_t pfn, bool writable, bool dirty, bool special)
{
union pte res = { .val = PFN_PHYS(pfn) };
res.h.p = !dirty;
res.s.y = 1;
res.s.pr = 1;
res.s.w = writable;
res.s.d = dirty;
Annotation
- Immediate include surface: `linux/radix-tree.h`, `linux/refcount.h`, `linux/io.h`, `linux/kvm_types.h`, `linux/pgalloc.h`, `asm/tlbflush.h`, `asm/dat-bits.h`.
- Detected declarations: `struct segment_table`, `struct region3_table`, `struct region2_table`, `struct region1_table`, `struct crst_table`, `struct page_table`, `struct dat_walk`, `struct dat_walk_ops`, `struct dat_walk`, `struct ptval_param`.
- Atlas domain: Architecture Layer / arch/s390.
- 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.