From nobody Mon Nov 25 08:22:26 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=t-8ch.de ARC-Seal: i=1; a=rsa-sha256; t=1716791344; cv=none; d=zohomail.com; s=zohoarc; b=hsPYrJrLzC9OaVKMZxnUYP8zxlUsepfszSF5zS5SXZyJK1Yo94Eag/PGbVncmTmprODnTe+/o7hfODIq3b8jGdEAW2symgPHzHJe5O3xQN2q7Gl4G8BP++c+wgc80u+FSCGbsU9RNB5xnqYrEx5KJvaH1alz2Eoec4GmXYFFGng= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1716791344; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=TUup4p1+IlYeS/Ly72ki1m575WM0zX6IdfBYJy2/leg=; b=cafuwTPpnXUvAMvidETXKkrbxI4PxxdIjgMAsxeCDwUVno/PxV/I9mlbw/8iUfOTtP6Qc3LZPgqSGc9NJeiyJUijKnSkJUsURaDLkxWSlgc4tT2T38rUlUqrHbY2sE81AcWcK//Z4dq1eWC/fToiO5hL24HANg7P5giWgKP8ppU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1716791344620892.7686124226917; Sun, 26 May 2024 23:29:04 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sBTql-0002Rs-S8; Mon, 27 May 2024 02:28:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sBTq8-0002EW-Ef for qemu-devel@nongnu.org; Mon, 27 May 2024 02:28:13 -0400 Received: from todd.t-8ch.de ([159.69.126.157]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sBTq3-0004om-LH for qemu-devel@nongnu.org; Mon, 27 May 2024 02:28:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=t-8ch.de; s=mail; t=1716791283; bh=LCuCBVisjMtTqjVLtKRdy56NTXB6OpLxRb1j5TqsU20=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=i9NB8nFGvu1t/qj8cfAPCP8jwNU8ud1dgFfZn9VKFRDlfzeH52KXVLad9bQyLMRPy 4CS9ju7MtJotEXfHVMoPznDXzES3ooVJG64EqpR3Clv+efnp1iEdNoFoG9U6JzCe0X Sv1G0JWvBkhxjmgtz+1+wyyXxKQR+CtwNq1dwrys= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Mon, 27 May 2024 08:27:47 +0200 Subject: [PATCH v8 1/8] scripts/update-linux-headers: Copy setup_data.h to correct directory MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20240527-pvpanic-shutdown-v8-1-5a28ec02558b@t-8ch.de> References: <20240527-pvpanic-shutdown-v8-0-5a28ec02558b@t-8ch.de> In-Reply-To: <20240527-pvpanic-shutdown-v8-0-5a28ec02558b@t-8ch.de> To: "Michael S. Tsirkin" , Cornelia Huck , Paolo Bonzini , Thomas Huth , Laurent Vivier , Eric Blake , Markus Armbruster Cc: qemu-devel@nongnu.org, Alejandro Jimenez , kvm@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1716791282; l=1024; i=thomas@t-8ch.de; s=20221212; h=from:subject:message-id; bh=LCuCBVisjMtTqjVLtKRdy56NTXB6OpLxRb1j5TqsU20=; b=OdQl15KmpX81cnFP+IPHUwVyZuZHQE1/NtJO8jL8BTFnRZoDIM3i2DylGf/OEEFsnFYesCpcJ QyGS3cml51DDatO+XB9V5yHzBrbhnhDsxvmzjb3OWX55152ByYIDeui X-Developer-Key: i=thomas@t-8ch.de; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=159.69.126.157; envelope-from=thomas@t-8ch.de; helo=todd.t-8ch.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @t-8ch.de) X-ZM-MESSAGEID: 1716791346488100001 Add the missing "include/" path component, so the files ends up in the correct place like the other headers. Fixes: 66210a1a30f2 ("scripts/update-linux-headers: Add setup_data.h to imp= ort list") Signed-off-by: Thomas Wei=C3=9Fschuh Reviewed-by: Thomas Huth --- scripts/update-linux-headers.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/update-linux-headers.sh b/scripts/update-linux-headers= .sh index 8963c391895f..a148793bd569 100755 --- a/scripts/update-linux-headers.sh +++ b/scripts/update-linux-headers.sh @@ -158,7 +158,7 @@ for arch in $ARCHLIST; do cp_portable "$hdrdir/bootparam.h" \ "$output/include/standard-headers/asm-$arch" cp_portable "$hdrdir/include/asm/setup_data.h" \ - "$output/standard-headers/asm-x86" + "$output/include/standard-headers/asm-x86" fi if [ $arch =3D riscv ]; then cp "$hdrdir/include/asm/ptrace.h" "$output/linux-headers/asm-riscv= /" --=20 2.45.1 From nobody Mon Nov 25 08:22:26 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=t-8ch.de ARC-Seal: i=1; a=rsa-sha256; t=1716791329; cv=none; d=zohomail.com; s=zohoarc; b=jRrsMf1Y/l17RPDITmwg7ewqyKCVGfalbfa2A5HPvl4q8xVRw9wMrucezf9IxkxcId21qmbNB5L8gQodkGv1DUXU40q7xpuNkGmgTMFo2Sge2WIHEacz6ygvOfAwm4l9cp45iYh+94IrJxyxjt2O3lSTHZp/Nv3oAwFIgFKwXaQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1716791329; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=+uIURDg44rJTatjUx4yhtjiE54Bx3wLFG1YnWTPZhag=; b=CCUW6M+1umu+EBCKgHuBGAPG5jPT1FtPe1D6XVxeLhVH/xJ/CcMnQlfGd5FNMcp7r6UuU4z9A92PRkfJ8CCupQ/eGrvzPQwLz5aoZ46OXIvt8QpCte46kEiUbLe2qa+sCHTLNHl0q6A5RPzDq1Ar3/szTua6wAYB4KOSLRU/kho= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 171679132917119.223872258179995; Sun, 26 May 2024 23:28:49 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sBTqS-0002M1-Oa; Mon, 27 May 2024 02:28:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sBTq8-0002EV-Ef for qemu-devel@nongnu.org; Mon, 27 May 2024 02:28:13 -0400 Received: from todd.t-8ch.de ([159.69.126.157]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sBTq3-0004ow-LC for qemu-devel@nongnu.org; Mon, 27 May 2024 02:28:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=t-8ch.de; s=mail; t=1716791283; bh=GXpJTrI/SnbZtYPTn5MjQyrieM+btFWCYfzeiZ/JpXY=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=FTWOe9ZWgUa4BNQbwvoOT2i3A0Zt8AIldcxkE5/gMbB5PGUMSqhtar/210vj8iRvY b/OeOP1XS7pKP5DMLSdhl93e90tBahYCNi+A5qDQrCaSMa7L9zrLpBOrENIopmT69f 4OCWwGUv5HreFkAmfALnaEg+79odnuNfebhoi4C0= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Mon, 27 May 2024 08:27:48 +0200 Subject: [PATCH v8 2/8] linux-headers: update to 6.10-rc1 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20240527-pvpanic-shutdown-v8-2-5a28ec02558b@t-8ch.de> References: <20240527-pvpanic-shutdown-v8-0-5a28ec02558b@t-8ch.de> In-Reply-To: <20240527-pvpanic-shutdown-v8-0-5a28ec02558b@t-8ch.de> To: "Michael S. Tsirkin" , Cornelia Huck , Paolo Bonzini , Thomas Huth , Laurent Vivier , Eric Blake , Markus Armbruster Cc: qemu-devel@nongnu.org, Alejandro Jimenez , kvm@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1716791282; l=20868; i=thomas@t-8ch.de; s=20221212; h=from:subject:message-id; bh=GXpJTrI/SnbZtYPTn5MjQyrieM+btFWCYfzeiZ/JpXY=; b=0gRU4qzEeZELFHw4LUUh00p77Rigdvv83010JxJ0eYHrACu/2CLihlVT2h/FhIo1SmC1UUSM6 y+zaQU1086OAEpje1oStgRA0XgGrUEJX0QMsW8kC3D/8WgwkXWJa7jx X-Developer-Key: i=thomas@t-8ch.de; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=159.69.126.157; envelope-from=thomas@t-8ch.de; helo=todd.t-8ch.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @t-8ch.de) X-ZM-MESSAGEID: 1716791330573100001 Signed-off-by: Thomas Wei=C3=9Fschuh --- include/standard-headers/linux/ethtool.h | 55 +++++++++++ include/standard-headers/linux/pci_regs.h | 6 ++ include/standard-headers/linux/pvpanic.h | 7 +- include/standard-headers/linux/virtio_bt.h | 1 - include/standard-headers/linux/virtio_mem.h | 2 + include/standard-headers/linux/virtio_net.h | 143 ++++++++++++++++++++++++= ++++ linux-headers/asm-generic/unistd.h | 5 +- linux-headers/asm-loongarch/kvm.h | 4 + linux-headers/asm-mips/unistd_n32.h | 1 + linux-headers/asm-mips/unistd_n64.h | 1 + linux-headers/asm-mips/unistd_o32.h | 1 + linux-headers/asm-powerpc/unistd_32.h | 1 + linux-headers/asm-powerpc/unistd_64.h | 1 + linux-headers/asm-riscv/kvm.h | 1 + linux-headers/asm-s390/unistd_32.h | 1 + linux-headers/asm-s390/unistd_64.h | 1 + linux-headers/asm-x86/kvm.h | 4 +- linux-headers/asm-x86/unistd_32.h | 1 + linux-headers/asm-x86/unistd_64.h | 1 + linux-headers/asm-x86/unistd_x32.h | 2 + linux-headers/linux/kvm.h | 4 +- linux-headers/linux/stddef.h | 8 ++ linux-headers/linux/vhost.h | 15 +-- 23 files changed, 252 insertions(+), 14 deletions(-) diff --git a/include/standard-headers/linux/ethtool.h b/include/standard-he= aders/linux/ethtool.h index 01503784d26f..b0b4b68410f1 100644 --- a/include/standard-headers/linux/ethtool.h +++ b/include/standard-headers/linux/ethtool.h @@ -752,6 +752,61 @@ enum ethtool_module_power_mode { ETHTOOL_MODULE_POWER_MODE_HIGH, }; =20 +/** + * enum ethtool_pse_types - Types of PSE controller. + * @ETHTOOL_PSE_UNKNOWN: Type of PSE controller is unknown + * @ETHTOOL_PSE_PODL: PSE controller which support PoDL + * @ETHTOOL_PSE_C33: PSE controller which support Clause 33 (PoE) + */ +enum ethtool_pse_types { + ETHTOOL_PSE_UNKNOWN =3D 1 << 0, + ETHTOOL_PSE_PODL =3D 1 << 1, + ETHTOOL_PSE_C33 =3D 1 << 2, +}; + +/** + * enum ethtool_c33_pse_admin_state - operational state of the PoDL PSE + * functions. IEEE 802.3-2022 30.9.1.1.2 aPSEAdminState + * @ETHTOOL_C33_PSE_ADMIN_STATE_UNKNOWN: state of PSE functions is unknown + * @ETHTOOL_C33_PSE_ADMIN_STATE_DISABLED: PSE functions are disabled + * @ETHTOOL_C33_PSE_ADMIN_STATE_ENABLED: PSE functions are enabled + */ +enum ethtool_c33_pse_admin_state { + ETHTOOL_C33_PSE_ADMIN_STATE_UNKNOWN =3D 1, + ETHTOOL_C33_PSE_ADMIN_STATE_DISABLED, + ETHTOOL_C33_PSE_ADMIN_STATE_ENABLED, +}; + +/** + * enum ethtool_c33_pse_pw_d_status - power detection status of the PSE. + * IEEE 802.3-2022 30.9.1.1.3 aPoDLPSEPowerDetectionStatus: + * @ETHTOOL_C33_PSE_PW_D_STATUS_UNKNOWN: PSE status is unknown + * @ETHTOOL_C33_PSE_PW_D_STATUS_DISABLED: The enumeration "disabled" + * indicates that the PSE State diagram is in the state DISABLED. + * @ETHTOOL_C33_PSE_PW_D_STATUS_SEARCHING: The enumeration "searching" + * indicates the PSE State diagram is in a state other than those + * listed. + * @ETHTOOL_C33_PSE_PW_D_STATUS_DELIVERING: The enumeration + * "deliveringPower" indicates that the PSE State diagram is in the + * state POWER_ON. + * @ETHTOOL_C33_PSE_PW_D_STATUS_TEST: The enumeration "test" indicates that + * the PSE State diagram is in the state TEST_MODE. + * @ETHTOOL_C33_PSE_PW_D_STATUS_FAULT: The enumeration "fault" indicates t= hat + * the PSE State diagram is in the state TEST_ERROR. + * @ETHTOOL_C33_PSE_PW_D_STATUS_OTHERFAULT: The enumeration "otherFault" + * indicates that the PSE State diagram is in the state IDLE due to + * the variable error_condition =3D true. + */ +enum ethtool_c33_pse_pw_d_status { + ETHTOOL_C33_PSE_PW_D_STATUS_UNKNOWN =3D 1, + ETHTOOL_C33_PSE_PW_D_STATUS_DISABLED, + ETHTOOL_C33_PSE_PW_D_STATUS_SEARCHING, + ETHTOOL_C33_PSE_PW_D_STATUS_DELIVERING, + ETHTOOL_C33_PSE_PW_D_STATUS_TEST, + ETHTOOL_C33_PSE_PW_D_STATUS_FAULT, + ETHTOOL_C33_PSE_PW_D_STATUS_OTHERFAULT, +}; + /** * enum ethtool_podl_pse_admin_state - operational state of the PoDL PSE * functions. IEEE 802.3-2018 30.15.1.1.2 aPoDLPSEAdminState diff --git a/include/standard-headers/linux/pci_regs.h b/include/standard-h= eaders/linux/pci_regs.h index a39193213ff2..94c00996e633 100644 --- a/include/standard-headers/linux/pci_regs.h +++ b/include/standard-headers/linux/pci_regs.h @@ -1144,8 +1144,14 @@ #define PCI_DOE_DATA_OBJECT_HEADER_2_LENGTH 0x0003ffff =20 #define PCI_DOE_DATA_OBJECT_DISC_REQ_3_INDEX 0x000000ff +#define PCI_DOE_DATA_OBJECT_DISC_REQ_3_VER 0x0000ff00 #define PCI_DOE_DATA_OBJECT_DISC_RSP_3_VID 0x0000ffff #define PCI_DOE_DATA_OBJECT_DISC_RSP_3_PROTOCOL 0x00ff0000 #define PCI_DOE_DATA_OBJECT_DISC_RSP_3_NEXT_INDEX 0xff000000 =20 +/* Compute Express Link (CXL r3.1, sec 8.1.5) */ +#define PCI_DVSEC_CXL_PORT 3 +#define PCI_DVSEC_CXL_PORT_CTL 0x0c +#define PCI_DVSEC_CXL_PORT_CTL_UNMASK_SBR 0x00000001 + #endif /* LINUX_PCI_REGS_H */ diff --git a/include/standard-headers/linux/pvpanic.h b/include/standard-he= aders/linux/pvpanic.h index 54b7485390d3..b1150944316f 100644 --- a/include/standard-headers/linux/pvpanic.h +++ b/include/standard-headers/linux/pvpanic.h @@ -3,7 +3,10 @@ #ifndef __PVPANIC_H__ #define __PVPANIC_H__ =20 -#define PVPANIC_PANICKED (1 << 0) -#define PVPANIC_CRASH_LOADED (1 << 1) +#include "standard-headers/linux/const.h" + +#define PVPANIC_PANICKED _BITUL(0) +#define PVPANIC_CRASH_LOADED _BITUL(1) +#define PVPANIC_SHUTDOWN _BITUL(2) =20 #endif /* __PVPANIC_H__ */ diff --git a/include/standard-headers/linux/virtio_bt.h b/include/standard-= headers/linux/virtio_bt.h index a11ecc3f92df..6f0dee7e326a 100644 --- a/include/standard-headers/linux/virtio_bt.h +++ b/include/standard-headers/linux/virtio_bt.h @@ -13,7 +13,6 @@ =20 enum virtio_bt_config_type { VIRTIO_BT_CONFIG_TYPE_PRIMARY =3D 0, - VIRTIO_BT_CONFIG_TYPE_AMP =3D 1, }; =20 enum virtio_bt_config_vendor { diff --git a/include/standard-headers/linux/virtio_mem.h b/include/standard= -headers/linux/virtio_mem.h index 18c74c527c8a..6bfa41bd8b6e 100644 --- a/include/standard-headers/linux/virtio_mem.h +++ b/include/standard-headers/linux/virtio_mem.h @@ -90,6 +90,8 @@ #define VIRTIO_MEM_F_ACPI_PXM 0 /* unplugged memory must not be accessed */ #define VIRTIO_MEM_F_UNPLUGGED_INACCESSIBLE 1 +/* plugged memory will remain plugged when suspending+resuming */ +#define VIRTIO_MEM_F_PERSISTENT_SUSPEND 2 =20 =20 /* --- virtio-mem: guest -> host requests --- */ diff --git a/include/standard-headers/linux/virtio_net.h b/include/standard= -headers/linux/virtio_net.h index 0f8841774238..fc594fe5fcbe 100644 --- a/include/standard-headers/linux/virtio_net.h +++ b/include/standard-headers/linux/virtio_net.h @@ -56,6 +56,7 @@ #define VIRTIO_NET_F_MQ 22 /* Device supports Receive Flow * Steering */ #define VIRTIO_NET_F_CTRL_MAC_ADDR 23 /* Set MAC address */ +#define VIRTIO_NET_F_DEVICE_STATS 50 /* Device can provide device-level st= atistics. */ #define VIRTIO_NET_F_VQ_NOTF_COAL 52 /* Device supports virtqueue notifica= tion coalescing */ #define VIRTIO_NET_F_NOTF_COAL 53 /* Device supports notifications coalesc= ing */ #define VIRTIO_NET_F_GUEST_USO4 54 /* Guest can handle USOv4 in. */ @@ -406,4 +407,146 @@ struct virtio_net_ctrl_coal_vq { struct virtio_net_ctrl_coal coal; }; =20 +/* + * Device Statistics + */ +#define VIRTIO_NET_CTRL_STATS 8 +#define VIRTIO_NET_CTRL_STATS_QUERY 0 +#define VIRTIO_NET_CTRL_STATS_GET 1 + +struct virtio_net_stats_capabilities { + +#define VIRTIO_NET_STATS_TYPE_CVQ (1ULL << 32) + +#define VIRTIO_NET_STATS_TYPE_RX_BASIC (1ULL << 0) +#define VIRTIO_NET_STATS_TYPE_RX_CSUM (1ULL << 1) +#define VIRTIO_NET_STATS_TYPE_RX_GSO (1ULL << 2) +#define VIRTIO_NET_STATS_TYPE_RX_SPEED (1ULL << 3) + +#define VIRTIO_NET_STATS_TYPE_TX_BASIC (1ULL << 16) +#define VIRTIO_NET_STATS_TYPE_TX_CSUM (1ULL << 17) +#define VIRTIO_NET_STATS_TYPE_TX_GSO (1ULL << 18) +#define VIRTIO_NET_STATS_TYPE_TX_SPEED (1ULL << 19) + + uint64_t supported_stats_types[1]; +}; + +struct virtio_net_ctrl_queue_stats { + struct { + uint16_t vq_index; + uint16_t reserved[3]; + uint64_t types_bitmap[1]; + } stats[1]; +}; + +struct virtio_net_stats_reply_hdr { +#define VIRTIO_NET_STATS_TYPE_REPLY_CVQ 32 + +#define VIRTIO_NET_STATS_TYPE_REPLY_RX_BASIC 0 +#define VIRTIO_NET_STATS_TYPE_REPLY_RX_CSUM 1 +#define VIRTIO_NET_STATS_TYPE_REPLY_RX_GSO 2 +#define VIRTIO_NET_STATS_TYPE_REPLY_RX_SPEED 3 + +#define VIRTIO_NET_STATS_TYPE_REPLY_TX_BASIC 16 +#define VIRTIO_NET_STATS_TYPE_REPLY_TX_CSUM 17 +#define VIRTIO_NET_STATS_TYPE_REPLY_TX_GSO 18 +#define VIRTIO_NET_STATS_TYPE_REPLY_TX_SPEED 19 + uint8_t type; + uint8_t reserved; + uint16_t vq_index; + uint16_t reserved1; + uint16_t size; +}; + +struct virtio_net_stats_cvq { + struct virtio_net_stats_reply_hdr hdr; + + uint64_t command_num; + uint64_t ok_num; +}; + +struct virtio_net_stats_rx_basic { + struct virtio_net_stats_reply_hdr hdr; + + uint64_t rx_notifications; + + uint64_t rx_packets; + uint64_t rx_bytes; + + uint64_t rx_interrupts; + + uint64_t rx_drops; + uint64_t rx_drop_overruns; +}; + +struct virtio_net_stats_tx_basic { + struct virtio_net_stats_reply_hdr hdr; + + uint64_t tx_notifications; + + uint64_t tx_packets; + uint64_t tx_bytes; + + uint64_t tx_interrupts; + + uint64_t tx_drops; + uint64_t tx_drop_malformed; +}; + +struct virtio_net_stats_rx_csum { + struct virtio_net_stats_reply_hdr hdr; + + uint64_t rx_csum_valid; + uint64_t rx_needs_csum; + uint64_t rx_csum_none; + uint64_t rx_csum_bad; +}; + +struct virtio_net_stats_tx_csum { + struct virtio_net_stats_reply_hdr hdr; + + uint64_t tx_csum_none; + uint64_t tx_needs_csum; +}; + +struct virtio_net_stats_rx_gso { + struct virtio_net_stats_reply_hdr hdr; + + uint64_t rx_gso_packets; + uint64_t rx_gso_bytes; + uint64_t rx_gso_packets_coalesced; + uint64_t rx_gso_bytes_coalesced; +}; + +struct virtio_net_stats_tx_gso { + struct virtio_net_stats_reply_hdr hdr; + + uint64_t tx_gso_packets; + uint64_t tx_gso_bytes; + uint64_t tx_gso_segments; + uint64_t tx_gso_segments_bytes; + uint64_t tx_gso_packets_noseg; + uint64_t tx_gso_bytes_noseg; +}; + +struct virtio_net_stats_rx_speed { + struct virtio_net_stats_reply_hdr hdr; + + /* rx_{packets,bytes}_allowance_exceeded are too long. So rename to + * short name. + */ + uint64_t rx_ratelimit_packets; + uint64_t rx_ratelimit_bytes; +}; + +struct virtio_net_stats_tx_speed { + struct virtio_net_stats_reply_hdr hdr; + + /* tx_{packets,bytes}_allowance_exceeded are too long. So rename to + * short name. + */ + uint64_t tx_ratelimit_packets; + uint64_t tx_ratelimit_bytes; +}; + #endif /* _LINUX_VIRTIO_NET_H */ diff --git a/linux-headers/asm-generic/unistd.h b/linux-headers/asm-generic= /unistd.h index 75f00965ab15..d983c48a3b6a 100644 --- a/linux-headers/asm-generic/unistd.h +++ b/linux-headers/asm-generic/unistd.h @@ -842,8 +842,11 @@ __SYSCALL(__NR_lsm_set_self_attr, sys_lsm_set_self_att= r) #define __NR_lsm_list_modules 461 __SYSCALL(__NR_lsm_list_modules, sys_lsm_list_modules) =20 +#define __NR_mseal 462 +__SYSCALL(__NR_mseal, sys_mseal) + #undef __NR_syscalls -#define __NR_syscalls 462 +#define __NR_syscalls 463 =20 /* * 32 bit systems traditionally used different diff --git a/linux-headers/asm-loongarch/kvm.h b/linux-headers/asm-loongarc= h/kvm.h index 109785922cf9..f9abef382317 100644 --- a/linux-headers/asm-loongarch/kvm.h +++ b/linux-headers/asm-loongarch/kvm.h @@ -17,6 +17,8 @@ #define KVM_COALESCED_MMIO_PAGE_OFFSET 1 #define KVM_DIRTY_LOG_PAGE_OFFSET 64 =20 +#define KVM_GUESTDBG_USE_SW_BP 0x00010000 + /* * for KVM_GET_REGS and KVM_SET_REGS */ @@ -72,6 +74,8 @@ struct kvm_fpu { =20 #define KVM_REG_LOONGARCH_COUNTER (KVM_REG_LOONGARCH_KVM | KVM_REG_SIZE_U6= 4 | 1) #define KVM_REG_LOONGARCH_VCPU_RESET (KVM_REG_LOONGARCH_KVM | KVM_REG_SIZE= _U64 | 2) +/* Debugging: Special instruction for software breakpoint */ +#define KVM_REG_LOONGARCH_DEBUG_INST (KVM_REG_LOONGARCH_KVM | KVM_REG_SIZE= _U64 | 3) =20 #define LOONGARCH_REG_SHIFT 3 #define LOONGARCH_REG_64(TYPE, REG) (TYPE | KVM_REG_SIZE_U64 | (REG << LOO= NGARCH_REG_SHIFT)) diff --git a/linux-headers/asm-mips/unistd_n32.h b/linux-headers/asm-mips/u= nistd_n32.h index ce2e050a9ba4..fc93b3be3091 100644 --- a/linux-headers/asm-mips/unistd_n32.h +++ b/linux-headers/asm-mips/unistd_n32.h @@ -390,5 +390,6 @@ #define __NR_lsm_get_self_attr (__NR_Linux + 459) #define __NR_lsm_set_self_attr (__NR_Linux + 460) #define __NR_lsm_list_modules (__NR_Linux + 461) +#define __NR_mseal (__NR_Linux + 462) =20 #endif /* _ASM_UNISTD_N32_H */ diff --git a/linux-headers/asm-mips/unistd_n64.h b/linux-headers/asm-mips/u= nistd_n64.h index 5bfb3733ffdf..e72a3eb2c937 100644 --- a/linux-headers/asm-mips/unistd_n64.h +++ b/linux-headers/asm-mips/unistd_n64.h @@ -366,5 +366,6 @@ #define __NR_lsm_get_self_attr (__NR_Linux + 459) #define __NR_lsm_set_self_attr (__NR_Linux + 460) #define __NR_lsm_list_modules (__NR_Linux + 461) +#define __NR_mseal (__NR_Linux + 462) =20 #endif /* _ASM_UNISTD_N64_H */ diff --git a/linux-headers/asm-mips/unistd_o32.h b/linux-headers/asm-mips/u= nistd_o32.h index 02eaecd020ec..b86eb0786c76 100644 --- a/linux-headers/asm-mips/unistd_o32.h +++ b/linux-headers/asm-mips/unistd_o32.h @@ -436,5 +436,6 @@ #define __NR_lsm_get_self_attr (__NR_Linux + 459) #define __NR_lsm_set_self_attr (__NR_Linux + 460) #define __NR_lsm_list_modules (__NR_Linux + 461) +#define __NR_mseal (__NR_Linux + 462) =20 #endif /* _ASM_UNISTD_O32_H */ diff --git a/linux-headers/asm-powerpc/unistd_32.h b/linux-headers/asm-powe= rpc/unistd_32.h index bbab08d6ec26..28627b6546f2 100644 --- a/linux-headers/asm-powerpc/unistd_32.h +++ b/linux-headers/asm-powerpc/unistd_32.h @@ -443,6 +443,7 @@ #define __NR_lsm_get_self_attr 459 #define __NR_lsm_set_self_attr 460 #define __NR_lsm_list_modules 461 +#define __NR_mseal 462 =20 =20 #endif /* _ASM_UNISTD_32_H */ diff --git a/linux-headers/asm-powerpc/unistd_64.h b/linux-headers/asm-powe= rpc/unistd_64.h index af34cde70f20..1fc42a830046 100644 --- a/linux-headers/asm-powerpc/unistd_64.h +++ b/linux-headers/asm-powerpc/unistd_64.h @@ -415,6 +415,7 @@ #define __NR_lsm_get_self_attr 459 #define __NR_lsm_set_self_attr 460 #define __NR_lsm_list_modules 461 +#define __NR_mseal 462 =20 =20 #endif /* _ASM_UNISTD_64_H */ diff --git a/linux-headers/asm-riscv/kvm.h b/linux-headers/asm-riscv/kvm.h index b1c503c2959c..e878e7cc3978 100644 --- a/linux-headers/asm-riscv/kvm.h +++ b/linux-headers/asm-riscv/kvm.h @@ -167,6 +167,7 @@ enum KVM_RISCV_ISA_EXT_ID { KVM_RISCV_ISA_EXT_ZFA, KVM_RISCV_ISA_EXT_ZTSO, KVM_RISCV_ISA_EXT_ZACAS, + KVM_RISCV_ISA_EXT_SSCOFPMF, KVM_RISCV_ISA_EXT_MAX, }; =20 diff --git a/linux-headers/asm-s390/unistd_32.h b/linux-headers/asm-s390/un= istd_32.h index a3ece69d8241..7706c21b87e2 100644 --- a/linux-headers/asm-s390/unistd_32.h +++ b/linux-headers/asm-s390/unistd_32.h @@ -434,5 +434,6 @@ #define __NR_lsm_get_self_attr 459 #define __NR_lsm_set_self_attr 460 #define __NR_lsm_list_modules 461 +#define __NR_mseal 462 =20 #endif /* _ASM_S390_UNISTD_32_H */ diff --git a/linux-headers/asm-s390/unistd_64.h b/linux-headers/asm-s390/un= istd_64.h index 8c5fd93495ce..62082d592d35 100644 --- a/linux-headers/asm-s390/unistd_64.h +++ b/linux-headers/asm-s390/unistd_64.h @@ -382,5 +382,6 @@ #define __NR_lsm_get_self_attr 459 #define __NR_lsm_set_self_attr 460 #define __NR_lsm_list_modules 461 +#define __NR_mseal 462 =20 #endif /* _ASM_S390_UNISTD_64_H */ diff --git a/linux-headers/asm-x86/kvm.h b/linux-headers/asm-x86/kvm.h index 31c95c2dfe4c..b4e2e8d220e2 100644 --- a/linux-headers/asm-x86/kvm.h +++ b/linux-headers/asm-x86/kvm.h @@ -709,7 +709,9 @@ struct kvm_sev_cmd { struct kvm_sev_init { __u64 vmsa_features; __u32 flags; - __u32 pad[9]; + __u16 ghcb_version; + __u16 pad1; + __u32 pad2[8]; }; =20 struct kvm_sev_launch_start { diff --git a/linux-headers/asm-x86/unistd_32.h b/linux-headers/asm-x86/unis= td_32.h index 5c9c329e9390..fb7b8b169bfa 100644 --- a/linux-headers/asm-x86/unistd_32.h +++ b/linux-headers/asm-x86/unistd_32.h @@ -452,6 +452,7 @@ #define __NR_lsm_get_self_attr 459 #define __NR_lsm_set_self_attr 460 #define __NR_lsm_list_modules 461 +#define __NR_mseal 462 =20 =20 #endif /* _ASM_UNISTD_32_H */ diff --git a/linux-headers/asm-x86/unistd_64.h b/linux-headers/asm-x86/unis= td_64.h index d9aab7ae87d8..da439afee1cf 100644 --- a/linux-headers/asm-x86/unistd_64.h +++ b/linux-headers/asm-x86/unistd_64.h @@ -374,6 +374,7 @@ #define __NR_lsm_get_self_attr 459 #define __NR_lsm_set_self_attr 460 #define __NR_lsm_list_modules 461 +#define __NR_mseal 462 =20 =20 #endif /* _ASM_UNISTD_64_H */ diff --git a/linux-headers/asm-x86/unistd_x32.h b/linux-headers/asm-x86/uni= std_x32.h index 63cdd1ee43df..4fcb607c724b 100644 --- a/linux-headers/asm-x86/unistd_x32.h +++ b/linux-headers/asm-x86/unistd_x32.h @@ -318,6 +318,7 @@ #define __NR_set_mempolicy_home_node (__X32_SYSCALL_BIT + 450) #define __NR_cachestat (__X32_SYSCALL_BIT + 451) #define __NR_fchmodat2 (__X32_SYSCALL_BIT + 452) +#define __NR_map_shadow_stack (__X32_SYSCALL_BIT + 453) #define __NR_futex_wake (__X32_SYSCALL_BIT + 454) #define __NR_futex_wait (__X32_SYSCALL_BIT + 455) #define __NR_futex_requeue (__X32_SYSCALL_BIT + 456) @@ -326,6 +327,7 @@ #define __NR_lsm_get_self_attr (__X32_SYSCALL_BIT + 459) #define __NR_lsm_set_self_attr (__X32_SYSCALL_BIT + 460) #define __NR_lsm_list_modules (__X32_SYSCALL_BIT + 461) +#define __NR_mseal (__X32_SYSCALL_BIT + 462) #define __NR_rt_sigaction (__X32_SYSCALL_BIT + 512) #define __NR_rt_sigreturn (__X32_SYSCALL_BIT + 513) #define __NR_ioctl (__X32_SYSCALL_BIT + 514) diff --git a/linux-headers/linux/kvm.h b/linux-headers/linux/kvm.h index 038731cdef26..c93876ca0ba9 100644 --- a/linux-headers/linux/kvm.h +++ b/linux-headers/linux/kvm.h @@ -1217,9 +1217,9 @@ struct kvm_vfio_spapr_tce { /* Available with KVM_CAP_SPAPR_RESIZE_HPT */ #define KVM_PPC_RESIZE_HPT_PREPARE _IOR(KVMIO, 0xad, struct kvm_ppc_resize= _hpt) #define KVM_PPC_RESIZE_HPT_COMMIT _IOR(KVMIO, 0xae, struct kvm_ppc_resize= _hpt) -/* Available with KVM_CAP_PPC_RADIX_MMU or KVM_CAP_PPC_HASH_MMU_V3 */ +/* Available with KVM_CAP_PPC_MMU_RADIX or KVM_CAP_PPC_MMU_HASH_V3 */ #define KVM_PPC_CONFIGURE_V3_MMU _IOW(KVMIO, 0xaf, struct kvm_ppc_mmuv3_= cfg) -/* Available with KVM_CAP_PPC_RADIX_MMU */ +/* Available with KVM_CAP_PPC_MMU_RADIX */ #define KVM_PPC_GET_RMMU_INFO _IOW(KVMIO, 0xb0, struct kvm_ppc_rmmu_inf= o) /* Available with KVM_CAP_PPC_GET_CPU_CHAR */ #define KVM_PPC_GET_CPU_CHAR _IOR(KVMIO, 0xb1, struct kvm_ppc_cpu_char) diff --git a/linux-headers/linux/stddef.h b/linux-headers/linux/stddef.h index bf9749dd1422..96aa341942b0 100644 --- a/linux-headers/linux/stddef.h +++ b/linux-headers/linux/stddef.h @@ -55,4 +55,12 @@ #define __counted_by(m) #endif =20 +#ifndef __counted_by_le +#define __counted_by_le(m) +#endif + +#ifndef __counted_by_be +#define __counted_by_be(m) +#endif + #endif /* _LINUX_STDDEF_H */ diff --git a/linux-headers/linux/vhost.h b/linux-headers/linux/vhost.h index bea697390613..b95dd84eef2d 100644 --- a/linux-headers/linux/vhost.h +++ b/linux-headers/linux/vhost.h @@ -179,12 +179,6 @@ /* Get the config size */ #define VHOST_VDPA_GET_CONFIG_SIZE _IOR(VHOST_VIRTIO, 0x79, __u32) =20 -/* Get the count of all virtqueues */ -#define VHOST_VDPA_GET_VQS_COUNT _IOR(VHOST_VIRTIO, 0x80, __u32) - -/* Get the number of virtqueue groups. */ -#define VHOST_VDPA_GET_GROUP_NUM _IOR(VHOST_VIRTIO, 0x81, __u32) - /* Get the number of address spaces. */ #define VHOST_VDPA_GET_AS_NUM _IOR(VHOST_VIRTIO, 0x7A, unsigned int) =20 @@ -228,10 +222,17 @@ #define VHOST_VDPA_GET_VRING_DESC_GROUP _IOWR(VHOST_VIRTIO, 0x7F, \ struct vhost_vring_state) =20 + +/* Get the count of all virtqueues */ +#define VHOST_VDPA_GET_VQS_COUNT _IOR(VHOST_VIRTIO, 0x80, __u32) + +/* Get the number of virtqueue groups. */ +#define VHOST_VDPA_GET_GROUP_NUM _IOR(VHOST_VIRTIO, 0x81, __u32) + /* Get the queue size of a specific virtqueue. * userspace set the vring index in vhost_vring_state.index * kernel set the queue size in vhost_vring_state.num */ -#define VHOST_VDPA_GET_VRING_SIZE _IOWR(VHOST_VIRTIO, 0x80, \ +#define VHOST_VDPA_GET_VRING_SIZE _IOWR(VHOST_VIRTIO, 0x82, \ struct vhost_vring_state) #endif --=20 2.45.1 From nobody Mon Nov 25 08:22:26 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=t-8ch.de ARC-Seal: i=1; a=rsa-sha256; t=1716791348; cv=none; d=zohomail.com; s=zohoarc; b=i/gDsxOVYpDZCNm9B1eVdLkiLVgLl7oLC1rVTjk8TmjzQBeqHkglFbywrFooPxqtOyOSpM0v4RyYC8mP25i+KfwNonhFUWF0STqqQ6a8yeYDx6GAO7n4QMdzzWhA/LC68mvaTIBk7+YfZE3Zw4Vc7LHaMhrtCwMWzc2fLWQrI94= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1716791348; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=PQZdXEn4kzVvDo6/aQHk2bpvR1voY+DlAxkmGDWUvSA=; b=EvKrqZzijOE/cjLew+oL1hP6pendYUSBh01Z9OCNoyOOX+5GwgEIorn16/3MJzuqB9zew56aHRyGM0UOXvJ0mvgp3BOVzDb6cJfCX8hbJSKBagfc0iV6yEeESEmR97rtEz2jWjINS73npmIsYtiHbRx1Fi6o4cQv/jizWEgGqQ4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1716791348957176.01953910035115; Sun, 26 May 2024 23:29:08 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sBTqR-0002LT-Ke; Mon, 27 May 2024 02:28:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sBTq6-0002Dx-0G for qemu-devel@nongnu.org; Mon, 27 May 2024 02:28:10 -0400 Received: from todd.t-8ch.de ([159.69.126.157]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sBTq3-0004oq-LL for qemu-devel@nongnu.org; Mon, 27 May 2024 02:28:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=t-8ch.de; s=mail; t=1716791283; bh=BefW+i79hFiQr0TmF/pX07bNCPSAXcucnPXkLavgfJU=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=G56r8TuQBApCHkNC6OPEPjtDkgfnoCZOPb1WiIl9EO9BPU5XAwIXmcnIfpYM8qeWs EmFwm6Be5pnz43cQO66z93Qw4sQUH6D42ULexGl5zhOaS998DfpMrWlAVXDQQ3wLiK LhedfWQrbwOdDoklI5EvdHS4VdmAOveCBh0ol/cc= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Mon, 27 May 2024 08:27:49 +0200 Subject: [PATCH v8 3/8] hw/misc/pvpanic: centralize definition of supported events MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20240527-pvpanic-shutdown-v8-3-5a28ec02558b@t-8ch.de> References: <20240527-pvpanic-shutdown-v8-0-5a28ec02558b@t-8ch.de> In-Reply-To: <20240527-pvpanic-shutdown-v8-0-5a28ec02558b@t-8ch.de> To: "Michael S. Tsirkin" , Cornelia Huck , Paolo Bonzini , Thomas Huth , Laurent Vivier , Eric Blake , Markus Armbruster Cc: qemu-devel@nongnu.org, Alejandro Jimenez , kvm@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1716791282; l=3183; i=thomas@t-8ch.de; s=20221212; h=from:subject:message-id; bh=BefW+i79hFiQr0TmF/pX07bNCPSAXcucnPXkLavgfJU=; b=ez/WyG2JARJRjbwcJM5FgC6KkyvkMjGZpSqoX8QKrUhIvrC83TzwoCDiHEQAMTmXxSx/3mrd4 Lt7gqxJe9vFBjlAMcMMHOTQPr88IjorhJaMKnlgGU+PUr7c+SCZaCwq X-Developer-Key: i=thomas@t-8ch.de; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=159.69.126.157; envelope-from=thomas@t-8ch.de; helo=todd.t-8ch.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @t-8ch.de) X-ZM-MESSAGEID: 1716791350655100001 The different components of pvpanic duplicate the list of supported events. Move it to the shared header file to minimize changes when new events are added. Reviewed-by: Thomas Huth Reviewed-by: Cornelia Huck Signed-off-by: Thomas Wei=C3=9Fschuh --- hw/misc/pvpanic-isa.c | 3 +-- hw/misc/pvpanic-pci.c | 3 +-- hw/misc/pvpanic.c | 3 +-- include/hw/misc/pvpanic.h | 4 ++++ 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/hw/misc/pvpanic-isa.c b/hw/misc/pvpanic-isa.c index ccec50f61bbd..9a923b786907 100644 --- a/hw/misc/pvpanic-isa.c +++ b/hw/misc/pvpanic-isa.c @@ -21,7 +21,6 @@ #include "hw/misc/pvpanic.h" #include "qom/object.h" #include "hw/isa/isa.h" -#include "standard-headers/linux/pvpanic.h" #include "hw/acpi/acpi_aml_interface.h" =20 OBJECT_DECLARE_SIMPLE_TYPE(PVPanicISAState, PVPANIC_ISA_DEVICE) @@ -102,7 +101,7 @@ static void build_pvpanic_isa_aml(AcpiDevAmlIf *adev, A= ml *scope) static Property pvpanic_isa_properties[] =3D { DEFINE_PROP_UINT16(PVPANIC_IOPORT_PROP, PVPanicISAState, ioport, 0x505= ), DEFINE_PROP_UINT8("events", PVPanicISAState, pvpanic.events, - PVPANIC_PANICKED | PVPANIC_CRASH_LOADED), + PVPANIC_EVENTS), DEFINE_PROP_END_OF_LIST(), }; =20 diff --git a/hw/misc/pvpanic-pci.c b/hw/misc/pvpanic-pci.c index 83be95d0d249..603c5c7600da 100644 --- a/hw/misc/pvpanic-pci.c +++ b/hw/misc/pvpanic-pci.c @@ -21,7 +21,6 @@ #include "hw/misc/pvpanic.h" #include "qom/object.h" #include "hw/pci/pci_device.h" -#include "standard-headers/linux/pvpanic.h" =20 OBJECT_DECLARE_SIMPLE_TYPE(PVPanicPCIState, PVPANIC_PCI_DEVICE) =20 @@ -55,7 +54,7 @@ static void pvpanic_pci_realizefn(PCIDevice *dev, Error *= *errp) =20 static Property pvpanic_pci_properties[] =3D { DEFINE_PROP_UINT8("events", PVPanicPCIState, pvpanic.events, - PVPANIC_PANICKED | PVPANIC_CRASH_LOADED), + PVPANIC_EVENTS), DEFINE_PROP_END_OF_LIST(), }; =20 diff --git a/hw/misc/pvpanic.c b/hw/misc/pvpanic.c index 1540e9091a45..a4982cc5928e 100644 --- a/hw/misc/pvpanic.c +++ b/hw/misc/pvpanic.c @@ -21,13 +21,12 @@ #include "hw/qdev-properties.h" #include "hw/misc/pvpanic.h" #include "qom/object.h" -#include "standard-headers/linux/pvpanic.h" =20 static void handle_event(int event) { static bool logged; =20 - if (event & ~(PVPANIC_PANICKED | PVPANIC_CRASH_LOADED) && !logged) { + if (event & ~PVPANIC_EVENTS && !logged) { qemu_log_mask(LOG_GUEST_ERROR, "pvpanic: unknown event %#x.\n", ev= ent); logged =3D true; } diff --git a/include/hw/misc/pvpanic.h b/include/hw/misc/pvpanic.h index fab94165d03d..947468b81b1a 100644 --- a/include/hw/misc/pvpanic.h +++ b/include/hw/misc/pvpanic.h @@ -18,6 +18,10 @@ #include "exec/memory.h" #include "qom/object.h" =20 +#include "standard-headers/linux/pvpanic.h" + +#define PVPANIC_EVENTS (PVPANIC_PANICKED | PVPANIC_CRASH_LOADED) + #define TYPE_PVPANIC_ISA_DEVICE "pvpanic" #define TYPE_PVPANIC_PCI_DEVICE "pvpanic-pci" =20 --=20 2.45.1 From nobody Mon Nov 25 08:22:26 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=t-8ch.de ARC-Seal: i=1; a=rsa-sha256; t=1716791364; cv=none; d=zohomail.com; s=zohoarc; b=enIFXFQz5XNwR+LiDp15e64d95g7SDTWM9sSJKSJzVh6jTCCbWDvlYBxG6An3/oMebN3IUFkwd+Od1vHMdftxIReiJcB1sHcz9oMnlAtJiRf75XXoFMGOccBkhUIPaWiOEDVJZlalmcVZrzkSjk91h2Log4mp7Vlz9SOx5I/78s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1716791364; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=NFa/tbTBwJjI1wSpPxvAuX65jcOfWXPAdA48uo6xeDg=; b=kly94OW3YThYjC4m1imfWgrsfAnS1gZVF7jMNV6Bl3oJ9FSFCCyu6xhqhgBxVMwg45Jq1Pf+RUOY+VtZx1+O2bzjI1oj4/YwTKQyTkyOztDpaN3pJZvjIvUsSlv6yuh6MAiQE0LuDV8VKNtuQ8xZHXdw31TW7EilJDhyyPIUk9A= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1716791364545913.9862843191631; Sun, 26 May 2024 23:29:24 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sBTqQ-0002Hn-9G; Mon, 27 May 2024 02:28:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sBTq7-0002EN-Vl for qemu-devel@nongnu.org; Mon, 27 May 2024 02:28:13 -0400 Received: from todd.t-8ch.de ([2a01:4f8:c010:41de::1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sBTq3-0004ot-LA for qemu-devel@nongnu.org; Mon, 27 May 2024 02:28:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=t-8ch.de; s=mail; t=1716791283; bh=MKkiWNtUHtqwAlYS3tCoUMqli/hyolEiaj3niH9CQzQ=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=auny1w3QYet07BgnB6NGh2mZvKDQ40Bt6EF5dDC0tvp5wScBMq6n2dWZZ1Dr9p5QB nfBl+XMMkVXZCY0lFyMQAfHDsQ1seZYHizXyG3WsC4xlNxlxJP4dfRhsxL2ALBT1zV mkvln7YDT2n+ldV/jGyRnbWi9U2+AQq69sx2vhDU= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Mon, 27 May 2024 08:27:50 +0200 Subject: [PATCH v8 4/8] tests/qtest/pvpanic: use centralized definition of supported events MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20240527-pvpanic-shutdown-v8-4-5a28ec02558b@t-8ch.de> References: <20240527-pvpanic-shutdown-v8-0-5a28ec02558b@t-8ch.de> In-Reply-To: <20240527-pvpanic-shutdown-v8-0-5a28ec02558b@t-8ch.de> To: "Michael S. Tsirkin" , Cornelia Huck , Paolo Bonzini , Thomas Huth , Laurent Vivier , Eric Blake , Markus Armbruster Cc: qemu-devel@nongnu.org, Alejandro Jimenez , kvm@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1716791282; l=2303; i=thomas@t-8ch.de; s=20221212; h=from:subject:message-id; bh=MKkiWNtUHtqwAlYS3tCoUMqli/hyolEiaj3niH9CQzQ=; b=BIUC2v+NvtNxb2Q5ESQdfDcjaWm0JsaLZwK+P8mC/vMA/+bhQAa4x0WTDGGZVNondmSXoYeOb jjGJ6xI4f/MC3+5uS0Lgg7wEZ/ARWSdhGrjgtBHIspDcG/R4mrntNeQ X-Developer-Key: i=thomas@t-8ch.de; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a01:4f8:c010:41de::1; envelope-from=thomas@t-8ch.de; helo=todd.t-8ch.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @t-8ch.de) X-ZM-MESSAGEID: 1716791366591100001 Avoid the necessity to update all tests when new events are added to the device. Acked-by: Thomas Huth Reviewed-by: Cornelia Huck Signed-off-by: Thomas Wei=C3=9Fschuh --- tests/qtest/pvpanic-pci-test.c | 5 +++-- tests/qtest/pvpanic-test.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/qtest/pvpanic-pci-test.c b/tests/qtest/pvpanic-pci-test.c index 2c05b376ba72..b372caf41dc0 100644 --- a/tests/qtest/pvpanic-pci-test.c +++ b/tests/qtest/pvpanic-pci-test.c @@ -16,6 +16,7 @@ #include "qapi/qmp/qdict.h" #include "libqos/pci.h" #include "libqos/pci-pc.h" +#include "hw/misc/pvpanic.h" #include "hw/pci/pci_regs.h" =20 static void test_panic_nopause(void) @@ -34,7 +35,7 @@ static void test_panic_nopause(void) bar =3D qpci_iomap(dev, 0, NULL); =20 qpci_memread(dev, bar, 0, &val, sizeof(val)); - g_assert_cmpuint(val, =3D=3D, 3); + g_assert_cmpuint(val, =3D=3D, PVPANIC_EVENTS); =20 val =3D 1; qpci_memwrite(dev, bar, 0, &val, sizeof(val)); @@ -67,7 +68,7 @@ static void test_panic(void) bar =3D qpci_iomap(dev, 0, NULL); =20 qpci_memread(dev, bar, 0, &val, sizeof(val)); - g_assert_cmpuint(val, =3D=3D, 3); + g_assert_cmpuint(val, =3D=3D, PVPANIC_EVENTS); =20 val =3D 1; qpci_memwrite(dev, bar, 0, &val, sizeof(val)); diff --git a/tests/qtest/pvpanic-test.c b/tests/qtest/pvpanic-test.c index 78f1cf8186b0..ccc603472f5d 100644 --- a/tests/qtest/pvpanic-test.c +++ b/tests/qtest/pvpanic-test.c @@ -10,6 +10,7 @@ #include "qemu/osdep.h" #include "libqtest.h" #include "qapi/qmp/qdict.h" +#include "hw/misc/pvpanic.h" =20 static void test_panic_nopause(void) { @@ -20,7 +21,7 @@ static void test_panic_nopause(void) qts =3D qtest_init("-device pvpanic -action panic=3Dnone"); =20 val =3D qtest_inb(qts, 0x505); - g_assert_cmpuint(val, =3D=3D, 3); + g_assert_cmpuint(val, =3D=3D, PVPANIC_EVENTS); =20 qtest_outb(qts, 0x505, 0x1); =20 @@ -43,7 +44,7 @@ static void test_panic(void) qts =3D qtest_init("-device pvpanic -action panic=3Dpause"); =20 val =3D qtest_inb(qts, 0x505); - g_assert_cmpuint(val, =3D=3D, 3); + g_assert_cmpuint(val, =3D=3D, PVPANIC_EVENTS); =20 qtest_outb(qts, 0x505, 0x1); =20 --=20 2.45.1 From nobody Mon Nov 25 08:22:26 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=t-8ch.de ARC-Seal: i=1; a=rsa-sha256; t=1716791354; cv=none; d=zohomail.com; s=zohoarc; b=a+o4AkKy+5kmEHV4+nRZI81MJRbVugWuz8ar5lSb1lCYP8r2/6I0dC8A4hLU2EYoqBvGi9Egj48W6CVKFXtLux1iIuUB2xmVZsFHGc14FRw94RUaWuEa7P71ANZz/q+Gij5UKzuhDySkKEe7bxLpwaUoEw3S31s7qN/pSNMgkyU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1716791354; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=sqmKQzkE6VUc2T8J7sBgyDCqQoFK/bC7LQFH4YZ0EmU=; b=ZeX1BjClLcYCp/ZeSIpEhtuj+ziPpzG6e77UR7kRZHuN9LIe4IegPpH9BKNrCH4QImsc68ljf43bgZ7eQGxcGuMpAK1lW/fhvOqIcVRUluXVO5spwR5eDyYOYIsgODvA0Kxl+nilTtUjMn4AHLUmjC1+ez3xOXM9JFgBuLrcQmo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1716791354399537.0806737589526; Sun, 26 May 2024 23:29:14 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sBTqU-0002PM-0S; Mon, 27 May 2024 02:28:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sBTq9-0002Ei-OP for qemu-devel@nongnu.org; Mon, 27 May 2024 02:28:13 -0400 Received: from todd.t-8ch.de ([159.69.126.157]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sBTq7-0004qD-Hl for qemu-devel@nongnu.org; Mon, 27 May 2024 02:28:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=t-8ch.de; s=mail; t=1716791283; bh=s5VaI29lwZj1ic4YhfNoQySSm+8g+nzVFlmlxZMx79I=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=GG6Gk6EL54vJcshYSoUXOFF/d9332hutWk2dWDyLmitmoPBEH0hybxmTzWmpz/q+T 2AbVTA0dUsmhPss994RjENrEGbmDBgDoO5boV4dz6rqoKCokyjdRGal+XRbNFms9Mq 3yIbFVZbu13hINuXL577NvQ9l2FFj+uC6u2b0TaU= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Mon, 27 May 2024 08:27:51 +0200 Subject: [PATCH v8 5/8] hw/misc/pvpanic: add support for normal shutdowns MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20240527-pvpanic-shutdown-v8-5-5a28ec02558b@t-8ch.de> References: <20240527-pvpanic-shutdown-v8-0-5a28ec02558b@t-8ch.de> In-Reply-To: <20240527-pvpanic-shutdown-v8-0-5a28ec02558b@t-8ch.de> To: "Michael S. Tsirkin" , Cornelia Huck , Paolo Bonzini , Thomas Huth , Laurent Vivier , Eric Blake , Markus Armbruster Cc: qemu-devel@nongnu.org, Alejandro Jimenez , kvm@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1716791282; l=2474; i=thomas@t-8ch.de; s=20221212; h=from:subject:message-id; bh=s5VaI29lwZj1ic4YhfNoQySSm+8g+nzVFlmlxZMx79I=; b=eFGqUTzQJobqUIXaRVRjnXdRt672/izm7hsoRvVKqM2uiQXXKoPkEA8RyjnGlWkZMwN6un8u+ kNpbRtoMzmFB7kPmcu99bp2Cmr4kbzWQ4v1miX/rt4vIzv+l4snBlJk X-Developer-Key: i=thomas@t-8ch.de; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=159.69.126.157; envelope-from=thomas@t-8ch.de; helo=todd.t-8ch.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @t-8ch.de) X-ZM-MESSAGEID: 1716791355667100001 Shutdown requests are normally hardware dependent. By extending pvpanic to also handle shutdown requests, guests can submit such requests with an easily implementable and cross-platform mechanism. Acked-by: Cornelia Huck Signed-off-by: Thomas Wei=C3=9Fschuh --- hw/misc/pvpanic.c | 5 +++++ include/hw/misc/pvpanic.h | 2 +- include/sysemu/runstate.h | 1 + system/runstate.c | 5 +++++ 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/hw/misc/pvpanic.c b/hw/misc/pvpanic.c index a4982cc5928e..0e9505451a7a 100644 --- a/hw/misc/pvpanic.c +++ b/hw/misc/pvpanic.c @@ -40,6 +40,11 @@ static void handle_event(int event) qemu_system_guest_crashloaded(NULL); return; } + + if (event & PVPANIC_SHUTDOWN) { + qemu_system_guest_pvshutdown(); + return; + } } =20 /* return supported events on read */ diff --git a/include/hw/misc/pvpanic.h b/include/hw/misc/pvpanic.h index 947468b81b1a..fbbf2bbf5dbb 100644 --- a/include/hw/misc/pvpanic.h +++ b/include/hw/misc/pvpanic.h @@ -20,7 +20,7 @@ =20 #include "standard-headers/linux/pvpanic.h" =20 -#define PVPANIC_EVENTS (PVPANIC_PANICKED | PVPANIC_CRASH_LOADED) +#define PVPANIC_EVENTS (PVPANIC_PANICKED | PVPANIC_CRASH_LOADED | PVPANIC_= SHUTDOWN) =20 #define TYPE_PVPANIC_ISA_DEVICE "pvpanic" #define TYPE_PVPANIC_PCI_DEVICE "pvpanic-pci" diff --git a/include/sysemu/runstate.h b/include/sysemu/runstate.h index 0117d243c4ed..e210a37abf0f 100644 --- a/include/sysemu/runstate.h +++ b/include/sysemu/runstate.h @@ -104,6 +104,7 @@ void qemu_system_killed(int signal, pid_t pid); void qemu_system_reset(ShutdownCause reason); void qemu_system_guest_panicked(GuestPanicInformation *info); void qemu_system_guest_crashloaded(GuestPanicInformation *info); +void qemu_system_guest_pvshutdown(void); bool qemu_system_dump_in_progress(void); =20 #endif diff --git a/system/runstate.c b/system/runstate.c index cb4905a40fce..83055f327831 100644 --- a/system/runstate.c +++ b/system/runstate.c @@ -585,6 +585,11 @@ void qemu_system_guest_crashloaded(GuestPanicInformati= on *info) qapi_free_GuestPanicInformation(info); } =20 +void qemu_system_guest_pvshutdown(void) +{ + qemu_system_shutdown_request(SHUTDOWN_CAUSE_GUEST_SHUTDOWN); +} + void qemu_system_reset_request(ShutdownCause reason) { if (reboot_action =3D=3D REBOOT_ACTION_SHUTDOWN && --=20 2.45.1 From nobody Mon Nov 25 08:22:26 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=t-8ch.de ARC-Seal: i=1; a=rsa-sha256; t=1716791345; cv=none; d=zohomail.com; s=zohoarc; b=ZcKlwZgOw+Uf3GxBaAnoIcrxHiwHQ8sMuLBGalT4UhoCM3Q9AxksCWV1N+mahUcjPutbJAntMqDbcWcutA/eG4yNB6si2AdHhEiR9npMXpp71lqbFpg7EblRckGVvnV5+/A0MjteQD5mTAw6udxC8n3xP4DJYTt5p+qwsyILWAc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1716791345; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=p/gvt4pjZeFyHq+ZtwKqSNWV8EZhGG1ZcpbXnwXfqyI=; b=gv25kDbbDtZ1mvOroPvtiOIst8WWM5YX2nTOyPYPkkghWZRV5D7ydZ1vcjOi8WKqa48mopgfePWbBgUaVokSvECA9WuJ6EySzm4fw201jW9uLdFCyu7WuF5iA6YYI55ssPzItTmJ9UVK3RRkFLdITX7fM9y4VaR2ibMAK83efZo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 17167913457661017.9030220974671; Sun, 26 May 2024 23:29:05 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sBTqu-0002qT-2E; Mon, 27 May 2024 02:29:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sBTqB-0002FR-1q for qemu-devel@nongnu.org; Mon, 27 May 2024 02:28:15 -0400 Received: from todd.t-8ch.de ([2a01:4f8:c010:41de::1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sBTq9-0004r3-Du for qemu-devel@nongnu.org; Mon, 27 May 2024 02:28:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=t-8ch.de; s=mail; t=1716791283; bh=5/1Bk9mnF+1n9Z51eNqcrOq05hjSHDlV2xn6uybxovM=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=T/H4n/MoMJyg5xY75PjvMBaw7Nx5jKSAHPbSruI4smBwenNJU+4IR2bVZwsBnasQk V3OiGN31cTVjPyMwjseI8pxdwLLD9+xtdXrC+fNIiTO+YVLW0oJZPXGuDPirpMxzDM ohrtKuhLhxs+JDcHRzEoSaY91/vN+VDWyiYDmKKU= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Mon, 27 May 2024 08:27:52 +0200 Subject: [PATCH v8 6/8] pvpanic: Emit GUEST_PVSHUTDOWN QMP event on pvpanic shutdown signal MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20240527-pvpanic-shutdown-v8-6-5a28ec02558b@t-8ch.de> References: <20240527-pvpanic-shutdown-v8-0-5a28ec02558b@t-8ch.de> In-Reply-To: <20240527-pvpanic-shutdown-v8-0-5a28ec02558b@t-8ch.de> To: "Michael S. Tsirkin" , Cornelia Huck , Paolo Bonzini , Thomas Huth , Laurent Vivier , Eric Blake , Markus Armbruster Cc: qemu-devel@nongnu.org, Alejandro Jimenez , kvm@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1716791282; l=1650; i=thomas@t-8ch.de; s=20221212; h=from:subject:message-id; bh=JwxX+0mx7goMox95OiqVgku6MBDDSp90a8h3Zes6g8U=; b=mV9hg4JU6KjY9bvEwqIIVIlx5KudKg7E0xc17yCnyqYzw96nJPeIXtWNpsRGYYprIdCUlfVNL mTvRcibCLINDfzWVy3TVSUdmM8XZotkMC7Dbg3aO/402hUAhccDLdmR X-Developer-Key: i=thomas@t-8ch.de; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a01:4f8:c010:41de::1; envelope-from=thomas@t-8ch.de; helo=todd.t-8ch.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @t-8ch.de) X-ZM-MESSAGEID: 1716791346790100003 From: Alejandro Jimenez Emit a QMP event on receiving a PVPANIC_SHUTDOWN event. Even though a typic= al SHUTDOWN event will be sent, it will be indistinguishable from a shutdown originating from other cases (e.g. KVM exit due to KVM_SYSTEM_EVENT_SHUTDOW= N) that also issue the guest-shutdown cause. A management layer application can detect the new GUEST_PVSHUTDOWN event to determine if the guest is using the pvpanic interface to request shutdowns. Signed-off-by: Alejandro Jimenez --- qapi/run-state.json | 14 ++++++++++++++ system/runstate.c | 1 + 2 files changed, 15 insertions(+) diff --git a/qapi/run-state.json b/qapi/run-state.json index f8773f23b298..5ac0fec85236 100644 --- a/qapi/run-state.json +++ b/qapi/run-state.json @@ -462,6 +462,20 @@ { 'event': 'GUEST_CRASHLOADED', 'data': { 'action': 'GuestPanicAction', '*info': 'GuestPanicInformation'= } } =20 +## +# @GUEST_PVSHUTDOWN: +# +# Emitted when guest submits a shutdown request via pvpanic interface +# +# Since: 9.1 +# +# Example: +# +# <- { "event": "GUEST_PVSHUTDOWN", +# "timestamp": { "seconds": 1648245259, "microseconds": 893771 } } +## +{ 'event': 'GUEST_PVSHUTDOWN' } + ## # @GuestPanicAction: # diff --git a/system/runstate.c b/system/runstate.c index 83055f327831..c149b1ab4ba6 100644 --- a/system/runstate.c +++ b/system/runstate.c @@ -587,6 +587,7 @@ void qemu_system_guest_crashloaded(GuestPanicInformatio= n *info) =20 void qemu_system_guest_pvshutdown(void) { + qapi_event_send_guest_pvshutdown(); qemu_system_shutdown_request(SHUTDOWN_CAUSE_GUEST_SHUTDOWN); } =20 --=20 2.45.1 From nobody Mon Nov 25 08:22:26 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=t-8ch.de ARC-Seal: i=1; a=rsa-sha256; t=1716791439; cv=none; d=zohomail.com; s=zohoarc; b=CvG2mRx/VkcQQb9/aG3xn+KETqVMN+O4Tcebvh9ZvoHlzBK7EcwTnfPy95ByutjIN6g9IFRqFit0KkLvNqJLVwXi0Mbrh7A3jeFMi2fjIslaM4fpFuuO9EubIZ9M3QbhosULkGoB6wohaWUKTdR2N+EfMMVnSmQdVEdce6YbAIE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1716791439; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=TqEoCcyvEnKvlBkeX+0IFiS82fJ/oHFos8r46qlw5XA=; b=QFeT5SZ446GR+66eQn3zhrDyBt9Tzf5h0tXCxRndw+6XKUimV3z1OhbH+vm2ojT1QCeMsfuxiREvknWW+jCsM81fsiS5w5phmnHKK7/1h6aLljmDr3nx4RMMI2HT1ob/NqI0cYDRs1E6IpXErVsVzgdGXfyKJVNJ0znaYbWJrZ0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1716791439140788.7992863571063; Sun, 26 May 2024 23:30:39 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sBTqT-0002Nh-4E; Mon, 27 May 2024 02:28:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sBTqA-0002FP-QJ for qemu-devel@nongnu.org; Mon, 27 May 2024 02:28:15 -0400 Received: from todd.t-8ch.de ([159.69.126.157]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sBTq9-0004r4-09 for qemu-devel@nongnu.org; Mon, 27 May 2024 02:28:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=t-8ch.de; s=mail; t=1716791283; bh=nvP7F4VxPNMc/SNZJF33wZUxcxPGJ/J2rujhhRh8opM=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=p7tFZb0AWPvRuigJBwX2UnkSoHt++5d9rV8Kw6O6KZmxU8nl0FGHEhC93bm+YRFdl nNzR46QerKIiVDXFVTkCrx51oZGfApcwGxekDVYWJVg3d8hxliKQaLx1YJ9ibPKy29 SPvdgaCY5uw+WXAPEV2TMm11d4zchkUEw0qdecVs= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Mon, 27 May 2024 08:27:53 +0200 Subject: [PATCH v8 7/8] tests/qtest/pvpanic: add tests for pvshutdown event MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20240527-pvpanic-shutdown-v8-7-5a28ec02558b@t-8ch.de> References: <20240527-pvpanic-shutdown-v8-0-5a28ec02558b@t-8ch.de> In-Reply-To: <20240527-pvpanic-shutdown-v8-0-5a28ec02558b@t-8ch.de> To: "Michael S. Tsirkin" , Cornelia Huck , Paolo Bonzini , Thomas Huth , Laurent Vivier , Eric Blake , Markus Armbruster Cc: qemu-devel@nongnu.org, Alejandro Jimenez , kvm@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1716791282; l=3527; i=thomas@t-8ch.de; s=20221212; h=from:subject:message-id; bh=nvP7F4VxPNMc/SNZJF33wZUxcxPGJ/J2rujhhRh8opM=; b=rR7Ory6xINrf5WzUwHjV1sNa+8ZV6FwIlGJ3+JmTsHGjl1uDafNWInJ3Ap2YtfnAfh0VbvWwV IuxAq5Kz58nCxRzg0LONyNEZsSlk67eLyVDncIcLhr63cdLqHA8SbIL X-Developer-Key: i=thomas@t-8ch.de; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=159.69.126.157; envelope-from=thomas@t-8ch.de; helo=todd.t-8ch.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @t-8ch.de) X-ZM-MESSAGEID: 1716791457505100001 Validate that a shutdown via the pvpanic device emits the correct QMP events. Signed-off-by: Thomas Wei=C3=9Fschuh Reviewed-by: Thomas Huth --- tests/qtest/pvpanic-pci-test.c | 39 +++++++++++++++++++++++++++++++++++++++ tests/qtest/pvpanic-test.c | 29 +++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+) diff --git a/tests/qtest/pvpanic-pci-test.c b/tests/qtest/pvpanic-pci-test.c index b372caf41dc0..dc021c2fdf77 100644 --- a/tests/qtest/pvpanic-pci-test.c +++ b/tests/qtest/pvpanic-pci-test.c @@ -85,11 +85,50 @@ static void test_panic(void) qtest_quit(qts); } =20 +static void test_pvshutdown(void) +{ + uint8_t val; + QDict *response, *data; + QTestState *qts; + QPCIBus *pcibus; + QPCIDevice *dev; + QPCIBar bar; + + qts =3D qtest_init("-device pvpanic-pci,addr=3D04.0"); + pcibus =3D qpci_new_pc(qts, NULL); + dev =3D qpci_device_find(pcibus, QPCI_DEVFN(0x4, 0x0)); + qpci_device_enable(dev); + bar =3D qpci_iomap(dev, 0, NULL); + + qpci_memread(dev, bar, 0, &val, sizeof(val)); + g_assert_cmpuint(val, =3D=3D, PVPANIC_EVENTS); + + val =3D PVPANIC_SHUTDOWN; + qpci_memwrite(dev, bar, 0, &val, sizeof(val)); + + response =3D qtest_qmp_eventwait_ref(qts, "GUEST_PVSHUTDOWN"); + qobject_unref(response); + + response =3D qtest_qmp_eventwait_ref(qts, "SHUTDOWN"); + g_assert(qdict_haskey(response, "data")); + data =3D qdict_get_qdict(response, "data"); + g_assert(qdict_haskey(data, "guest")); + g_assert(qdict_get_bool(data, "guest")); + g_assert(qdict_haskey(data, "reason")); + g_assert_cmpstr(qdict_get_str(data, "reason"), =3D=3D, "guest-shutdown= "); + qobject_unref(response); + + g_free(dev); + qpci_free_pc(pcibus); + qtest_quit(qts); +} + int main(int argc, char **argv) { g_test_init(&argc, &argv, NULL); qtest_add_func("/pvpanic-pci/panic", test_panic); qtest_add_func("/pvpanic-pci/panic-nopause", test_panic_nopause); + qtest_add_func("/pvpanic-pci/pvshutdown", test_pvshutdown); =20 return g_test_run(); } diff --git a/tests/qtest/pvpanic-test.c b/tests/qtest/pvpanic-test.c index ccc603472f5d..d49d2ba9313e 100644 --- a/tests/qtest/pvpanic-test.c +++ b/tests/qtest/pvpanic-test.c @@ -58,11 +58,40 @@ static void test_panic(void) qtest_quit(qts); } =20 +static void test_pvshutdown(void) +{ + uint8_t val; + QDict *response, *data; + QTestState *qts; + + qts =3D qtest_init("-device pvpanic"); + + val =3D qtest_inb(qts, 0x505); + g_assert_cmpuint(val, =3D=3D, PVPANIC_EVENTS); + + qtest_outb(qts, 0x505, PVPANIC_SHUTDOWN); + + response =3D qtest_qmp_eventwait_ref(qts, "GUEST_PVSHUTDOWN"); + qobject_unref(response); + + response =3D qtest_qmp_eventwait_ref(qts, "SHUTDOWN"); + g_assert(qdict_haskey(response, "data")); + data =3D qdict_get_qdict(response, "data"); + g_assert(qdict_haskey(data, "guest")); + g_assert(qdict_get_bool(data, "guest")); + g_assert(qdict_haskey(data, "reason")); + g_assert_cmpstr(qdict_get_str(data, "reason"), =3D=3D, "guest-shutdown= "); + qobject_unref(response); + + qtest_quit(qts); +} + int main(int argc, char **argv) { g_test_init(&argc, &argv, NULL); qtest_add_func("/pvpanic/panic", test_panic); qtest_add_func("/pvpanic/panic-nopause", test_panic_nopause); + qtest_add_func("/pvpanic/pvshutdown", test_pvshutdown); =20 return g_test_run(); } --=20 2.45.1 From nobody Mon Nov 25 08:22:26 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=t-8ch.de ARC-Seal: i=1; a=rsa-sha256; t=1716791415; cv=none; d=zohomail.com; s=zohoarc; b=I6tjoHTq9XpHjuewu0rwVD5jbFJzR9EdwsAanuseCORbzNPmSd6Cr1LyU6QfPDUN3k2K19DDGi5StM6Dw72zAWrFxesaBMZM6n2m5gNRpzD1S7Vp8V81MlM67i/V/SbIeHl13PcLEJt6C5aUBqekZ6mHVGMSf8c8O5f082cVi0s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1716791415; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=CuTUdWVbF2eJJNbIYHGhy0vE6O5R4WDJwC9STxZI+xk=; b=J4eXybJfjYEi9Zs9vhPpYIxl66iX+BDG2XGHtuLvSkUlIpHaqftJNcrv3XkBBTBaR97K97md8jLNl5V8jhm6EYweh9sqJ5MtERhWAV17KhWiCzdmco5qEIH0xya/2qpRmudckiQh5rtZ0Pnat+4w6xmgy0pDMywqJq2CQeWKVjA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 17167914156411020.5014944928541; Sun, 26 May 2024 23:30:15 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sBTqt-0002hi-4f; Mon, 27 May 2024 02:28:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sBTq9-0002Ef-8Q for qemu-devel@nongnu.org; Mon, 27 May 2024 02:28:13 -0400 Received: from todd.t-8ch.de ([159.69.126.157]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sBTq7-0004qB-8V for qemu-devel@nongnu.org; Mon, 27 May 2024 02:28:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=t-8ch.de; s=mail; t=1716791283; bh=1eaMEvqrTr9Qry/T0VQGvj1cGq5NTM5j6w8zUdC8Ums=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=fyjyrEEv9cxcGn7h1MumJ7xsstXiAj60WHVitkAb8Idq+aCZscE2TMmANHBqdlp3l wmiS0jY8FuJNJ3p+FBkpLyIARZvdNZ4gZAjK7ho9bCcUwjuKJp5xyMwrkABl378A71 8rmMtQxboQJWuQf/59/LXnVl8W9E/u7DiT7heMRk= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Mon, 27 May 2024 08:27:54 +0200 Subject: [PATCH v8 8/8] Revert "docs/specs/pvpanic: mark shutdown event as not implemented" MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20240527-pvpanic-shutdown-v8-8-5a28ec02558b@t-8ch.de> References: <20240527-pvpanic-shutdown-v8-0-5a28ec02558b@t-8ch.de> In-Reply-To: <20240527-pvpanic-shutdown-v8-0-5a28ec02558b@t-8ch.de> To: "Michael S. Tsirkin" , Cornelia Huck , Paolo Bonzini , Thomas Huth , Laurent Vivier , Eric Blake , Markus Armbruster Cc: qemu-devel@nongnu.org, Alejandro Jimenez , kvm@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1716791282; l=758; i=thomas@t-8ch.de; s=20221212; h=from:subject:message-id; bh=1eaMEvqrTr9Qry/T0VQGvj1cGq5NTM5j6w8zUdC8Ums=; b=29ddf2XPk6nMBU3TUnSVHLZYxIpTipDvwho24GLV8iag0trjYdFA5GG4iL1dTSu/6fodNc7UA yhtoLIZnGuHAisXJYYWvHogFDJi9cSU6GHJrn0ur1aiebVDFfihVkFJ X-Developer-Key: i=thomas@t-8ch.de; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=159.69.126.157; envelope-from=thomas@t-8ch.de; helo=todd.t-8ch.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @t-8ch.de) X-ZM-MESSAGEID: 1716791426859100003 The missing functionality has been implemented now. This reverts commit e739d1935c461d0668057e9dbba9d06f728d29ec. Signed-off-by: Thomas Wei=C3=9Fschuh --- docs/specs/pvpanic.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/specs/pvpanic.rst b/docs/specs/pvpanic.rst index b0f27860ec3b..61a80480edb8 100644 --- a/docs/specs/pvpanic.rst +++ b/docs/specs/pvpanic.rst @@ -29,7 +29,7 @@ bit 1 a guest panic has happened and will be handled by the guest; the host should record it or report it, but should not affect the execution of the guest. -bit 2 (to be implemented) +bit 2 a regular guest shutdown has happened and should be processed by the host =20 PCI Interface --=20 2.45.1