Skip to content

Commit e0a975e

Browse files
mrathor99liuw
authored andcommitted
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>
1 parent 56c3feb commit e0a975e

1 file changed

Lines changed: 55 additions & 0 deletions

File tree

include/hyperv/hvhdk_mini.h

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,17 @@ enum hv_system_property {
142142
/* Add more values when needed */
143143
HV_SYSTEM_PROPERTY_SCHEDULER_TYPE = 15,
144144
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;
145156
};
146157

147158
enum hv_dynamic_processor_feature_property {
@@ -168,6 +179,8 @@ struct hv_output_get_system_property {
168179
#if IS_ENABLED(CONFIG_X86)
169180
u64 hv_processor_feature_value;
170181
#endif
182+
union hv_pfn_range hv_cda_info; /* CrashdumpAreaAddress */
183+
u64 hv_tramp_pa; /* CrashdumpTrampolineAddress */
171184
};
172185
} __packed;
173186

@@ -267,6 +280,48 @@ union hv_gpa_page_access_state {
267280
u8 as_uint8;
268281
} __packed;
269282

283+
enum hv_crashdump_action {
284+
HV_CRASHDUMP_NONE = 0,
285+
HV_CRASHDUMP_SUSPEND_ALL_VPS,
286+
HV_CRASHDUMP_PREPARE_FOR_STATE_SAVE,
287+
HV_CRASHDUMP_STATE_SAVED,
288+
HV_CRASHDUMP_ENTRY,
289+
};
290+
291+
struct hv_partition_event_root_crashdump_input {
292+
u32 crashdump_action; /* enum hv_crashdump_action */
293+
} __packed;
294+
295+
struct hv_input_disable_hyp_ex { /* HV_X64_INPUT_DISABLE_HYPERVISOR_EX */
296+
u64 rip;
297+
u64 arg;
298+
} __packed;
299+
300+
struct hv_crashdump_area { /* HV_CRASHDUMP_AREA */
301+
u32 version;
302+
union {
303+
u32 flags_as_uint32;
304+
struct {
305+
u32 cda_valid : 1;
306+
u32 cda_unused : 31;
307+
} __packed;
308+
};
309+
/* more unused fields */
310+
} __packed;
311+
312+
union hv_partition_event_input {
313+
struct hv_partition_event_root_crashdump_input crashdump_input;
314+
};
315+
316+
enum hv_partition_event {
317+
HV_PARTITION_EVENT_ROOT_CRASHDUMP = 2,
318+
};
319+
320+
struct hv_input_notify_partition_event {
321+
u32 event; /* enum hv_partition_event */
322+
union hv_partition_event_input input;
323+
} __packed;
324+
270325
struct hv_lp_startup_status {
271326
u64 hv_status;
272327
u64 substatus1;

0 commit comments

Comments
 (0)