Message ID | 7aa26bdad9bf923fd57f7a90e41c049cab0cd5bd.1703255175.git.oleksii.kurochko@gmail.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | Enable build of full Xen for RISC-V | expand |
On 22.12.2023 16:13, Oleksii Kurochko wrote: > Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com> > Acked-by: Jan Beulich <jbeulich@suse.com> > --- > Changes in V3: > - update the commit message Once again I find this puzzling, considering there's no commit message at all. Jan
On Tue, 2024-01-23 at 12:36 +0100, Jan Beulich wrote: > On 22.12.2023 16:13, Oleksii Kurochko wrote: > > Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com> > > Acked-by: Jan Beulich <jbeulich@suse.com> > > --- > > Changes in V3: > > - update the commit message > > Once again I find this puzzling, considering there's no commit > message > at all. By the I meant that asm/page.h was changed to page.h ~ Oleksii
On 23.01.2024 17:54, Oleksii wrote: > On Tue, 2024-01-23 at 12:36 +0100, Jan Beulich wrote: >> On 22.12.2023 16:13, Oleksii Kurochko wrote: >>> Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com> >>> Acked-by: Jan Beulich <jbeulich@suse.com> >>> --- >>> Changes in V3: >>> - update the commit message >> >> Once again I find this puzzling, considering there's no commit >> message >> at all. > By the I meant that asm/page.h was changed to page.h Oh. Can you say "title" or "subject" when you mean that, and "commit message" (or "description") only when you actually mean the description? Jan
On Wed, 2024-01-24 at 09:09 +0100, Jan Beulich wrote: > On 23.01.2024 17:54, Oleksii wrote: > > On Tue, 2024-01-23 at 12:36 +0100, Jan Beulich wrote: > > > On 22.12.2023 16:13, Oleksii Kurochko wrote: > > > > Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com> > > > > Acked-by: Jan Beulich <jbeulich@suse.com> > > > > --- > > > > Changes in V3: > > > > - update the commit message > > > > > > Once again I find this puzzling, considering there's no commit > > > message > > > at all. > > By the I meant that asm/page.h was changed to page.h > > Oh. Can you say "title" or "subject" when you mean that, and "commit > message" (or "description") only when you actually mean the > description? Sure, I'll stick to proposed terminology next time. Thanks. ~ Oleksii
diff --git a/xen/arch/riscv/include/asm/mm.h b/xen/arch/riscv/include/asm/mm.h index 07c7a0abba..57026e134d 100644 --- a/xen/arch/riscv/include/asm/mm.h +++ b/xen/arch/riscv/include/asm/mm.h @@ -5,9 +5,6 @@ #include <asm/page-bits.h> -#define pfn_to_paddr(pfn) ((paddr_t)(pfn) << PAGE_SHIFT) -#define paddr_to_pfn(pa) ((unsigned long)((pa) >> PAGE_SHIFT)) - extern unsigned char cpu0_boot_stack[]; void setup_initial_pagetables(void); diff --git a/xen/arch/riscv/include/asm/page.h b/xen/arch/riscv/include/asm/page.h index 95074e29b3..85176702d5 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)) @@ -46,6 +51,9 @@ typedef struct { #endif } pte_t; +#define pfn_to_paddr(pfn) ((paddr_t)(pfn) << PAGE_SHIFT) +#define paddr_to_pfn(pa) ((unsigned long)((pa) >> PAGE_SHIFT)) + static inline pte_t paddr_to_pte(paddr_t paddr, unsigned int permissions) { @@ -62,6 +70,20 @@ static inline bool pte_is_valid(pte_t p) return p.pte & PTE_VALID; } +static inline void invalidate_icache(void) +{ + BUG(); +} + +#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(); +} + #endif /* __ASSEMBLY__ */ #endif /* _ASM_RISCV_PAGE_H */