arch/arm64/include/asm/mshyperv.h
Source file repositories/reference/linux-study-clean/arch/arm64/include/asm/mshyperv.h
File Facts
- System
- Linux kernel
- Corpus path
arch/arm64/include/asm/mshyperv.h- Extension
.h- Size
- 1604 bytes
- Lines
- 67
- Domain
- Architecture Layer
- Bucket
- arch/arm64
- 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.hlinux/arm-smccc.hhyperv/hvhdk.hasm-generic/mshyperv.h
Detected Declarations
function hv_set_msrfunction hv_get_msrfunction hv_set_non_nested_msrfunction hv_get_non_nested_msr
Annotated Snippet
#ifndef _ASM_MSHYPERV_H
#define _ASM_MSHYPERV_H
#include <linux/types.h>
#include <linux/arm-smccc.h>
#include <hyperv/hvhdk.h>
/*
* Declare calls to get and set Hyper-V VP register values on ARM64, which
* requires a hypercall.
*/
void hv_set_vpreg(u32 reg, u64 value);
u64 hv_get_vpreg(u32 reg);
void hv_get_vpreg_128(u32 reg, struct hv_get_vp_registers_output *result);
static inline void hv_set_msr(unsigned int reg, u64 value)
{
hv_set_vpreg(reg, value);
}
static inline u64 hv_get_msr(unsigned int reg)
{
return hv_get_vpreg(reg);
}
/*
* Nested is not supported on arm64
*/
static inline void hv_set_non_nested_msr(unsigned int reg, u64 value)
{
hv_set_msr(reg, value);
}
static inline u64 hv_get_non_nested_msr(unsigned int reg)
{
return hv_get_msr(reg);
}
/* SMCCC hypercall parameters */
#define HV_SMCCC_FUNC_NUMBER 1
#define HV_FUNC_ID ARM_SMCCC_CALL_VAL( \
ARM_SMCCC_STD_CALL, \
ARM_SMCCC_SMC_64, \
ARM_SMCCC_OWNER_VENDOR_HYP, \
HV_SMCCC_FUNC_NUMBER)
#include <asm-generic/mshyperv.h>
#endif
Annotation
- Immediate include surface: `linux/types.h`, `linux/arm-smccc.h`, `hyperv/hvhdk.h`, `asm-generic/mshyperv.h`.
- Detected declarations: `function hv_set_msr`, `function hv_get_msr`, `function hv_set_non_nested_msr`, `function hv_get_non_nested_msr`.
- Atlas domain: Architecture Layer / arch/arm64.
- 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.