From patchwork Wed Aug 16 10:19:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleksii Kurochko X-Patchwork-Id: 13354886 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 A8696C001B0 for ; Wed, 16 Aug 2023 10:32:11 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.584485.915304 (Exim 4.92) (envelope-from ) id 1qWDoq-0002tb-46; Wed, 16 Aug 2023 10:32:04 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 584485.915304; Wed, 16 Aug 2023 10:32:04 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qWDoq-0002tG-03; Wed, 16 Aug 2023 10:32:04 +0000 Received: by outflank-mailman (input) for mailman id 584485; Wed, 16 Aug 2023 10:32:02 +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 1qWDdh-0003R9-6r for xen-devel@lists.xenproject.org; Wed, 16 Aug 2023 10:20:33 +0000 Received: from mail-lj1-x232.google.com (mail-lj1-x232.google.com [2a00:1450:4864:20::232]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 8833f6bc-3c1e-11ee-8779-cb3800f73035; Wed, 16 Aug 2023 12:20:32 +0200 (CEST) Received: by mail-lj1-x232.google.com with SMTP id 38308e7fff4ca-2b9aa1d3029so98868091fa.2 for ; Wed, 16 Aug 2023 03:20:32 -0700 (PDT) Received: from 192.168.1.26 ([151.25.98.127]) by smtp.gmail.com with ESMTPSA id g5-20020adfe405000000b0031773a8e5c4sm20877843wrm.37.2023.08.16.03.20.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Aug 2023 03:20:31 -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: 8833f6bc-3c1e-11ee-8779-cb3800f73035 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692181232; x=1692786032; 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=to9zcOK1uQRDwQjF/M/tIQG/U0cMxLKxzsy4fRBRfDU=; b=E/SkYn6JS5y2h9erhRN7GuzfaZPZvlSz7O+us2U9ZQWrFmFClCyA/ZEzFB9KtTV+gc xIL+8KDj6VgkUQdMUQ+6j6lAQvbMDjPzhSwjaw50nipfQeNvEtQ20pvk+8VzXVgve/Qf cvb4ifB9PcMX8jZgzLkLCttfLoTfOsYKcM8GpHOhpA0+Y4pALs+il7LnzDa73UNjgxJT 0p5VG5kuoAezg3laJhfAEIxgSKJKTHHn5VupFvMuhf7Q2LVtXog4kuJ/27uZmh5G9o1n NDsViSQBUYEga8TA2/2EkWbQOKbMtCDh2Ldkd5J1PRgvP7+xxosesNf8pb+I5xDDWzO4 4znQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692181232; x=1692786032; 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=to9zcOK1uQRDwQjF/M/tIQG/U0cMxLKxzsy4fRBRfDU=; b=YIAovolP0W9+UF36KQxuxMEGdKtP+KLDaoOLz8OOMY75eEum+pq00rGLokINv3MXOa /o0aKGwJBlVP3KpflZCSayZ9noaqN+7I8UCWwsmBU4Cgfw0XIY8Oh7fsbYdAOTspDvNJ C7dS1yF6yg0j+4amRXUggy2aZUXlq7x/iw6EEHSijkrqDj1CwdecHME/tN7FASKJqAh6 CknlcEAAcomt7gqsLs5jzDqZJElkCVW0xWMEgcMPQjSGdsvHl3qvcGCoW3RSL8Vo+fCa 2xzE206haB1cRyggo9lAlrbfICwIXoCfsy5W/4NVLQ6TWZRXGV3LaEMm4u54F4EFxsUv VH5A== X-Gm-Message-State: AOJu0YwngIAstI6koJGOcyVY+CxmGkDUDeZBDJy035WRftyGtrATkbnQ duvBXmo5VJQ5F9I5EVxwjO4WL9DOEM4Y147Y X-Google-Smtp-Source: AGHT+IH7otoSQb845MxNmPIX62JECiy3MDCFipeqXO7rEA45lKn8GY8u8k+tLCi0JXR8QAaQ3TuZOg== X-Received: by 2002:a2e:9591:0:b0:2b9:cb50:c1f9 with SMTP id w17-20020a2e9591000000b002b9cb50c1f9mr1120790ljh.32.1692181231727; Wed, 16 Aug 2023 03:20:31 -0700 (PDT) From: Oleksii Kurochko To: xen-devel@lists.xenproject.org Cc: Oleksii Kurochko , Bob Eshleman , Alistair Francis , Connor Davis Subject: [PATCH v1 21/56] xxen/riscv: introduce asm/xenoprof.h Date: Wed, 16 Aug 2023 13:19:32 +0300 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Signed-off-by: Oleksii Kurochko --- xen/arch/riscv/include/asm/xenoprof.h | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 xen/arch/riscv/include/asm/xenoprof.h diff --git a/xen/arch/riscv/include/asm/xenoprof.h b/xen/arch/riscv/include/asm/xenoprof.h new file mode 100644 index 0000000000..e3fc625932 --- /dev/null +++ b/xen/arch/riscv/include/asm/xenoprof.h @@ -0,0 +1,4 @@ +#ifndef __ASM_RISCV_XENOPROF_H__ +#define __ASM_RISCV_XENOPROF_H__ + +#endif /* __ASM_RISCV_XENOPROF_H__ */ \ No newline at end of file From patchwork Wed Aug 16 10:19:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleksii Kurochko X-Patchwork-Id: 13354877 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 BCC6CC001B0 for ; Wed, 16 Aug 2023 10:31:22 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.584444.915194 (Exim 4.92) (envelope-from ) id 1qWDnu-0004Jd-AQ; Wed, 16 Aug 2023 10:31:06 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 584444.915194; Wed, 16 Aug 2023 10:31:06 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qWDnu-0004JQ-5R; Wed, 16 Aug 2023 10:31:06 +0000 Received: by outflank-mailman (input) for mailman id 584444; Wed, 16 Aug 2023 10:31:04 +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 1qWDdo-0003R9-6Q for xen-devel@lists.xenproject.org; Wed, 16 Aug 2023 10:20:40 +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 8c5df3f5-3c1e-11ee-8779-cb3800f73035; Wed, 16 Aug 2023 12:20:39 +0200 (CEST) Received: by mail-lj1-x231.google.com with SMTP id 38308e7fff4ca-2b9d07a8d84so101385581fa.3 for ; Wed, 16 Aug 2023 03:20:39 -0700 (PDT) Received: from 192.168.1.26 ([151.25.98.127]) by smtp.gmail.com with ESMTPSA id g5-20020adfe405000000b0031773a8e5c4sm20877843wrm.37.2023.08.16.03.20.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Aug 2023 03:20:38 -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: 8c5df3f5-3c1e-11ee-8779-cb3800f73035 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692181239; x=1692786039; 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=1LCHRZgc+hBy0s0HZAJ5FU9CXl325alrh/h/y5fRpu8=; b=HCOYwN5QwnAk9n9txQ71i1zzvI+5FPCZe4HVXbwPsGrWlz7KhgPvQqLdTGRxTOBGXp SOwh8Ojv0RBdcQKR/SPm8GvzZ8uLUrzn1tHDQGAwrziMbE/jJELl/PgfyIazG/RdHqtM q2bbgkJnzGWz1TJVq1bLVC6PIH6H/+QTnktXL0ffCoNkDDXvSumYqo2jgWlcngQiSar1 y0+1tREhOMo5cpWWFDg+/4gNmny+h4vMkQhh0MqSxawz96cbK73HNkMDT5fMbMT39rBf pTjaucez68ob3wzWHu4nHD0TJamv00vkJrjLljgce9KVlMTsD785zex7hmGTwcBhNQOZ dSgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692181239; x=1692786039; 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=1LCHRZgc+hBy0s0HZAJ5FU9CXl325alrh/h/y5fRpu8=; b=MBYdT88SLIRBH3ZCx5chP1qJ6JK8+hzkJejJVkYeh3DRKkTbDyda+OZvLOj491sayc a564Wg5FWBXvDES4kw8l91VQuZ+wFT3vXvFKVm6kxSgLi5zXGeEZt1zN5sRzoIIKR0KN UDUan+hAUkPsBpgXUdfXPV+ZYkpQXgX9eV07HlWDdqMjTAc6eKA7NfaGXainoS9Zesi1 Q61On97fDy+aFQdJ5KenqrPHLq8xoKexEM+7hQ9IPM0+4NFdPcE4rc6nBOdUlChdhjZM CD5Dnmlkee/gNMHEhjQ04fnoZwzGe7TYuplrr12IqGAsTt1l1D0tamKo+2In3rLGHjGc 0k/A== X-Gm-Message-State: AOJu0YylXPUOsmCetMhhycwFkbNQ6Ph9Xt8q0s/kJQ+12b+1NRqQ8HxU pFCWBbEZEm/npW6v+OGvJPseOu33D2bWuiJc X-Google-Smtp-Source: AGHT+IG39bsuDoglkMGjOOfoVa1/5SZpxRN/EtmpU69vaK33fvCzzUTYk3ADgyUhW0SL2+AjVkappg== X-Received: by 2002:a2e:3a05:0:b0:2b7:b9ca:3eda with SMTP id h5-20020a2e3a05000000b002b7b9ca3edamr1176467lja.34.1692181238813; Wed, 16 Aug 2023 03:20:38 -0700 (PDT) From: Oleksii Kurochko To: xen-devel@lists.xenproject.org Cc: Oleksii Kurochko , Bob Eshleman , Alistair Francis , Connor Davis Subject: [PATCH v1 29/56] xxen/riscv: introduce asm/hardirq.h Date: Wed, 16 Aug 2023 13:19:41 +0300 Message-ID: <94e7437392b5a77d58a91727b36eaf8c49c55cb3.1692166745.git.oleksii.kurochko@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Signed-off-by: Oleksii Kurochko --- xen/arch/riscv/include/asm/hardirq.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 xen/arch/riscv/include/asm/hardirq.h diff --git a/xen/arch/riscv/include/asm/hardirq.h b/xen/arch/riscv/include/asm/hardirq.h new file mode 100644 index 0000000000..467421849a --- /dev/null +++ b/xen/arch/riscv/include/asm/hardirq.h @@ -0,0 +1,26 @@ +#ifndef __ASM_RISCV_HARDIRQ_H +#define __ASM_RISCV_HARDIRQ_H + +#include + +typedef struct { + unsigned long __softirq_pending; + unsigned int __local_irq_count; +} __cacheline_aligned irq_cpustat_t; + +#include /* Standard mappings for irq_cpustat_t above */ + +#define in_irq() (local_irq_count(smp_processor_id()) != 0) + +#define irq_enter() (local_irq_count(smp_processor_id())++) +#define irq_exit() (local_irq_count(smp_processor_id())--) + +#endif /* __ASM_RISCV_HARDIRQ_H */ +/* + * Local variables: + * mode: C + * c-file-style: "BSD" + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + */ From patchwork Wed Aug 16 10:19:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleksii Kurochko X-Patchwork-Id: 13354897 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 93954C001B0 for ; Wed, 16 Aug 2023 10:32:32 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.584503.915384 (Exim 4.92) (envelope-from ) id 1qWDpA-0006Oi-JJ; Wed, 16 Aug 2023 10:32:24 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 584503.915384; Wed, 16 Aug 2023 10:32:24 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qWDpA-0006OF-Dt; Wed, 16 Aug 2023 10:32:24 +0000 Received: by outflank-mailman (input) for mailman id 584503; Wed, 16 Aug 2023 10:32:22 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qWDe7-0003RA-2L for xen-devel@lists.xenproject.org; Wed, 16 Aug 2023 10:20:59 +0000 Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [2a00:1450:4864:20::432]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 9233a5c8-3c1e-11ee-9b0c-b553b5be7939; Wed, 16 Aug 2023 12:20:49 +0200 (CEST) Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-313e742a787so3761072f8f.1 for ; Wed, 16 Aug 2023 03:20:49 -0700 (PDT) Received: from 192.168.1.26 ([151.25.98.127]) by smtp.gmail.com with ESMTPSA id g5-20020adfe405000000b0031773a8e5c4sm20877843wrm.37.2023.08.16.03.20.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Aug 2023 03:20:48 -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: 9233a5c8-3c1e-11ee-9b0c-b553b5be7939 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692181249; x=1692786049; 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=UhVaJsx3fNfOUNl1yWvqQESfQK08auimEtxKys9/b3Y=; b=JC4TPk81aLOd+hkh3iNe5mPl+BfBozxIY4YaIwhCRZO1hPY8+2e8AxgEWiWjsD3uU0 N3WqZJb1TkdpcHVQVKUS8z4qhcvi4kIzUymxYb5teeXJjIz4ILxUw2Ros1Glb4/pGOYY hK59Gmi506ZlLxwZYUMYY/2BqVsV9ZvJhvobJ3fdw5yTfexoezNyHNRm7kTIS8/jlQlI NEDknAgYbvvEbSQ/RmUpl8mPJsPgoJRGjmuGFmB6ZxJot73SN9/Gx6BEhiGDBDUAadmq WKCZ3gC8nHVNNc3J0jvHqGgwXCCUEUvXPb1IypikqDzi/5pqIofKJJt6cjVMpkQJ0NEl yJCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692181249; x=1692786049; 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=UhVaJsx3fNfOUNl1yWvqQESfQK08auimEtxKys9/b3Y=; b=U7RFBsVWrGNyW9V78TATBEJcM41SWpDiWE73qBztkQ7WkauWuHHObCIQxsZoTelQRQ sTrXvCXlGOUqdjViQ4MEIkRJIJUY9r0aOOnGD9UNMkrOB6YbDKptyB2RycJsEnnrKd0c xq4xNXc7WTRQDADhMHiOpI5hipolshfAKeehcmUX3TxwCiYRlZZ6Q6j11FRqczEb5FG/ NN1wzLpPIUFSgA6msycLUS8a0EU+nn3sJAw/m2m3fhKKXxuJpwpFguh8mOCDJW0EcnYl IN6BGzohyktHqtPlKUInu7tTYsovj5Chy9ePKVMKAp9bErpx+aGIl1K9UKVoZG0yFGCL WUfQ== X-Gm-Message-State: AOJu0YwNOzCibTQ7OPq8YITdd1itb5ojXgTjYNkQ+IeAAVNydlabUZyN p4tZbNlZAs3ArspAvlIt76ELXwiCUQg8lsk9 X-Google-Smtp-Source: AGHT+IFfJtCy1Fkamcn0KSu66ACznZ978fDnS9ESdr67RY942n0wh7lTwCYMq0YFVJb/d/l3zXuN1Q== X-Received: by 2002:adf:d0ce:0:b0:317:e68f:e1af with SMTP id z14-20020adfd0ce000000b00317e68fe1afmr3367939wrh.20.1692181248898; Wed, 16 Aug 2023 03:20:48 -0700 (PDT) From: Oleksii Kurochko To: xen-devel@lists.xenproject.org Cc: Oleksii Kurochko , Bob Eshleman , Alistair Francis , Connor Davis Subject: [PATCH v1 41/56] xxen/riscv: introduce asm/regs.h Date: Wed, 16 Aug 2023 13:19:54 +0300 Message-ID: <55f14a7517b8b7492e3c91304a04c1811914bd12.1692166745.git.oleksii.kurochko@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Signed-off-by: Oleksii Kurochko --- xen/arch/riscv/include/asm/regs.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 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..33ae759a3e --- /dev/null +++ b/xen/arch/riscv/include/asm/regs.h @@ -0,0 +1,27 @@ +#ifndef __ARM_RISCV_REGS_H__ +#define __ARM_RISCV_REGS_H__ + +#ifndef __ASSEMBLY__ + +#include +#include + +#define hyp_mode(r) (0) + +static inline bool guest_mode(const struct cpu_user_regs *r) +{ + BUG(); +} + +#endif + + +#endif /* __ARM_RISCV_REGS_H__ */ +/* + * Local variables: + * mode: C + * c-file-style: "BSD" + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + */