include/asm-generic/mshyperv.h
Source file repositories/reference/linux-study-clean/include/asm-generic/mshyperv.h
File Facts
- System
- Linux kernel
- Corpus path
include/asm-generic/mshyperv.h- Extension
.h- Size
- 11814 bytes
- Lines
- 397
- Domain
- Repository Root And Misc
- Bucket
- include
- Inferred role
- Repository Root And Misc: implementation source
- Status
- source implementation candidate
Why This File Exists
Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/types.hlinux/atomic.hlinux/bitops.hacpi/acpi_numa.hlinux/cpumask.hlinux/nmi.hasm/ptrace.hhyperv/hvhdk.h
Detected Declarations
struct ms_hyperv_infoenum hv_partition_typefunction hv_recommend_using_aeoifunction hv_numa_node_to_pxm_infofunction hv_resultfunction hv_result_successfunction hv_repcompfunction hv_do_rep_hypercall_exfunction hv_do_rep_hypercallfunction hv_generate_guest_idfunction hv_cpu_number_to_vp_numberfunction __cpumask_to_vpsetfunction cpumask_to_vpsetfunction cpumask_to_vpset_skipfunction hv_identify_partition_typefunction hv_is_hibernation_supportedfunction hyperv_cleanupfunction hv_get_isolation_typefunction hv_root_partitionfunction hv_l1vh_partitionfunction hv_parent_partitionfunction hv_root_partitionfunction hv_l1vh_partitionfunction hv_parent_partitionfunction hv_result_needs_memoryfunction hv_deposit_memory_nodefunction hv_call_deposit_pagesfunction hv_call_add_logical_procfunction hv_call_notify_all_processors_startedfunction hv_lp_existsfunction hv_call_create_vpfunction hv_deposit_memoryfunction get_vtl
Annotated Snippet
struct ms_hyperv_info {
u32 features;
u32 priv_high;
u32 ext_features;
u32 misc_features;
u32 hints;
u32 nested_features;
u32 max_vp_index;
u32 max_lp_index;
u8 vtl;
union {
u32 isolation_config_a;
struct {
u32 paravisor_present : 1;
u32 reserved_a1 : 31;
};
};
union {
u32 isolation_config_b;
struct {
u32 cvm_type : 4;
u32 reserved_b1 : 1;
u32 shared_gpa_boundary_active : 1;
u32 shared_gpa_boundary_bits : 6;
u32 reserved_b2 : 20;
};
};
u64 shared_gpa_boundary;
bool msi_ext_dest_id;
bool confidential_vmbus_available;
};
extern struct ms_hyperv_info ms_hyperv;
extern bool hv_nested;
extern u64 hv_current_partition_id;
extern enum hv_partition_type hv_curr_partition_type;
extern void * __percpu *hyperv_pcpu_input_arg;
extern void * __percpu *hyperv_pcpu_output_arg;
u64 hv_do_hypercall(u64 control, void *inputaddr, void *outputaddr);
u64 hv_do_fast_hypercall8(u16 control, u64 input8);
u64 hv_do_fast_hypercall16(u16 control, u64 input1, u64 input2);
bool hv_isolation_type_snp(void);
bool hv_isolation_type_tdx(void);
/*
* On architectures where Hyper-V doesn't support AEOI (e.g., ARM64),
* it doesn't provide a recommendation flag and AEOI must be disabled.
*/
static inline bool hv_recommend_using_aeoi(void)
{
#ifdef HV_DEPRECATING_AEOI_RECOMMENDED
return !(ms_hyperv.hints & HV_DEPRECATING_AEOI_RECOMMENDED);
#else
return false;
#endif
}
static inline struct hv_proximity_domain_info hv_numa_node_to_pxm_info(int node)
{
struct hv_proximity_domain_info pxm_info = {};
if (node != NUMA_NO_NODE) {
pxm_info.domain_id = node_to_pxm(node);
pxm_info.flags.proximity_info_valid = 1;
pxm_info.flags.proximity_preferred = 1;
}
return pxm_info;
}
/* Helper functions that provide a consistent pattern for checking Hyper-V hypercall status. */
static inline int hv_result(u64 status)
{
return status & HV_HYPERCALL_RESULT_MASK;
}
static inline bool hv_result_success(u64 status)
{
return hv_result(status) == HV_STATUS_SUCCESS;
}
static inline unsigned int hv_repcomp(u64 status)
{
/* Bits [43:32] of status have 'Reps completed' data. */
return (status & HV_HYPERCALL_REP_COMP_MASK) >>
HV_HYPERCALL_REP_COMP_OFFSET;
}
Annotation
- Immediate include surface: `linux/types.h`, `linux/atomic.h`, `linux/bitops.h`, `acpi/acpi_numa.h`, `linux/cpumask.h`, `linux/nmi.h`, `asm/ptrace.h`, `hyperv/hvhdk.h`.
- Detected declarations: `struct ms_hyperv_info`, `enum hv_partition_type`, `function hv_recommend_using_aeoi`, `function hv_numa_node_to_pxm_info`, `function hv_result`, `function hv_result_success`, `function hv_repcomp`, `function hv_do_rep_hypercall_ex`, `function hv_do_rep_hypercall`, `function hv_generate_guest_id`.
- Atlas domain: Repository Root And Misc / include.
- 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.