hw/loongarch/virt: Fix virt_to_phys_addr function
authorTianrui Zhao <zhaotianrui@loongson.cn>
Mon, 27 Mar 2023 11:23:13 +0000 (19:23 +0800)
committerSong Gao <gaosong@loongson.cn>
Tue, 4 Apr 2023 11:29:13 +0000 (19:29 +0800)
commit51d54503e8049512bdbe55d4f87caf97cd99ca23
tree7275ee39a701670247cce514a9ec9123574bc8be
parentefcd0ec14b0fe9ee0ee70277763b2d538d19238d
hw/loongarch/virt: Fix virt_to_phys_addr function

The virt addr should mask TARGET_PHYS_ADDR_SPACE_BITS to
get the phys addr, and this is used by loading kernel elf.

Signed-off-by: Tianrui Zhao <zhaotianrui@loongson.cn>
Acked-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230327112313.3042829-1-zhaotianrui@loongson.cn>
Signed-off-by: Song Gao <gaosong@loongson.cn>
hw/loongarch/virt.c