arch/s390/kvm/gaccess.c
Source file repositories/reference/linux-study-clean/arch/s390/kvm/gaccess.c
File Facts
- System
- Linux kernel
- Corpus path
arch/s390/kvm/gaccess.c- Extension
.c- Size
- 47035 bytes
- Lines
- 1689
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- 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/vmalloc.hlinux/mm_types.hlinux/err.hlinux/pgtable.hlinux/bitfield.hlinux/kvm_host.hlinux/kvm_types.hasm/diag.hasm/access-regs.hasm/fault.hasm/dat-bits.hkvm-s390.hdat.hgmap.hgaccess.hfaultin.h
Detected Declarations
struct pgtwalkstruct alestruct astestruct acc_page_key_contextstruct cmpxchg_key_contextenum prot_typefunction ipte_lock_heldfunction ipte_lock_simplefunction ipte_unlock_simplefunction ipte_lock_siiffunction ipte_unlock_siiffunction ipte_lockfunction ipte_unlockfunction ar_translationfunction trans_exc_endingfunction trans_excfunction get_vcpu_ascefunction deref_tablefunction guest_translate_gvafunction is_low_addressfunction low_address_protection_enabledfunction vm_check_access_key_gpafunction fetch_prot_override_applicablefunction fetch_prot_override_appliesfunction storage_prot_override_applicablefunction storage_prot_override_appliesfunction vcpu_check_access_key_gpafunction guest_range_to_gpasfunction access_guest_page_gpafunction mvcos_keyfunction _access_guest_page_with_key_gpafunction access_guest_page_with_key_gpafunction access_guest_abs_with_keyfunction access_guest_with_keyfunction access_guest_realfunction __cmpxchg_with_keyfunction _cmpxchg_guest_abs_with_keyfunction cmpxchg_guest_abs_with_keyfunction guest_translate_address_with_keyfunction check_gva_rangefunction check_gpa_rangefunction kvm_s390_check_low_addr_prot_realfunction walk_guest_tablesfunction _do_shadow_ptefunction _do_shadow_crstefunction _gaccess_do_shadowfunction ___gaccess_shadow_faultfunction _gaccess_shadow_fault
Annotated Snippet
struct pgtwalk {
struct guest_fault raw_entries[WALK_N_ENTRIES];
gpa_t last_addr;
int level;
bool p;
};
static inline struct guest_fault *get_entries(struct pgtwalk *w)
{
return w->raw_entries - LEVEL_MEM;
}
/*
* raddress union which will contain the result (real or absolute address)
* after a page table walk. The rfaa, sfaa and pfra members are used to
* simply assign them the value of a region, segment or page table entry.
*/
union raddress {
unsigned long addr;
unsigned long rfaa : 33; /* Region-Frame Absolute Address */
unsigned long sfaa : 44; /* Segment-Frame Absolute Address */
unsigned long pfra : 52; /* Page-Frame Real Address */
};
union alet {
u32 val;
struct {
u32 reserved : 7;
u32 p : 1;
u32 alesn : 8;
u32 alen : 16;
};
};
union ald {
u32 val;
struct {
u32 : 1;
u32 alo : 24;
u32 all : 7;
};
};
struct ale {
unsigned long i : 1; /* ALEN-Invalid Bit */
unsigned long : 5;
unsigned long fo : 1; /* Fetch-Only Bit */
unsigned long p : 1; /* Private Bit */
unsigned long alesn : 8; /* Access-List-Entry Sequence Number */
unsigned long aleax : 16; /* Access-List-Entry Authorization Index */
unsigned long : 32;
unsigned long : 1;
unsigned long asteo : 25; /* ASN-Second-Table-Entry Origin */
unsigned long : 6;
unsigned long astesn : 32; /* ASTE Sequence Number */
};
struct aste {
unsigned long i : 1; /* ASX-Invalid Bit */
unsigned long ato : 29; /* Authority-Table Origin */
unsigned long : 1;
unsigned long b : 1; /* Base-Space Bit */
unsigned long ax : 16; /* Authorization Index */
unsigned long atl : 12; /* Authority-Table Length */
unsigned long : 2;
unsigned long ca : 1; /* Controlled-ASN Bit */
unsigned long ra : 1; /* Reusable-ASN Bit */
unsigned long asce : 64; /* Address-Space-Control Element */
unsigned long ald : 32;
unsigned long astesn : 32;
/* .. more fields there */
};
union oac {
unsigned int val;
struct {
struct {
unsigned short key : 4;
unsigned short : 4;
unsigned short as : 2;
unsigned short : 4;
unsigned short k : 1;
unsigned short a : 1;
} oac1;
struct {
unsigned short key : 4;
unsigned short : 4;
unsigned short as : 2;
unsigned short : 4;
unsigned short k : 1;
Annotation
- Immediate include surface: `linux/vmalloc.h`, `linux/mm_types.h`, `linux/err.h`, `linux/pgtable.h`, `linux/bitfield.h`, `linux/kvm_host.h`, `linux/kvm_types.h`, `asm/diag.h`.
- Detected declarations: `struct pgtwalk`, `struct ale`, `struct aste`, `struct acc_page_key_context`, `struct cmpxchg_key_context`, `enum prot_type`, `function ipte_lock_held`, `function ipte_lock_simple`, `function ipte_unlock_simple`, `function ipte_lock_siif`.
- Atlas domain: Architecture Layer / arch/s390.
- 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.