From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48375) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xrfxe-00010r-7V for qemu-devel@nongnu.org; Thu, 20 Nov 2014 23:36:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XrfxW-0001Hv-EB for qemu-devel@nongnu.org; Thu, 20 Nov 2014 23:36:46 -0500 Received: from mx1.redhat.com ([209.132.183.28]:35432) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XrfxW-0001HX-73 for qemu-devel@nongnu.org; Thu, 20 Nov 2014 23:36:38 -0500 Date: Fri, 21 Nov 2014 10:06:29 +0530 From: Amit Shah Message-ID: <20141121043629.GJ6787@grmbl.mre> References: <1416243832-16270-1-git-send-email-mst@redhat.com> <20141119072100.GD9190@grmbl.mre> <20141119110846.56d0a709@igors-macbook-pro.local> <20141120041920.GH6787@grmbl.mre> <20141120091631.5c559f28@nial.usersys.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20141120091631.5c559f28@nial.usersys.redhat.com> Subject: Re: [Qemu-devel] [PATCH for-2.2] acpi-build: mark RAM dirty on table update List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Mammedov Cc: Paolo Bonzini , Richard Henderson , qemu-devel@nongnu.org, Anthony Liguori , "Michael S. Tsirkin" On (Thu) 20 Nov 2014 [09:16:31], Igor Mammedov wrote: > On Thu, 20 Nov 2014 09:49:20 +0530 > Amit Shah wrote: > > > On (Wed) 19 Nov 2014 [11:08:46], Igor Mammedov wrote: > > > On Wed, 19 Nov 2014 12:51:00 +0530 > > > Amit Shah wrote: > > > > > > > -static void *acpi_add_rom_blob(AcpiBuildState *build_state, GArray > > > > > *blob, +static ram_addr_t acpi_add_rom_blob(AcpiBuildState > > > > > *build_state, GArray *blob, const char *name) > > > > > { > > > > > return rom_add_blob(name, blob->data, acpi_data_len(blob), -1, > > > > > name, @@ -1777,6 +1781,7 @@ void acpi_setup(PcGuestInfo *guest_info) > > > > > /* Now expose it all to Guest */ > > > > > build_state->table_ram = acpi_add_rom_blob(build_state, > > > > > tables.table_data, ACPI_BUILD_TABLE_FILE); > > > > > + assert(build_state->table_ram != RAM_ADDR_MAX); > > > > > build_state->table_size = acpi_data_len(tables.table_data); > > > > > > > > Isn't an assert too strong if this happens during hotplug? > > > > > > > > I'm trying to follow this code, but looks like this isn't called in > > > > the hotplug path - is that right? > > > yep, it's called only at startup > > > > Thanks; what's the path taken for hotplug, then? (Ensuring we have > > that case covered too). > In case of hotplug ACPI blob doesn't change at all (it has all > possible device objects in it). It changes on the first time BIOS > fetches ROM blob and on reset. > Later during hotplug, guest gets SCI interrupt and runs related to > hotplug event AML method, which fishes out bits necessary for hotplug > via corresponding mmio interface. Excellent, thanks! Amit