arch/powerpc/platforms/pseries/vas.h
Source file repositories/reference/linux-study-clean/arch/powerpc/platforms/pseries/vas.h
File Facts
- System
- Linux kernel
- Corpus path
arch/powerpc/platforms/pseries/vas.h- Extension
.h- Size
- 4309 bytes
- Lines
- 158
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
asm/vas.hlinux/mutex.hlinux/stringify.h
Detected Declarations
struct hv_vas_cop_feat_capsstruct vas_cop_feat_capsstruct vas_capsstruct hv_vas_win_lparstruct pseries_vas_windowenum vas_migrate_actionenum vas_cop_feat_typefunction vas_migration_handlerfunction pseries_vas_dlpar_cpu
Annotated Snippet
struct hv_vas_cop_feat_caps {
__be64 descriptor;
u8 win_type; /* Default or QoS type */
u8 user_mode;
__be16 max_lpar_creds;
__be16 max_win_creds;
union {
__be16 reserved;
__be16 def_lpar_creds; /* Used for default capabilities */
};
__be16 target_lpar_creds;
} __packed __aligned(0x1000);
/*
* Feature specific (QoS or default) capabilities.
*/
struct vas_cop_feat_caps {
u64 descriptor;
u8 win_type; /* Default or QoS type */
u8 user_mode; /* User mode copy/paste or COP HCALL */
u16 max_lpar_creds; /* Max credits available in LPAR */
/* Max credits can be assigned per window */
u16 max_win_creds;
union {
u16 reserved; /* Used for QoS credit type */
u16 def_lpar_creds; /* Used for default credit type */
};
/* Total LPAR available credits. Can be different from max LPAR */
/* credits due to DLPAR operation */
atomic_t nr_total_credits; /* Total credits assigned to LPAR */
atomic_t nr_used_credits; /* Used credits so far */
};
/*
* Feature (QoS or Default) specific to store capabilities and
* the list of open windows.
*/
struct vas_caps {
struct vas_cop_feat_caps caps;
struct list_head list; /* List of open windows */
int nr_open_wins_progress; /* Number of open windows in */
/* progress. Used in migration */
int nr_close_wins; /* closed windows in the hypervisor for DLPAR */
int nr_open_windows; /* Number of successful open windows */
u8 feat; /* Feature type */
};
/*
* To get window information from the hypervisor.
*/
struct hv_vas_win_lpar {
__be16 version;
u8 win_type;
u8 status;
__be16 credits; /* No of credits assigned to this window */
__be16 reserved;
__be32 pid; /* LPAR Process ID */
__be32 tid; /* LPAR Thread ID */
__be64 win_addr; /* Paste address */
__be32 interrupt; /* Interrupt when NX request completes */
__be32 fault; /* Interrupt when NX sees fault */
/* Associativity Domain Identifiers as returned in */
/* H_HOME_NODE_ASSOCIATIVITY */
__be64 domain[6];
__be64 win_util; /* Number of bytes processed */
} __packed __aligned(0x1000);
struct pseries_vas_window {
struct vas_window vas_win;
u64 win_addr; /* Physical paste address */
u8 win_type; /* QoS or Default window */
u32 complete_irq; /* Completion interrupt */
u32 fault_irq; /* Fault interrupt */
u64 domain[6]; /* Associativity domain Ids */
/* this window is allocated */
u64 util;
u32 pid; /* PID associated with this window */
/* List of windows opened which is used for LPM */
struct list_head win_list;
u64 flags;
char *name;
int fault_virq;
atomic_t pending_faults; /* Number of pending faults */
};
int sysfs_add_vas_caps(struct vas_cop_feat_caps *caps);
int vas_reconfig_capabilties(u8 type, int new_nr_creds);
int __init sysfs_pseries_vas_init(struct vas_all_caps *vas_caps);
Annotation
- Immediate include surface: `asm/vas.h`, `linux/mutex.h`, `linux/stringify.h`.
- Detected declarations: `struct hv_vas_cop_feat_caps`, `struct vas_cop_feat_caps`, `struct vas_caps`, `struct hv_vas_win_lpar`, `struct pseries_vas_window`, `enum vas_migrate_action`, `enum vas_cop_feat_type`, `function vas_migration_handler`, `function pseries_vas_dlpar_cpu`.
- Atlas domain: Architecture Layer / arch/powerpc.
- 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.