include/uapi/linux/hyperv.h
Source file repositories/reference/linux-study-clean/include/uapi/linux/hyperv.h
File Facts
- System
- Linux kernel
- Corpus path
include/uapi/linux/hyperv.h- Extension
.h- Size
- 11191 bytes
- Lines
- 412
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/types.h
Detected Declarations
struct hv_vss_hdrstruct hv_vss_check_featurestruct hv_vss_check_dm_infostruct hv_vss_msgstruct hv_fcopy_hdrstruct hv_start_fcopystruct hv_do_fcopystruct hv_kvp_ipaddr_valuestruct hv_kvp_hdrstruct hv_kvp_exchg_msg_valuestruct hv_kvp_msg_enumeratestruct hv_kvp_msg_getstruct hv_kvp_msg_setstruct hv_kvp_msg_deletestruct hv_kvp_registerstruct hv_kvp_msgstruct hv_kvp_ip_msgenum hv_vss_openum hv_fcopy_openum hv_kvp_exchg_openum hv_kvp_exchg_pool
Annotated Snippet
struct hv_vss_hdr {
__u8 operation;
__u8 reserved[7];
} __attribute__((packed));
/*
* Flag values for the hv_vss_check_feature. Linux supports only
* one value.
*/
#define VSS_HBU_NO_AUTO_RECOVERY 0x00000005
struct hv_vss_check_feature {
__u32 flags;
} __attribute__((packed));
struct hv_vss_check_dm_info {
__u32 flags;
} __attribute__((packed));
/*
* struct hv_vss_msg encodes the fields that the Linux VSS
* driver accesses. However, FREEZE messages from Hyper-V contain
* additional LUN information that Linux doesn't use and are not
* represented in struct hv_vss_msg. A received FREEZE message may
* be as large as 6,260 bytes, so the driver must allocate at least
* that much space, not sizeof(struct hv_vss_msg). Other messages
* such as AUTO_RECOVER may be as large as 12,500 bytes. However,
* because the Linux VSS driver responds that it doesn't support
* auto-recovery, it should not receive such messages.
*/
struct hv_vss_msg {
union {
struct hv_vss_hdr vss_hdr;
int error;
};
union {
struct hv_vss_check_feature vss_cf;
struct hv_vss_check_dm_info dm_info;
};
} __attribute__((packed));
/*
* Implementation of a host to guest copy facility.
*/
#define FCOPY_VERSION_0 0
#define FCOPY_VERSION_1 1
#define FCOPY_CURRENT_VERSION FCOPY_VERSION_1
#define W_MAX_PATH 260
enum hv_fcopy_op {
START_FILE_COPY = 0,
WRITE_TO_FILE,
COMPLETE_FCOPY,
CANCEL_FCOPY,
};
struct hv_fcopy_hdr {
__u32 operation;
__u8 service_id0[16]; /* currently unused */
__u8 service_id1[16]; /* currently unused */
} __attribute__((packed));
#define OVER_WRITE 0x1
#define CREATE_PATH 0x2
struct hv_start_fcopy {
struct hv_fcopy_hdr hdr;
__u16 file_name[W_MAX_PATH];
__u16 path_name[W_MAX_PATH];
__u32 copy_flags;
__u64 file_size;
} __attribute__((packed));
/*
* The file is chunked into fragments.
*/
#define DATA_FRAGMENT (6 * 1024)
struct hv_do_fcopy {
struct hv_fcopy_hdr hdr;
__u32 pad;
__u64 offset;
__u32 size;
__u8 data[DATA_FRAGMENT];
} __attribute__((packed));
/*
* An implementation of HyperV key value pair (KVP) functionality for Linux.
Annotation
- Immediate include surface: `linux/types.h`.
- Detected declarations: `struct hv_vss_hdr`, `struct hv_vss_check_feature`, `struct hv_vss_check_dm_info`, `struct hv_vss_msg`, `struct hv_fcopy_hdr`, `struct hv_start_fcopy`, `struct hv_do_fcopy`, `struct hv_kvp_ipaddr_value`, `struct hv_kvp_hdr`, `struct hv_kvp_exchg_msg_value`.
- Atlas domain: Core OS / Core Kernel Interface.
- 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.