On Thu, 14 Feb 2019 19:11:27 +0100 Paolo Bonzini <pbonz...@redhat.com> wrote:
> On 14/02/19 15:07, Igor Mammedov wrote: > > Also some boards (ab)use memory_region_allocate_system_memory(), calling it > > several > > times to allocate various fixed sized chunks of RAM and ROMs, which is > > problematic > > to map to a single initial RAM Machine::memdev backend and is currently > > broken if > > -mem-path points to a not hugepage pool. > > This is certainly a good idea. However, I'm not sure why you would need > a memdev property on the Machine instead of just allowing 1 -numa node, > which is what really is. using '-numa node' would be confusing to user when he/she is not interested in numa usecase it also would enable numa fdt/acpi parts generated automatically (fixable but then again it adds more to confusion) and in the end there are boards that do not support numa at all (s390x). Machine memdev (initial-ram-memdev) property looked generic enough to me that it could be used with every board, but could go on a bit further and instead of memdev an add initial-ram property that would reference something like -device builtin-ram (I think I've seen some board using a sysbus based ram device for initial ram). If you ask why it's machine property, then I'm following '-m' semantics which is basically a machine property and I don't have a better idea how to tell board on CLI to use some device/memdev as initial ram. > Thanks, > > Paolo >