From nobody Thu Dec 18 01:28:36 2025 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8F564212568; Mon, 6 Oct 2025 22:42:17 +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=1759790539; cv=none; b=BE+Nxm87zTsknme9iP7tHJ72+nBZDsp01DJp7WQOWddtpFv014SGPwowj/QIJJIjIR1e9SV5xjc8ynrZ98xcV4sksRdaRmEGObWFUyEKGTfCeO0VbYwoYI2AmFmWGALQx1qhTatleWee5eWtAc0OAabG8vvFFdlwDr4bw2GHL18= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759790539; c=relaxed/simple; bh=5eTrATxYIcI4LN1XzvmKQCvDUsrtvj7AMDGTNpshG/s=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=OvyIirgtbpPIXhNAxsWcNH0ifdFGi+g9xVmi+cUwfuEMcVL5H+pn27vsZyRe085Fg+3NAAD+iL4NPp3+QnYl/u+Zeh6cNLTi5OvRFXxcAm1/pj765jtQ5g2jKxutNMcfeocxGioEQ+Nx33mZjrbn5xqgf3rzcpX3+xUTLxhHmXo= 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=enB8gTWD; 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="enB8gTWD" 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 85D64211CDF9; Mon, 6 Oct 2025 15:42:16 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 85D64211CDF9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1759790536; bh=Ch6yGympBY4h67vBABULtNBpmjBx7+W0FhU+25BVoSs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=enB8gTWDKKY4soJXnU1Q3666PcOxIVIGPlJUg8sISjP52g82TqhUOlxfgwJKKDB8P ihpeZrSyC4Dl8dYgUHjH3P07e8PMoMopd4azQLKMrg9dNuk7K6eonlqqcDdW6lyCF1 DJAUGFyZ8f+YVCW82JUwSGHDAzKrf5Rn0pDakbzA= 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 v3 3/6] hyperv: Add definitions for hypervisor crash dump support Date: Mon, 6 Oct 2025 15:42:05 -0700 Message-Id: <20251006224208.1060990-4-mrathor@linux.microsoft.com> X-Mailer: git-send-email 2.36.1.vfs.0.0 In-Reply-To: <20251006224208.1060990-1-mrathor@linux.microsoft.com> References: <20251006224208.1060990-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