From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35650) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y8xX6-0003zT-3z for qemu-devel@nongnu.org; Wed, 07 Jan 2015 15:48:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y8xX0-0004Rw-GE for qemu-devel@nongnu.org; Wed, 07 Jan 2015 15:48:48 -0500 Received: from mail-wg0-x230.google.com ([2a00:1450:400c:c00::230]:46838) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y8xX0-0004Oo-98 for qemu-devel@nongnu.org; Wed, 07 Jan 2015 15:48:42 -0500 Received: by mail-wg0-f48.google.com with SMTP id l2so1905792wgh.35 for ; Wed, 07 Jan 2015 12:48:40 -0800 (PST) Sender: Paolo Bonzini Message-ID: <54AD9BA4.3070805@redhat.com> Date: Wed, 07 Jan 2015 21:48:36 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1420660083-9961-1-git-send-email-mst@redhat.com> In-Reply-To: <1420660083-9961-1-git-send-email-mst@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v3 0/8] acpi: make ROMs resizeable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" , qemu-devel@nongnu.org Cc: Amit Shah , imammedo@redhat.com, dgilbert@redhat.com, Juan Quintela On 07/01/2015 20:48, Michael S. Tsirkin wrote: > This is v3 of the patchset. > Changes since v2: > - Address Paolo's comments: drop an unused function, fix up > comment. > > Changes since v1: > - Any RAM can now be resizeable - there's no requirement > that it's device RAM any longer. > - For simplicity, max_size RAM is always pre-allocated > - Added memory_region_set_size, to keep MR size consistent > in case MR is guest visible (even though for current users, > it never is) > > At the moment we migrate ROMs which reside in fw cfg, which allows > changing ROM code at will, and supports migrating largish blocks early, > with good performance. > However, we are running into a problem: changing size breaks > migration every time. > This already requires somewhat messy compatibility support in > acpi generation code, and it looks like there'll be more to come. > > While recent patches by Paolo and others might make it easier > to keep table size static for specific machine types, having > a safety net in case we do need to change it sounds like > a good idea. > > Rather than try to guess the correct size once and for all, > this patchset tries to make code future-proof, by > adding support for resizeable ram blocks. > > A (possibly very high) amount of space in ram_addr_t space is reserved > and allocated in host for each block, but never used by fw cfg. > If incoming block size differs from current size, block is > reallocated. FW CFG is also notified and updated accordingly. > > As reviewers felt that making all RAM "resizeable" in this > way might make debugging migration harder, these patches > set a per-block flag and only allow resizing for blocks > where this was explicitly requested. > > Note: migration stream is unaffected by these patches. > This makes it possible to enable this functionality > unconditionally, for all machine types. > > In the future, this API might be handy for other things, besides ROMs. Ok for 2.3, just squash 4 and 8 together. No need to repost. Reviewed-by: Paolo Bonzini