From nobody Tue Jul 14 13:55:43 2026 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DBCCE60DEC for ; Wed, 13 Mar 2024 18:19:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=159.69.126.157 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710353993; cv=none; b=LWMLl1ldE0FkV7N/lb6D4pnFoi7ifMXPoEuqBZi79sZAK3jlVsSav4AWaSClRqtO5l1+8cZGwm8LsHptpGLznmD+I82lkIxtz+ZNCS0C7jPjG31+hfVr3I2IxTcJx5pW0+RqFm9VsAraen0orZuDFWOXtMBW9lhn0Zw9lShtX+8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710353993; c=relaxed/simple; bh=KCFc7PDUBA25mdcJlQ6DeNsE8GXrWSpFQMSgo+06cRY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To; b=AETkikd7SwcJXhPd6PGr6tkW3SencthFaihPq2EUgoxHt+Rz13nEToesktZeWDD/L1O6tRJLKGTM/kdzQ3VxRPtNPR4R9ibgiv9ieb0fQk75dmzXmg9foHHlm6Lhlfa0+I/FR9eSFJPvb8z2b3Al47w8MBi8pXAJXX/zh2c8+24= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=weissschuh.net; spf=pass smtp.mailfrom=weissschuh.net; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b=eJQ4wG9F; arc=none smtp.client-ip=159.69.126.157 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="eJQ4wG9F" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1710353981; bh=KCFc7PDUBA25mdcJlQ6DeNsE8GXrWSpFQMSgo+06cRY=; h=From:Date:Subject:References:In-Reply-To:To:From; b=eJQ4wG9FQAFO6D1MQG0303ZbPcTX4fcJL+NfI8N8fUaxkVAMFBShC4nfXfWy2nHiT QGXJ4+eXdSVUtCzAT7PeK79AZvvWUpCStS8cIi5FIwV0fCdyC4v0Go8+Xvy5k5XjBC +htt077M+2cGaUmslhVxxD7ycMUJipvf2D3fyOeg= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Wed, 13 Mar 2024 19:19:30 +0100 Subject: [PATCH 1/2] misc/pvpanic: use bit macros Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20240313-pvpanic-shutdown-header-v1-1-7f1970d66366@weissschuh.net> References: <20240313-pvpanic-shutdown-header-v1-0-7f1970d66366@weissschuh.net> In-Reply-To: <20240313-pvpanic-shutdown-header-v1-0-7f1970d66366@weissschuh.net> To: linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Arnd Bergmann , "Michael S. Tsirkin" , =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1710353980; l=811; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=KCFc7PDUBA25mdcJlQ6DeNsE8GXrWSpFQMSgo+06cRY=; b=duUiqTbuq/rfxkKHUsvdoNJfjH5RaaDlXZN4w7gL9ddd+7g1LWuBq2xUVJ2/R7umzZimZhy7P 8OxPKw47nuNA3nIYB76zmoy4sU7qdm45KqlYbKxTmnD5UdyHlz/F2rD X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= The macros are easier to read. Suggested-by: Greg Kroah-Hartman Link: https://lore.kernel.org/lkml/2023110407-unselect-uptight-b96d@gregkh/ Signed-off-by: Thomas Wei=C3=9Fschuh --- include/uapi/misc/pvpanic.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/uapi/misc/pvpanic.h b/include/uapi/misc/pvpanic.h index 54b7485390d3..9ea6a965ca7a 100644 --- a/include/uapi/misc/pvpanic.h +++ b/include/uapi/misc/pvpanic.h @@ -3,7 +3,9 @@ #ifndef __PVPANIC_H__ #define __PVPANIC_H__ =20 -#define PVPANIC_PANICKED (1 << 0) -#define PVPANIC_CRASH_LOADED (1 << 1) +#include + +#define PVPANIC_PANICKED _BITUL(0) +#define PVPANIC_CRASH_LOADED _BITUL(1) =20 #endif /* __PVPANIC_H__ */ --=20 2.44.0 From nobody Tue Jul 14 13:55:43 2026 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DBD1360DED for ; Wed, 13 Mar 2024 18:19:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=159.69.126.157 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710353993; cv=none; b=mg7virp1X6Y2EP5d+aEPdkkw7FwuN+ok50Bu16FbWN/sko1fOkFUnQvJjL1JcIDy/hOaNVc7x1oPWUBL/bEE5+GCfeu3aapCd68S3m8HDOCHf3rxjsxVZcI5arUNvF6MthRCIIZNFRjMPLFxWXapUOYKm1m7wP9zb6JNJCqbJ3s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710353993; c=relaxed/simple; bh=i7kOt8c8LpYV3x34x7AxgcypS59Vl+cqgeoPtfOs/7I=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To; b=ZglsK0MEnrTMpawapkw45Gcbk9F1ZRl6u46768gjz1JHqM2uJPIfIDnsknBIm9yYRiRwICznRXvrwU6Nd+X3mEeMchXF5EGeq8WqrHbC2Uq2ViwShBj5tL0dk7xRG1OiXwXFwUt2b3q2wmYp9+pB6qWYd2bU627/O1pgsRj647w= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=weissschuh.net; spf=pass smtp.mailfrom=weissschuh.net; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b=SecEYsio; arc=none smtp.client-ip=159.69.126.157 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="SecEYsio" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1710353981; bh=i7kOt8c8LpYV3x34x7AxgcypS59Vl+cqgeoPtfOs/7I=; h=From:Date:Subject:References:In-Reply-To:To:From; b=SecEYsioM6Wb4/4J7jfRnmsaKS5bUD4C1UazeQWwkbczrwj1z6FXAVl86AmQr4cUS izWFue0QtZFQGaptH7mEC3htXP8IdTqMHc5rMp5cyXPw5MsRyOW4aqCvX7mVW2U50j O9Cxk7KM7iNtV4R26HCQXWZUK1z7rUvEwHfBJrIQ= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Wed, 13 Mar 2024 19:19:31 +0100 Subject: [PATCH 2/2] misc/pvpanic: add shutdown event definition Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20240313-pvpanic-shutdown-header-v1-2-7f1970d66366@weissschuh.net> References: <20240313-pvpanic-shutdown-header-v1-0-7f1970d66366@weissschuh.net> In-Reply-To: <20240313-pvpanic-shutdown-header-v1-0-7f1970d66366@weissschuh.net> To: linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Arnd Bergmann , "Michael S. Tsirkin" , =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1710353980; l=864; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=i7kOt8c8LpYV3x34x7AxgcypS59Vl+cqgeoPtfOs/7I=; b=Ka2KB3sIKOuE2KN34edSJzQYgJkwt/7L+sJL364wy+4M7EMmb573aNzLYTgrlB2hJRXwIg1+x v/IMP7Sc/8oDTgvh12UFHq6woEMDfuXjbD5xj+3B3gnz7jH6PJOCST7 X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= 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. The event was added to the specification in qemu commit 73279cecca03 ("docs/specs/pvpanic: document shutdown event"). Signed-off-by: Thomas Wei=C3=9Fschuh Acked-by: Arnd Bergmann --- include/uapi/misc/pvpanic.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/uapi/misc/pvpanic.h b/include/uapi/misc/pvpanic.h index 9ea6a965ca7a..3f1745cd1b52 100644 --- a/include/uapi/misc/pvpanic.h +++ b/include/uapi/misc/pvpanic.h @@ -7,5 +7,6 @@ =20 #define PVPANIC_PANICKED _BITUL(0) #define PVPANIC_CRASH_LOADED _BITUL(1) +#define PVPANIC_SHUTDOWN _BITUL(2) =20 #endif /* __PVPANIC_H__ */ --=20 2.44.0