Files
acrn-hypervisor/hypervisor/include/arch/riscv/asm/mmu.h
hangliu1 52e7919d9f hv: riscv: add riscv memory interface
Add hypervisor pagetable manipulate interface to riscv arch directory,
which is needed by the common interface, and add riscv ppt pgtable
structure implementation.

Tracked-On: #8831
Signed-off-by: Haicheng Li <haicheng.li@intel.com>
Co-developed-by: hangliu1 <hang1.liu@intel.com>
Signed-off-by: hangliu1 <hang1.liu@intel.com>
Reviewed-by: Fei Li <fei1.li@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2025-10-21 14:14:55 +08:00

24 lines
368 B
C

/*
* Copyright (C) 2023-2025 Intel Corporation.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef RISCV_MMU_H
#define RISCV_MMU_H
#include <types.h>
#include <asm/page.h>
#include <asm/pgtable.h>
static inline void switch_satp(uint64_t satp)
{
asm volatile (
"csrw satp, %0\n\t" \
"sfence.vma"
:: "r"(satp)
: "memory"
);
}
#endif /* RISCV_MMU_H */