From patchwork Fri Dec 22 15:13:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleksii X-Patchwork-Id: 13503455 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 99203C41535 for ; Fri, 22 Dec 2023 15:22:45 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.659519.1029219 (Exim 4.92) (envelope-from ) id 1rGhMD-0004i0-M8; Fri, 22 Dec 2023 15:22:37 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 659519.1029219; Fri, 22 Dec 2023 15:22:37 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rGhMD-0004ht-Ie; Fri, 22 Dec 2023 15:22:37 +0000 Received: by outflank-mailman (input) for mailman id 659519; Fri, 22 Dec 2023 15:22:37 +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 1rGhDi-0007Ie-Hb for xen-devel@lists.xenproject.org; Fri, 22 Dec 2023 15:13:50 +0000 Received: from mail-lj1-x231.google.com (mail-lj1-x231.google.com [2a00:1450:4864:20::231]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id b519b854-a0dc-11ee-98eb-6d05b1d4d9a1; Fri, 22 Dec 2023 16:13:48 +0100 (CET) Received: by mail-lj1-x231.google.com with SMTP id 38308e7fff4ca-2cc9b31a27bso23537211fa.3 for ; Fri, 22 Dec 2023 07:13:48 -0800 (PST) Received: from fedora.. ([94.75.70.14]) by smtp.gmail.com with ESMTPSA id j7-20020a056512108700b0050e6df07728sm45983lfg.180.2023.12.22.07.13.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Dec 2023 07:13:47 -0800 (PST) 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: b519b854-a0dc-11ee-98eb-6d05b1d4d9a1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703258028; x=1703862828; 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=iERJyBx2zMVd360kKc+64bkAZfqJHhsH6Dyb71/j52s=; b=lpW5iBbGPGBe8aLwrbtplCJn+VbwEn9UvWXayFFBFdJMoxk1QV+34671A8HGV2aMzA YXUvJEQGoARfqzM2T0ULoS7YhiUZ4BRt3T8y8jrQJAsWAMGSiwV8F5rXdk1bL9VsTjZp NNPoU4SRjt+cnCUvxYwGY9f5/TnPxEQCo+26wjYM2wQ/2qfRF3TGU4i/RNRsDyRpAMZE SLD0RoaXUXqfB064HzxpZ0N0y+KgmxWhOJFMRM5n4GjvaGFSGKovUU8PJkWN8wk8Occb 8qsS9ZG4WnaYIZ3zMGVq5O4WX5DB+L+7a+gwtClMSZICxdpnRIr4Tsa5QV69DICbvbJo 9XJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703258028; x=1703862828; 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=iERJyBx2zMVd360kKc+64bkAZfqJHhsH6Dyb71/j52s=; b=MZfhe8659YumzskbeqM5Q8rHY2kSFpQtlyZGtvoE8cSP9MuGAhZGOC9c/aheRIEYg+ W4MKQMz0bGRHWsznMHKiHMD7RghTef+JJDAQh49Chxwy/RjMuxW5YY6bMBkxt4Pzs+/J l+Ddn7XTiS0gqnlND+bra2G2ksJJgU3gwFqBu6yPmxXEDqAAarPqvVyGbwFpA/4+v1mo f36EJSiIfyXakM+e9P0LO0l9EpzcMClveLdKVKXM5RxMVieHdU4Fbk5TBDhml0ltTkbq vDLe9SFiixiQeSZg5H7vF4N1TSxVXqjEkmrJcXfEy+ZSDWKHpyT2HIF/b4pkqF13EsHK DUmQ== X-Gm-Message-State: AOJu0YwB8IannZJ8NLXKFQeOYLMFLSWNC2PjRPmdbrVe+/V8ZNa8v9ir 87OJ7kwG4X6ADmkn2jxmvOh5Y7irQx8= X-Google-Smtp-Source: AGHT+IHNxMCwb10deT2JxAljJ2aSodr2v2rO1rU8SU44/5s1W0y/552HAFefOab01+7bbyoHQhsDfw== X-Received: by 2002:ac2:4a67:0:b0:50e:6d96:4b28 with SMTP id q7-20020ac24a67000000b0050e6d964b28mr203058lfp.137.1703258027760; Fri, 22 Dec 2023 07:13:47 -0800 (PST) From: Oleksii Kurochko To: xen-devel@lists.xenproject.org Cc: Oleksii Kurochko , Alistair Francis , Bob Eshleman , Connor Davis , Andrew Cooper , George Dunlap , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu Subject: [PATCH v3 22/34] xen/riscv: introduce regs.h Date: Fri, 22 Dec 2023 17:13:06 +0200 Message-ID: <3d1ae540120804af5fc812a1492931afac66bd39.1703255175.git.oleksii.kurochko@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 Signed-off-by: Oleksii Kurochko --- Changes in V3: - update the commit message - add Acked-by: Jan Beulich - remove "include " and use a forward declaration instead. --- Changes in V2: - change xen/lib.h to xen/bug.h - remove unnecessary empty line --- xen/arch/riscv/include/asm/regs.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 xen/arch/riscv/include/asm/regs.h diff --git a/xen/arch/riscv/include/asm/regs.h b/xen/arch/riscv/include/asm/regs.h new file mode 100644 index 0000000000..86bebc5810 --- /dev/null +++ b/xen/arch/riscv/include/asm/regs.h @@ -0,0 +1,29 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +#ifndef __ARM_RISCV_REGS_H__ +#define __ARM_RISCV_REGS_H__ + +#ifndef __ASSEMBLY__ + +#include + +#define hyp_mode(r) (0) + +struct cpu_user_regs; + +static inline bool guest_mode(const struct cpu_user_regs *r) +{ + BUG(); +} + +#endif /* __ASSEMBLY__ */ + +#endif /* __ARM_RISCV_REGS_H__ */ + +/* + * Local variables: + * mode: C + * c-file-style: "BSD" + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + */