From nobody Sat Nov 9 16:27:49 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1725296510; cv=none; d=zohomail.com; s=zohoarc; b=VqYX27sPZHyP8IyiheF3QEUeKkHsUVP0+ScGQdND46YOb9pP1Buebq7iglUY4tvgK7f2hTAUpdYVTMlnL8ci9qPwXpchIWSv7uaee4d2wYrL++NX+0yddsBNRfAO6/kxQyDAGz6sTDo6/gSZYpittoNT1MTMMaBYMPwYdHtQbQ8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1725296510; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=b/b1txUous5i+ktHMfo/0HKYCErL3rShkCjh7dtbJiE=; b=cHgrrbC51iyNSj0nHG4lrJcLaEduZ3VVDUcCuDy+VnvhPD06nmsoqGMSX9LlD5IEL5v/qBLSHX3AE8EkyROjsFfWr3BZ1GGqUDzN269nRXNbFnnn/0I5U0vAmkAHLQ1FDyyXDy9tjjuun7uCIf+wGkI3PDZDdP33eK4mfAqY25s= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1725296510886993.5135633231483; Mon, 2 Sep 2024 10:01:50 -0700 (PDT) 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 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-Outflank-Mailman: Message body and most headers restored to incoming version 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 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1725296512158116600 Content-Type: text/plain; charset="utf-8" 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 tim= e_offset_seconds) =20 void machine_restart(unsigned int delay_millisecs) { - BUG_ON("unimplemented"); + printk("%s: unimplemented\n", __func__); } =20 void machine_halt(void) --=20 2.46.0