From patchwork Mon Sep 2 17:01:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleksii Kurochko X-Patchwork-Id: 13787535 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4C684CD3420 for ; Mon, 2 Sep 2024 17:01:41 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.788305.1197800 (Exim 4.92) (envelope-from ) id 1slAQj-0002eN-EH; Mon, 02 Sep 2024 17:01:29 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 788305.1197800; Mon, 02 Sep 2024 17:01:29 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1slAQj-0002eG-Ag; Mon, 02 Sep 2024 17:01:29 +0000 Received: by outflank-mailman (input) for mailman id 788305; Mon, 02 Sep 2024 17:01:28 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1slAQi-0002dz-Cu for xen-devel@lists.xenproject.org; Mon, 02 Sep 2024 17:01:28 +0000 Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [2a00:1450:4864:20::12e]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id fe403d9b-694c-11ef-a0b2-8be0dac302b0; Mon, 02 Sep 2024 19:01:27 +0200 (CEST) Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-53436e04447so4613540e87.1 for ; Mon, 02 Sep 2024 10:01:27 -0700 (PDT) Received: from fedora.. ([94.75.70.14]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-535408410f5sm1677618e87.211.2024.09.02.10.01.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Sep 2024 10:01:25 -0700 (PDT) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: fe403d9b-694c-11ef-a0b2-8be0dac302b0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725296487; x=1725901287; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=b/b1txUous5i+ktHMfo/0HKYCErL3rShkCjh7dtbJiE=; b=Slr/TEIKKoZtE06F88c/dVlFaPvDsezSj4CMJjRqkzpx1K6NqJZHYtrQXcvC/vcxHs Oew/9EEuryjbM4j95lDYSNwqjUkW1Qm+e5/EtTMKRNCzG4GiYXpNXj+7K8DBuy9/G+vK uEr+ZSNkBdPhT9Q0pC1QBHSFEAGsAFFMLBBX4xx1rYFi5smYSkk/nvhjnzWUrevsp4v+ 8qbsLjfWSG+G6nJBTdekTGk0W4+qMuwxl3rR54DJL1K+c1zCsFGO03p5y8nEovbAy1JY GuJlrlgOd9aO8qr9QSlDJm3L+TvsskMsLLSV34umkjyzsgQtpPzqzQHC+WfZ9mnwLfLh DHYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725296487; x=1725901287; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=b/b1txUous5i+ktHMfo/0HKYCErL3rShkCjh7dtbJiE=; b=oyFhxBn7AZOqCMgXc7q3oM1P78RanpsRW4iqITneTf78TaDnqDgmALAcBsMVTjpIFN xi0fUosYPJgyeFn2JL8ehtiQoYjf3Bt7Frn66lZ9lIg433CJwikWmfamk+TJJcLZ4TTp K/lzkU16V9IUrAbWecb5lSwQyjIfgPokH6zuQ6rpEAqtSwTWzFLSvr8HJ+tpA00KVYm8 APtIt6TIHjZAK0xeJnJqKJpWb5KX/nnboeKZAwloGEFqCxdUCwcCnn0BNiuFxwfSP1Gw 1eK3r9tHYYkaVEouBMboWcp4xeCmFPZoBmJFInPQeKtscOlSBUKrG6oCzKFKlNvX5A56 SLAQ== X-Gm-Message-State: AOJu0YxCKEjd76l2rZkLHK1ZM7rtN+ZKnoBK9C4dTmImU4roBeOksrZt 9/GAomJ9oecvcfScyM3M7l3NCLFjz5+kk+P8JhcAeFB5UiuAKWcFJQXVjg== X-Google-Smtp-Source: AGHT+IG8COlsZudurRdZLf0fwMR2oSLrGHdqv2PQP19ChwinCJKmmfDuqTHIs+LY1BCd+RiOlSr0ag== X-Received: by 2002:ac2:4f01:0:b0:533:447b:94f0 with SMTP id 2adb3069b0e04-535462f773emr3845371e87.10.1725296486110; Mon, 02 Sep 2024 10:01:26 -0700 (PDT) From: Oleksii Kurochko To: xen-devel@lists.xenproject.org Cc: Oleksii Kurochko , Alistair Francis , Bob Eshleman , Connor Davis , Andrew Cooper , Jan Beulich , Julien Grall , Stefano Stabellini Subject: [PATCH v6 1/9] xen/riscv: prevent recursion when ASSERT(), BUG*(), or panic() are called Date: Mon, 2 Sep 2024 19:01:14 +0200 Message-ID: <3d32a952c7cc77fd759e211c3b60427485a75582.1725295716.git.oleksii.kurochko@gmail.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: References: MIME-Version: 1.0 Implement machine_restart() using printk() to prevent recursion that occurs when ASSERT(), BUG*(), or panic() are invoked. All these macros (except panic() which could be called directly) eventually call panic(), which then calls machine_restart(), leading to a recursive loop. Signed-off-by: Oleksii Kurochko --- Changes in v6: - new patch. --- xen/arch/riscv/stubs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/riscv/stubs.c b/xen/arch/riscv/stubs.c index 3285d18899..144f1250e1 100644 --- a/xen/arch/riscv/stubs.c +++ b/xen/arch/riscv/stubs.c @@ -53,7 +53,7 @@ void domain_set_time_offset(struct domain *d, int64_t time_offset_seconds) void machine_restart(unsigned int delay_millisecs) { - BUG_ON("unimplemented"); + printk("%s: unimplemented\n", __func__); } void machine_halt(void)