From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:50770) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UWmPw-0003pi-6E for qemu-devel@nongnu.org; Mon, 29 Apr 2013 07:38:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UWmPt-00032j-LJ for qemu-devel@nongnu.org; Mon, 29 Apr 2013 07:38:48 -0400 Received: from mx1.redhat.com ([209.132.183.28]:22256) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UWmPt-00032f-E1 for qemu-devel@nongnu.org; Mon, 29 Apr 2013 07:38:45 -0400 Message-ID: <517E5C4D.7080502@redhat.com> Date: Mon, 29 Apr 2013 13:41:01 +0200 From: Laszlo Ersek MIME-Version: 1.0 References: <4fd91502526b9977807a8dff28dcba4db670af7c.1366879705.git.mst@redhat.com> In-Reply-To: <4fd91502526b9977807a8dff28dcba4db670af7c.1366879705.git.mst@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH RFC 2/3] acpi: load and link tables from /etc/acpi/ List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: seabios@seabios.org, qemu-devel@nongnu.org Not sure how much it counts, but I personally can agree with you on this direction :) One note below: > @@ -603,8 +604,72 @@ acpi_setup(void) > if (! CONFIG_ACPI) > return; > > + int acpi_generate = 1; > + > dprintf(3, "init ACPI tables\n"); > > + struct romfile_s *file = NULL; > + for (;;) { > + file = romfile_findprefix("/etc/acpi/", file); > + if (!file) > + break; > + > + /* > + * Disable ACPI table generation. All ACPI tables must come from > + * etc/acpi/ romfile entries. > + */ > + acpi_generate = 0; > + [...] > + } > + > + linker_link("/etc/linker-script"); > + > + if (!acpi_generate) { > + return; > + } > + > + dprintf(3, "generate ACPI tables\n"); > + > // This code is hardcoded for PIIX4 Power Management device. > struct pci_device *pci = pci_find_init_device(acpi_find_tbl, NULL); > if (!pci) Are you deliberately calling linker_link() independently from "acpi_generate"? My hunch is that linker_link() only makes sense if acpi_generate == 0 (ie. qemu has passed down at least one table to repoint some pointer to), but I may be missing a use case. Thanks Laszlo