From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49510) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VrJHb-00076O-OY for qemu-devel@nongnu.org; Thu, 12 Dec 2013 22:19:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VrJHT-0002BE-PD for qemu-devel@nongnu.org; Thu, 12 Dec 2013 22:19:19 -0500 Received: from mail-pd0-f174.google.com ([209.85.192.174]:45805) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VrJHT-0002As-JL for qemu-devel@nongnu.org; Thu, 12 Dec 2013 22:19:11 -0500 Received: by mail-pd0-f174.google.com with SMTP id y13so1658417pdi.19 for ; Thu, 12 Dec 2013 19:19:10 -0800 (PST) Message-ID: <52AA7CA8.1090607@ozlabs.ru> Date: Fri, 13 Dec 2013 14:19:04 +1100 From: Alexey Kardashevskiy MIME-Version: 1.0 References: <1386757341-12154-1-git-send-email-aik@ozlabs.ru> <20131212140539.GC319@redhat.com> In-Reply-To: <20131212140539.GC319@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH v4 0/8] spapr: bootindex support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: Paolo Bonzini , qemu-ppc@nongnu.org, qemu-devel@nongnu.org, Alexander Graf On 12/13/2013 01:05 AM, Michael S. Tsirkin wrote: > On Wed, Dec 11, 2013 at 09:22:13PM +1100, Alexey Kardashevskiy wrote: >> With the great help from Paolo, I am presenting yet another try of bootindex >> support on sPAPR, this time with some QOM fixes. Details are in the commit messages. >> Please, comment. Thanks. >> >> Alexey Kardashevskiy (5): >> boot: extend get_boot_devices_list() to ignore suffixes >> spapr-llan: add to boot device list >> spapr-vio: fix firmware names >> qdev: introduce FWPathProvider interface >> spapr: define interface to fix device pathname >> >> Hervé Poussineau (1): >> qom: detect bad reentrance during object_class_foreach >> >> Paolo Bonzini (2): >> qom: do not register interface "types" in the type table >> vl: allow customizing the class of /machine > > Looks good overall. > But this seems to suffer from the same problem as existing > bootindex code on x86: you can't add a bootable device > by hotplug. Why? The boot list is delivered to SLOF via the device tree which is composed on a machine reset (spapr_finalize_fdt() calls get_boot_devices_list() and that's it) so if a bootable device was hotplugged, then after reset it will be in the list. > And we really want to fix it on x86 too. > This might be fixable using FW CFG read callback, and updating > the bootindex blob dynamically. > See how e.g. acpi_build_update works. Sorry, since I do not have good understanding what is happening in x86, I need more details. Because I would implement qemu_add_machine_reset_notifier (copied from qemu_add_machine_init_done_notifier thing) and make fw_cfg_init() register a reset notifier. Or just call qemu_add_machine_init_done_notifier() on a machine reset - I do not really see a code in any of those notifiers which could not be executed on a machine reset (but again, I am even more ignorant in x86 field than usual :) ). -- Alexey