hw/riscv: virt: Use machine->ram as the system memory
commit03fd0c5fe98f5617076527e9783d030294b64d6d
authorMingwang Li <limingwang@huawei.com>
Sat, 16 Oct 2021 03:09:08 +0000 (16 11:09 +0800)
committerAlistair Francis <alistair@alistair23.me>
Thu, 21 Oct 2021 21:47:51 +0000 (22 07:47 +1000)
tree0a456cc384e9e129c5c6f45b7d120e61d7c1afb3
parent54c17609372bb119575f3bb7309ea57fc1a58d1d
hw/riscv: virt: Use machine->ram as the system memory

If default main_mem is used to be registered as the system memory,
other memory cannot be initialized. Therefore, the system memory
should be initialized to the machine->ram, which consists of the
default main_mem and other possible memory required by applications,
such as shared hugepage memory in DPDK.

Also, the mc->defaul_ram_id should be set to the default main_mem,
such as "riscv_virt_board.ram" for the virt machine.

Signed-off-by: Mingwang Li <limingwang@huawei.com>
Signed-off-by: Yifei Jiang <jiangyifei@huawei.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-id: 20211016030908.40480-1-limingwang@huawei.com
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
hw/riscv/virt.c