On 10/20/21 03:41, Bin Meng wrote: > Using memory_region_init_ram(), which can't possibly handle vhost-user, > and can't work as expected with '-numa node,memdev' options. > > Use MachineState::ram instead of manually initializing RAM memory > region, as well as by providing MachineClass::default_ram_id to > opt in to memdev scheme. > > While at it add check for user supplied RAM size and error out if it > mismatches board expected value. > > Signed-off-by: Bin Meng <bmeng...@gmail.com> > > --- > > Changes in v2: > - add RAM size check > - assign mc->default_ram_size > > hw/riscv/opentitan.c | 16 ++++++++++++---- > 1 file changed, 12 insertions(+), 4 deletions(-)
Reviewed-by: Philippe Mathieu-Daudé <phi...@redhat.com>