[PATCH v2] hw/riscv: virt: bugfix the memory-backend-file command is invalid

2021-10-11 Thread MingWang Li
From: Mingwang Li When I start the VM with the following command: $ ./qemu-system-riscv64 -M virt,accel=kvm -m 4096M -cpu host -nographic \ -name guest=riscv-guset \ -smp 2 \ -bios none \ -kernel ./Image \ -drive file=./guest.img,format=raw,id=hd0 \ -device virtio-blk

[PATCH v3] hw/riscv: virt: Use machine->ram as the system memory

2021-10-15 Thread MingWang Li
From: Mingwang Li 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 applicati

[PATCH] hw/riscv: virt: bugfix the memory-backend-file command is invalid

2021-09-29 Thread MingWang Li
From: Mingwang Li 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 applicati