arch/powerpc/include/asm/hvcall.h
Source file repositories/reference/linux-study-clean/arch/powerpc/include/asm/hvcall.h
File Facts
- System
- Linux kernel
- Corpus path
arch/powerpc/include/asm/hvcall.h- Extension
.h- Size
- 24837 bytes
- Lines
- 743
- 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
linux/types.h
Detected Declarations
struct hvcall_mpp_datastruct hvcall_mpp_x_datastruct h_cpu_char_resultstruct hv_guest_statestruct hv_get_perf_counter_info_paramsstruct hv_gpci_request_bufferfunction get_longbusy_msecsfunction hv_guest_state_size
Annotated Snippet
struct hvcall_mpp_data {
unsigned long entitled_mem;
unsigned long mapped_mem;
unsigned short group_num;
unsigned short pool_num;
unsigned char mem_weight;
unsigned char unallocated_mem_weight;
unsigned long unallocated_entitlement; /* value in bytes */
unsigned long pool_size;
signed long loan_request;
unsigned long backing_mem;
};
long h_get_mpp(struct hvcall_mpp_data *mpp_data);
struct hvcall_mpp_x_data {
unsigned long coalesced_bytes;
unsigned long pool_coalesced_bytes;
unsigned long pool_purr_cycles;
unsigned long pool_spurr_cycles;
unsigned long reserved[3];
};
int h_get_mpp_x(struct hvcall_mpp_x_data *mpp_x_data);
static inline unsigned int get_longbusy_msecs(int longbusy_rc)
{
switch (longbusy_rc) {
case H_LONG_BUSY_ORDER_1_MSEC:
return 1;
case H_LONG_BUSY_ORDER_10_MSEC:
return 10;
case H_LONG_BUSY_ORDER_100_MSEC:
return 100;
case H_LONG_BUSY_ORDER_1_SEC:
return 1000;
case H_LONG_BUSY_ORDER_10_SEC:
return 10000;
case H_LONG_BUSY_ORDER_100_SEC:
return 100000;
default:
return 1;
}
}
struct h_cpu_char_result {
u64 character;
u64 behaviour;
};
/*
* Register state for entering a nested guest with H_ENTER_NESTED.
* New member must be added at the end.
*/
struct hv_guest_state {
u64 version; /* version of this structure layout, must be first */
u32 lpid;
u32 vcpu_token;
/* These registers are hypervisor privileged (at least for writing) */
u64 lpcr;
u64 pcr;
u64 amor;
u64 dpdes;
u64 hfscr;
s64 tb_offset;
u64 dawr0;
u64 dawrx0;
u64 ciabr;
u64 hdec_expiry;
u64 purr;
u64 spurr;
u64 ic;
u64 vtb;
u64 hdar;
u64 hdsisr;
u64 heir;
u64 asdr;
/* These are OS privileged but need to be set late in guest entry */
u64 srr0;
u64 srr1;
u64 sprg[4];
u64 pidr;
u64 cfar;
u64 ppr;
/* Version 1 ends here */
u64 dawr1;
u64 dawrx1;
/* Version 2 ends here */
};
Annotation
- Immediate include surface: `linux/types.h`.
- Detected declarations: `struct hvcall_mpp_data`, `struct hvcall_mpp_x_data`, `struct h_cpu_char_result`, `struct hv_guest_state`, `struct hv_get_perf_counter_info_params`, `struct hv_gpci_request_buffer`, `function get_longbusy_msecs`, `function hv_guest_state_size`.
- 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.