xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Oleksii Kurochko <oleksii.kurochko@gmail.com>
To: xen-devel@lists.xenproject.org
Cc: Oleksii Kurochko <oleksii.kurochko@gmail.com>,
	Alistair Francis <alistair.francis@wdc.com>,
	Bob Eshleman <bobbyeshleman@gmail.com>,
	Connor Davis <connojdavis@gmail.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	George Dunlap <george.dunlap@citrix.com>,
	Jan Beulich <jbeulich@suse.com>, Julien Grall <julien@xen.org>,
	Stefano Stabellini <sstabellini@kernel.org>
Subject: [PATCH v8 12/17] xen/riscv: add minimal stuff to page.h to build full Xen
Date: Wed, 17 Apr 2024 12:04:55 +0200	[thread overview]
Message-ID: <ff889391c4fb968ae142aeb0fc8cacd25b910fc5.1713347222.git.oleksii.kurochko@gmail.com> (raw)
In-Reply-To: <cover.1713347222.git.oleksii.kurochko@gmail.com>

Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
---
Changes in V5-V8:
 - Nothing changed. Only rebase.
---
Changes in V4:
---
 - Change message -> subject in "Changes in V3"
 - s/BUG/BUG_ON("...")
 - Do proper rebase ( pfn_to_paddr() and paddr_to_pfn() aren't removed ).
---
Changes in V3:
 - update the commit subject
 - add implemetation of PAGE_HYPERVISOR macros
 - add Acked-by: Jan Beulich <jbeulich@suse.com>
 - drop definition of pfn_to_addr, and paddr_to_pfn in <asm/mm.h>
---
Changes in V2:
 - Nothing changed. Only rebase.
---
 xen/arch/riscv/include/asm/page.h | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/xen/arch/riscv/include/asm/page.h b/xen/arch/riscv/include/asm/page.h
index 95074e29b3..c831e16417 100644
--- a/xen/arch/riscv/include/asm/page.h
+++ b/xen/arch/riscv/include/asm/page.h
@@ -6,6 +6,7 @@
 #ifndef __ASSEMBLY__
 
 #include <xen/const.h>
+#include <xen/bug.h>
 #include <xen/types.h>
 
 #include <asm/mm.h>
@@ -32,6 +33,10 @@
 #define PTE_LEAF_DEFAULT            (PTE_VALID | PTE_READABLE | PTE_WRITABLE)
 #define PTE_TABLE                   (PTE_VALID)
 
+#define PAGE_HYPERVISOR_RW          (PTE_VALID | PTE_READABLE | PTE_WRITABLE)
+
+#define PAGE_HYPERVISOR             PAGE_HYPERVISOR_RW
+
 /* Calculate the offsets into the pagetables for a given VA */
 #define pt_linear_offset(lvl, va)   ((va) >> XEN_PT_LEVEL_SHIFT(lvl))
 
@@ -62,6 +67,20 @@ static inline bool pte_is_valid(pte_t p)
     return p.pte & PTE_VALID;
 }
 
+static inline void invalidate_icache(void)
+{
+    BUG_ON("unimplemented");
+}
+
+#define clear_page(page) memset((void *)(page), 0, PAGE_SIZE)
+#define copy_page(dp, sp) memcpy(dp, sp, PAGE_SIZE)
+
+/* TODO: Flush the dcache for an entire page. */
+static inline void flush_page_to_ram(unsigned long mfn, bool sync_icache)
+{
+    BUG_ON("unimplemented");
+}
+
 #endif /* __ASSEMBLY__ */
 
 #endif /* _ASM_RISCV_PAGE_H */
-- 
2.44.0



  parent reply	other threads:[~2024-04-17 10:05 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-17 10:04 [PATCH v8 00/17] Enable build of full Xen for RISC-V Oleksii Kurochko
2024-04-17 10:04 ` [PATCH v8 01/17] xen/riscv: disable unnecessary configs Oleksii Kurochko
2024-04-18  7:14   ` Jan Beulich
2024-04-18 13:18     ` Oleksii
2024-04-17 10:04 ` [PATCH v8 02/17] xen: introduce generic non-atomic test_*bit() Oleksii Kurochko
2024-04-25 15:35   ` Jan Beulich
2024-04-26  8:14     ` Oleksii
2024-04-26 10:48       ` Jan Beulich
2024-05-03 17:15     ` Oleksii
2024-05-06  6:33       ` Jan Beulich
2024-05-06  8:16         ` Oleksii
2024-05-06  8:24           ` Jan Beulich
2024-04-17 10:04 ` [PATCH v8 03/17] xen/bitops: implement fls{l}() in common logic Oleksii Kurochko
2024-04-25 15:44   ` Jan Beulich
2024-04-26  8:21     ` Oleksii
2024-04-26 10:51       ` Jan Beulich
2024-04-26 12:09         ` Oleksii
2024-04-26 12:32           ` Jan Beulich
2024-04-17 10:04 ` [PATCH v8 04/17] xen/bitops: put __ffs() into linux compatible header Oleksii Kurochko
2024-04-25 15:47   ` Jan Beulich
2024-04-17 10:04 ` [PATCH v8 05/17] xen/riscv: introduce bitops.h Oleksii Kurochko
2024-04-25 15:51   ` Jan Beulich
2024-04-17 10:04 ` [PATCH v8 06/17] xen/riscv: introduce cmpxchg.h Oleksii Kurochko
2024-04-29 13:38   ` Jan Beulich
2024-04-17 10:04 ` [PATCH v8 07/17] xen/riscv: introduce io.h Oleksii Kurochko
2024-04-17 10:04 ` [PATCH v8 08/17] xen/riscv: introduce atomic.h Oleksii Kurochko
2024-04-29 13:45   ` Jan Beulich
2024-05-02  8:33     ` Oleksii
2024-04-17 10:04 ` [PATCH v8 09/17] xen/riscv: introduce monitor.h Oleksii Kurochko
2024-04-17 10:04 ` [PATCH v8 10/17] xen/riscv: add definition of __read_mostly Oleksii Kurochko
2024-04-17 10:04 ` [PATCH v8 11/17] xen/riscv: add required things to current.h Oleksii Kurochko
2024-04-17 10:04 ` Oleksii Kurochko [this message]
2024-04-17 10:04 ` [PATCH v8 13/17] xen/riscv: add minimal stuff to mm.h to build full Xen Oleksii Kurochko
2024-04-17 10:04 ` [PATCH v8 14/17] xen/riscv: introduce vm_event_*() functions Oleksii Kurochko
2024-04-17 10:04 ` [PATCH v8 15/17] xen/riscv: add minimal amount of stubs to build full Xen Oleksii Kurochko
2024-04-17 10:04 ` [PATCH v8 16/17] xen/riscv: enable full Xen build Oleksii Kurochko
2024-04-17 10:05 ` [PATCH v8 17/17] xen/README: add compiler and binutils versions for RISC-V64 Oleksii Kurochko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ff889391c4fb968ae142aeb0fc8cacd25b910fc5.1713347222.git.oleksii.kurochko@gmail.com \
    --to=oleksii.kurochko@gmail.com \
    --cc=alistair.francis@wdc.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=bobbyeshleman@gmail.com \
    --cc=connojdavis@gmail.com \
    --cc=george.dunlap@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=julien@xen.org \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).