From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:46048) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1guLmm-0001vn-A6 for qemu-devel@nongnu.org; Thu, 14 Feb 2019 13:31:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1guLml-00057Q-Mb for qemu-devel@nongnu.org; Thu, 14 Feb 2019 13:31:00 -0500 Received: from mail-ot1-x333.google.com ([2607:f8b0:4864:20::333]:41935) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1guLml-0004t6-HT for qemu-devel@nongnu.org; Thu, 14 Feb 2019 13:30:59 -0500 Received: by mail-ot1-x333.google.com with SMTP id u16so12160192otk.8 for ; Thu, 14 Feb 2019 10:30:49 -0800 (PST) MIME-Version: 1.0 References: <20190214140714.15738-1-imammedo@redhat.com> In-Reply-To: <20190214140714.15738-1-imammedo@redhat.com> From: Peter Maydell Date: Thu, 14 Feb 2019 18:30:37 +0000 Message-ID: Content-Type: text/plain; charset="UTF-8" Subject: Re: [Qemu-devel] [RFC] memory: use memory_region_init_ram() instead of memory_region_allocate_system_memory() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Mammedov Cc: QEMU Developers , Jan Kiszka , Artyom Tarasenko , Mark Cave-Ayland , qemu-arm , Paolo Bonzini , Eduardo Habkost On Thu, 14 Feb 2019 at 14: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. These boards are buggy and we could fix them, if we wanted to keep the existing API. We should in that case add assertions that memory_region_allocate_system_memory() is called once and only once, which would let "make check" enforce the rule. thanks - PMM