]> xenbits.xensource.com Git - people/royger/xen.git/commit
xen/riscv: implement virt_to_maddr()
authorOleksii Kurochko <oleksii.kurochko@gmail.com>
Thu, 10 Oct 2024 08:54:46 +0000 (10:54 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 10 Oct 2024 08:54:46 +0000 (10:54 +0200)
commita11b3926c4e65ade35d94c3ebf93b7a54e614732
tree8641660431da254d2ae4d428172654fd9507ff4e
parent4dec51ca72c7096b05fcd28640b5be873bd8f2db
xen/riscv: implement virt_to_maddr()

Implement the virt_to_maddr() function to convert virtual addresses
to machine addresses. The function includes checks for valid address
ranges, specifically the direct mapping region (DIRECTMAP_VIRT_START)
and the Xen's Linkage (XEN_VIRT_START) region. If the virtual address
falls outside of these regions, an assertion will trigger.
To implement this, the phys_offset variable is made accessible
outside of riscv/mm.c.

Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/arch/riscv/include/asm/config.h
xen/arch/riscv/include/asm/mm.h
xen/arch/riscv/mm.c