Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

hyperv: Add definitions for hypervisor crash dump support

Add data structures for hypervisor crash dump support to the hypervisor
host ABI header file. Details of their usages are in subsequent commits.

Signed-off-by: Mukesh Rathor <mrathor@linux.microsoft.com>
Signed-off-by: Wei Liu <wei.liu@kernel.org>

authored by

Mukesh Rathor and committed by
Wei Liu
e0a975ec 56c3feb3

+55
+55
include/hyperv/hvhdk_mini.h
··· 142 142 /* Add more values when needed */ 143 143 HV_SYSTEM_PROPERTY_SCHEDULER_TYPE = 15, 144 144 HV_DYNAMIC_PROCESSOR_FEATURE_PROPERTY = 21, 145 + HV_SYSTEM_PROPERTY_CRASHDUMPAREA = 47, 146 + }; 147 + 148 + #define HV_PFN_RANGE_PGBITS 24 /* HV_SPA_PAGE_RANGE_ADDITIONAL_PAGES_BITS */ 149 + union hv_pfn_range { /* HV_SPA_PAGE_RANGE */ 150 + u64 as_uint64; 151 + struct { 152 + /* 39:0: base pfn. 63:40: additional pages */ 153 + u64 base_pfn : 64 - HV_PFN_RANGE_PGBITS; 154 + u64 add_pfns : HV_PFN_RANGE_PGBITS; 155 + } __packed; 145 156 }; 146 157 147 158 enum hv_dynamic_processor_feature_property { ··· 179 168 #if IS_ENABLED(CONFIG_X86) 180 169 u64 hv_processor_feature_value; 181 170 #endif 171 + union hv_pfn_range hv_cda_info; /* CrashdumpAreaAddress */ 172 + u64 hv_tramp_pa; /* CrashdumpTrampolineAddress */ 182 173 }; 183 174 } __packed; 184 175 ··· 278 265 u8 reserved: 6; 279 266 }; 280 267 u8 as_uint8; 268 + } __packed; 269 + 270 + enum hv_crashdump_action { 271 + HV_CRASHDUMP_NONE = 0, 272 + HV_CRASHDUMP_SUSPEND_ALL_VPS, 273 + HV_CRASHDUMP_PREPARE_FOR_STATE_SAVE, 274 + HV_CRASHDUMP_STATE_SAVED, 275 + HV_CRASHDUMP_ENTRY, 276 + }; 277 + 278 + struct hv_partition_event_root_crashdump_input { 279 + u32 crashdump_action; /* enum hv_crashdump_action */ 280 + } __packed; 281 + 282 + struct hv_input_disable_hyp_ex { /* HV_X64_INPUT_DISABLE_HYPERVISOR_EX */ 283 + u64 rip; 284 + u64 arg; 285 + } __packed; 286 + 287 + struct hv_crashdump_area { /* HV_CRASHDUMP_AREA */ 288 + u32 version; 289 + union { 290 + u32 flags_as_uint32; 291 + struct { 292 + u32 cda_valid : 1; 293 + u32 cda_unused : 31; 294 + } __packed; 295 + }; 296 + /* more unused fields */ 297 + } __packed; 298 + 299 + union hv_partition_event_input { 300 + struct hv_partition_event_root_crashdump_input crashdump_input; 301 + }; 302 + 303 + enum hv_partition_event { 304 + HV_PARTITION_EVENT_ROOT_CRASHDUMP = 2, 305 + }; 306 + 307 + struct hv_input_notify_partition_event { 308 + u32 event; /* enum hv_partition_event */ 309 + union hv_partition_event_input input; 281 310 } __packed; 282 311 283 312 struct hv_lp_startup_status {