From nobody Mon Feb 9 18:48:27 2026 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=1674226838; cv=none; d=zohomail.com; s=zohoarc; b=JdWQ5mM0aFg/26y0/1ywufC9uHc9zli6lpc7tCwxwCw2ofis8r6Y5gNpl0MdlBA5OVBhRDh4LsvZHVIe4jO9fm5/lo8UyeNlwfs3N/rWN+jVlOZeMl/QEkQowa+BmghwxWv7Vtr9cD/GCchsV0MXXnr/jsvArzdIR6fz1VrzrjM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1674226838; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=SUG1QTMGPWyaQd+Wzg6VRLvIzEpGSEc+bJIbP4HX+Ac=; b=UBaleK8R/tL1RyUpVyVhTZGlB3Zkje9F2p9oFrBvyhSngy2H8WB7PheUYvFQuuH09Atf2iF3R1ORKcdZjlX8T3+nMW8eJfwE7JuYoZ1Uc/vjt2lRMjW2DcL75hc6zdmg8LCy81LwmaFyU/cDTtdP50nErli+FqWyY73QPpYhQYs= 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 1674226838472634.0568061274716; Fri, 20 Jan 2023 07:00:38 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.481864.747128 (Exim 4.92) (envelope-from ) id 1pIssO-0000lp-AV; Fri, 20 Jan 2023 15:00:20 +0000 Received: by outflank-mailman (output) from mailman id 481864.747128; Fri, 20 Jan 2023 15:00:20 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1pIssN-0000hO-C7; Fri, 20 Jan 2023 15:00:19 +0000 Received: by outflank-mailman (input) for mailman id 481864; Fri, 20 Jan 2023 15:00:17 +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 1pIssK-0006Kg-SR for xen-devel@lists.xenproject.org; Fri, 20 Jan 2023 15:00:16 +0000 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [2a00:1450:4864:20::42d]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 26156ae8-98d3-11ed-91b6-6bf2151ebd3b; Fri, 20 Jan 2023 16:00:16 +0100 (CET) Received: by mail-wr1-x42d.google.com with SMTP id d14so1414359wrr.9 for ; Fri, 20 Jan 2023 07:00:16 -0800 (PST) Received: from localhost.localdomain (lfbn-gre-1-240-53.w90-112.abo.wanadoo.fr. [90.112.199.53]) by smtp.gmail.com with ESMTPSA id o2-20020a5d58c2000000b002bdbead763csm25349811wrf.95.2023.01.20.07.00.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Jan 2023 07:00:15 -0800 (PST) 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: 26156ae8-98d3-11ed-91b6-6bf2151ebd3b DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=SUG1QTMGPWyaQd+Wzg6VRLvIzEpGSEc+bJIbP4HX+Ac=; b=BUzCp98P2KOhLr2xTPj8dfCxehOuf8RpFf/IIH+m9Dvk9buBG26N+OEouINtD4tWKx BNBHn3E1J49dz8d0SE+6SOV+Ayp1vswtlZkrdE5xMNuCXjuSnY8RiiIOs0DZuvnmuBc+ Q9eIjCj72Ol/NRq0g1hsjBCH5mi9pY4gWd9YowkeNaAExQHiRc4iajd1+mmyatXi4E5N 2cohliapAgw23gsVY9tNQJakdH2QxVGKwHn2xxsE5z59y1F9l7kHgg0JaAM2+1yYkOCx 6sGxWGLM5b+Ly0ebXvTRuPl5q5q6jhrAEk66iQ3rO09Rk9Ocsvn6qw8gXlKal6KAuY1h LhPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=SUG1QTMGPWyaQd+Wzg6VRLvIzEpGSEc+bJIbP4HX+Ac=; b=YTpzHGPDRO3dNEmqY+gP1aEiMdwHjc7UazK1yP54ZTp5PqzxnO1LOL89s+13o2OS2K zxHiYyTVXQOsGo79S/L9o9MhPHPX819NubQdU196b/lSj+m3hZ8/b0T1Ql92s9aEgjRw JH+JLCC11vOyDy+3L3SkLPKVnfoAM0xXxxsPPUIMhbxv2QkVaJ5CLdyrE8yVFTchVo4C 738e+9NtOZtHu89tPS0fxE480BbNe0vb77Disg6T9gt999k8LQDrSXOBIfBdgYoyDk2s YR+alN04O2Cs2bcRlI1e6SBWNFft5cyuR3A/Oq82jLntZVk2zh5gCTbX/qZBoQksGqlA woKw== X-Gm-Message-State: AFqh2kptdI9njuhyWkhtLSVy9w5gLkKHKRH+Vt3Cd666IqFTAh0ulaoz VR+idJ2TauhA18uUrA08TvB9qOxXmx7GPA== X-Google-Smtp-Source: AMrXdXsikABfoFsOfWXV3DcSlpLN++qeOfD9vBk6m7CYBLT/K/Rzbxd8OY/6qrcT/YvP8Yw90QI3Ew== X-Received: by 2002:a5d:68c9:0:b0:24f:11eb:2988 with SMTP id p9-20020a5d68c9000000b0024f11eb2988mr14058938wrw.71.1674226815692; Fri, 20 Jan 2023 07:00:15 -0800 (PST) From: Oleksii Kurochko To: xen-devel@lists.xenproject.org Cc: Andrew Cooper , Stefano Stabellini , Gianluca Guida , Oleksii Kurochko , Bob Eshleman , Alistair Francis , Connor Davis Subject: [PATCH v1 13/14] xen/riscv: test basic handling stuff Date: Fri, 20 Jan 2023 16:59:53 +0200 Message-Id: <10254478415a1417872a5c89cba1811b6483fd78.1674226563.git.oleksii.kurochko@gmail.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1674226839507100009 Content-Type: text/plain; charset="utf-8" Signed-off-by: Oleksii Kurochko --- xen/arch/riscv/setup.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/xen/arch/riscv/setup.c b/xen/arch/riscv/setup.c index 174e134c93..35ab9d25c6 100644 --- a/xen/arch/riscv/setup.c +++ b/xen/arch/riscv/setup.c @@ -1,6 +1,7 @@ #include #include =20 +#include #include #include #include @@ -15,12 +16,27 @@ static void setup_trap_handler(void) csr_write(CSR_STVEC, addr); } =20 +static void test_run_in_exception(struct cpu_user_regs *regs) +{ + early_printk("If you see this message, "); + early_printk("run_in_exception_handler is most likely working\n"); +} + +static void test_macros_from_bug_h(void) +{ + run_in_exception_handler(test_run_in_exception); + WARN(); + early_printk("If you see this message, "); + early_printk("WARN is most likely working\n"); +} + void __init noreturn start_xen(void) { early_printk("Hello from C env\n"); =20 setup_trap_handler(); - early_printk("exception handler has been setup\n"); + + test_macros_from_bug_h(); =20 for ( ;; ) asm volatile ("wfi"); --=20 2.39.0