arch/powerpc/include/asm/guest-state-buffer.h
Source file repositories/reference/linux-study-clean/arch/powerpc/include/asm/guest-state-buffer.h
File Facts
- System
- Linux kernel
- Corpus path
arch/powerpc/include/asm/guest-state-buffer.h- Extension
.h- Size
- 28783 bytes
- Lines
- 1020
- Domain
- Architecture Layer
- Bucket
- arch/powerpc
- 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/hvcall.hlinux/gfp.hlinux/bitmap.hasm/plpar_wrappers.h
Detected Declarations
struct kvmppc_gs_part_tablestruct kvmppc_gs_proc_tablestruct kvmppc_gs_buff_infostruct kvmppc_gs_headerstruct kvmppc_gs_elemstruct kvmppc_gs_buffstruct kvmppc_gs_bitmapstruct kvmppc_gs_parserstruct kvmppc_gs_msgstruct kvmppc_gs_msg_opsstruct kvmppc_gs_msgfunction kvmppc_gsb_headerfunction kvmppc_gsb_datafunction kvmppc_gsb_lenfunction kvmppc_gsb_capacityfunction kvmppc_gsb_paddressfunction kvmppc_gsb_nelemsfunction kvmppc_gsb_resetfunction kvmppc_gsb_data_lenfunction kvmppc_gsb_data_capfunction kvmppc_gsb_datafunction kvmppc_gse_lenfunction kvmppc_gse_total_lenfunction kvmppc_gse_total_sizefunction kvmppc_gse_datafunction kvmppc_gse_okfunction kvmppc_gse_nextfunction kvmppc_gse_put_be32function kvmppc_gse_put_u32function kvmppc_gse_put_be64function kvmppc_gse_put_u64function __kvmppc_gse_put_regfunction kvmppc_gse_put_vector128function kvmppc_gse_put_part_tablefunction kvmppc_gse_put_proc_tablefunction kvmppc_gse_put_buff_infofunction kvmppc_gse_get_be32function kvmppc_gse_get_u32function kvmppc_gse_get_be64function kvmppc_gse_get_u64function kvmppc_gse_get_vector128function kvmppc_gsbm_zerofunction kvmppc_gsbm_fillfunction kvmppc_gsm_includefunction kvmppc_gsm_includesfunction kvmppc_gsm_include_allfunction kvmppc_gsm_resetfunction kvmppc_gsb_receive_data
Annotated Snippet
struct kvmppc_gs_part_table {
u64 address;
u64 ea_bits;
u64 gpd_size;
};
/**
* struct kvmppc_gs_proc_table - deserialized process table information element
* @address: start of the process table
* @gpd_size: process table size
*/
struct kvmppc_gs_proc_table {
u64 address;
u64 gpd_size;
};
/**
* struct kvmppc_gs_buff_info - deserialized meta guest state buffer information
* @address: start of the guest state buffer
* @size: size of the guest state buffer
*/
struct kvmppc_gs_buff_info {
u64 address;
u64 size;
};
/**
* struct kvmppc_gs_header - serialized guest state buffer header
* @nelem: count of guest state elements in the buffer
* @data: start of the stream of elements in the buffer
*/
struct kvmppc_gs_header {
__be32 nelems;
char data[];
} __packed;
/**
* struct kvmppc_gs_elem - serialized guest state buffer element
* @iden: Guest State ID
* @len: length of data
* @data: the guest state buffer element's value
*/
struct kvmppc_gs_elem {
__be16 iden;
__be16 len;
char data[];
} __packed;
/**
* struct kvmppc_gs_buff - a guest state buffer with metadata.
* @capacity: total length of the buffer
* @len: current length of the elements and header
* @guest_id: guest id associated with the buffer
* @vcpu_id: vcpu_id associated with the buffer
* @hdr: the serialised guest state buffer
*/
struct kvmppc_gs_buff {
size_t capacity;
size_t len;
unsigned long guest_id;
unsigned long vcpu_id;
struct kvmppc_gs_header *hdr;
};
/**
* struct kvmppc_gs_bitmap - a bitmap for element ids
* @bitmap: a bitmap large enough for all Guest State IDs
*/
struct kvmppc_gs_bitmap {
/* private: */
DECLARE_BITMAP(bitmap, KVMPPC_GSE_IDEN_COUNT);
};
/**
* struct kvmppc_gs_parser - a map of element ids to locations in a buffer
* @iterator: bitmap used for iterating
* @gses: contains the pointers to elements
*
* A guest state parser is used for deserialising a guest state buffer.
* Given a buffer, it then allows looking up guest state elements using
* a guest state id.
*/
struct kvmppc_gs_parser {
/* private: */
struct kvmppc_gs_bitmap iterator;
struct kvmppc_gs_elem *gses[KVMPPC_GSE_IDEN_COUNT];
};
enum {
GSM_GUEST_WIDE = 0x1,
Annotation
- Immediate include surface: `asm/hvcall.h`, `linux/gfp.h`, `linux/bitmap.h`, `asm/plpar_wrappers.h`.
- Detected declarations: `struct kvmppc_gs_part_table`, `struct kvmppc_gs_proc_table`, `struct kvmppc_gs_buff_info`, `struct kvmppc_gs_header`, `struct kvmppc_gs_elem`, `struct kvmppc_gs_buff`, `struct kvmppc_gs_bitmap`, `struct kvmppc_gs_parser`, `struct kvmppc_gs_msg`, `struct kvmppc_gs_msg_ops`.
- Atlas domain: Architecture Layer / arch/powerpc.
- 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.