From nobody Thu Oct 2 03:17:47 2025 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9966330E0FB; Tue, 23 Sep 2025 21:46:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=13.77.154.182 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758663984; cv=none; b=vF50ex59SxcRGyiEajjdwLO6QlhdH5ycNiFslYrxDXVdJvlAilaQNS7WlMpwOBzLaTskL9gzsupM8N9OCQC0RtAnlqVf94Nhd4qTm9SfmkTq/5rEjOhphdM24+r30N8/DuHcnIkZWSOPc2jd928BmB5kSsQDD9FWPP0LY2Q6hZ0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758663984; c=relaxed/simple; bh=5eTrATxYIcI4LN1XzvmKQCvDUsrtvj7AMDGTNpshG/s=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=UgnpmMZH28RAPsoFh9F2uKQAiOYGmhDp+Wxba/+mWcNKjIRxDtpKXgY44Njwl8If25byJBSKDD+PdIbE6f8EqsplDXCKrxSlKJo3Igdwhh+4bs8s/VOLWJ0PSbsDqDWHStsJj8zbGKl8VbYZrDaNYXXX6ZFLEoYFBl7iJpTbM2k= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com; spf=pass smtp.mailfrom=linux.microsoft.com; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b=Icotb8UE; arc=none smtp.client-ip=13.77.154.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.microsoft.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b="Icotb8UE" Received: from mrdev.corp.microsoft.com (192-184-212-33.fiber.dynamic.sonic.net [192.184.212.33]) by linux.microsoft.com (Postfix) with ESMTPSA id 8DB1D20171D9; Tue, 23 Sep 2025 14:46:21 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 8DB1D20171D9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1758663982; bh=Ch6yGympBY4h67vBABULtNBpmjBx7+W0FhU+25BVoSs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Icotb8UE7uHYwbJYf/tsqFG1oF+bCYZm8Uxvxhj4xGueA8EPSzooc5C1OBBTC/zHv IKzY+/9Bv6o8HlrewFfo03Skw8dcZ4bznYchjQi8360NuqUuf6CPelKDMydVkfhOit o2cDQAjaJcUkgO5g8aXtFwhizCkCGOmOX6Mn3i5A= From: Mukesh Rathor To: linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org Cc: kys@microsoft.com, haiyangz@microsoft.com, wei.liu@kernel.org, decui@microsoft.com, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, arnd@arndb.de Subject: [PATCH v2 3/6] hyperv: Add definitions for hypervisor crash dump support Date: Tue, 23 Sep 2025 14:46:06 -0700 Message-Id: <20250923214609.4101554-4-mrathor@linux.microsoft.com> X-Mailer: git-send-email 2.36.1.vfs.0.0 In-Reply-To: <20250923214609.4101554-1-mrathor@linux.microsoft.com> References: <20250923214609.4101554-1-mrathor@linux.microsoft.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 --- include/hyperv/hvhdk_mini.h | 55 +++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/include/hyperv/hvhdk_mini.h b/include/hyperv/hvhdk_mini.h index 858f6a3925b3..ad9a8048fb4e 100644 --- a/include/hyperv/hvhdk_mini.h +++ b/include/hyperv/hvhdk_mini.h @@ -116,6 +116,17 @@ enum hv_system_property { /* Add more values when needed */ HV_SYSTEM_PROPERTY_SCHEDULER_TYPE =3D 15, HV_DYNAMIC_PROCESSOR_FEATURE_PROPERTY =3D 21, + HV_SYSTEM_PROPERTY_CRASHDUMPAREA =3D 47, +}; + +#define HV_PFN_RANGE_PGBITS 24 /* HV_SPA_PAGE_RANGE_ADDITIONAL_PAGES_BITS= */ +union hv_pfn_range { /* HV_SPA_PAGE_RANGE */ + u64 as_uint64; + struct { + /* 39:0: base pfn. 63:40: additional pages */ + u64 base_pfn : 64 - HV_PFN_RANGE_PGBITS; + u64 add_pfns : HV_PFN_RANGE_PGBITS; + } __packed; }; =20 enum hv_dynamic_processor_feature_property { @@ -142,6 +153,8 @@ struct hv_output_get_system_property { #if IS_ENABLED(CONFIG_X86) u64 hv_processor_feature_value; #endif + union hv_pfn_range hv_cda_info; /* CrashdumpAreaAddress */ + u64 hv_tramp_pa; /* CrashdumpTrampolineAddress */ }; } __packed; =20 @@ -234,6 +247,48 @@ union hv_gpa_page_access_state { u8 as_uint8; } __packed; =20 +enum hv_crashdump_action { + HV_CRASHDUMP_NONE =3D 0, + HV_CRASHDUMP_SUSPEND_ALL_VPS, + HV_CRASHDUMP_PREPARE_FOR_STATE_SAVE, + HV_CRASHDUMP_STATE_SAVED, + HV_CRASHDUMP_ENTRY, +}; + +struct hv_partition_event_root_crashdump_input { + u32 crashdump_action; /* enum hv_crashdump_action */ +} __packed; + +struct hv_input_disable_hyp_ex { /* HV_X64_INPUT_DISABLE_HYPERVISOR_EX */ + u64 rip; + u64 arg; +} __packed; + +struct hv_crashdump_area { /* HV_CRASHDUMP_AREA */ + u32 version; + union { + u32 flags_as_uint32; + struct { + u32 cda_valid : 1; + u32 cda_unused : 31; + } __packed; + }; + /* more unused fields */ +} __packed; + +union hv_partition_event_input { + struct hv_partition_event_root_crashdump_input crashdump_input; +}; + +enum hv_partition_event { + HV_PARTITION_EVENT_ROOT_CRASHDUMP =3D 2, +}; + +struct hv_input_notify_partition_event { + u32 event; /* enum hv_partition_event */ + union hv_partition_event_input input; +} __packed; + struct hv_lp_startup_status { u64 hv_status; u64 substatus1; --=20 2.36.1.vfs.0.0