From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52805) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VipMR-0007sc-7F for qemu-devel@nongnu.org; Tue, 19 Nov 2013 12:45:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VipMI-0006PQ-QR for qemu-devel@nongnu.org; Tue, 19 Nov 2013 12:45:15 -0500 Sender: Paolo Bonzini Message-ID: <528BA38C.4010806@redhat.com> Date: Tue, 19 Nov 2013 18:44:44 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <528B5EEE.5000705@suse.de> <528BA0DD.3040902@suse.de> In-Reply-To: <528BA0DD.3040902@suse.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH for-1.7] pci: unregister vmstate_pcibus on unplug List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= Cc: Bandan Das , Michael Tsirkin , qemu-stable , Anthony Liguori , qemu-devel@nongnu.org Il 19/11/2013 18:33, Andreas Färber ha scritto: > Why? I still think that would be wrong. We had previously discussed with > Paolo that VMState is global state, which according to Anthony should > not be registered before realization. So far we have a mix of PCI host > bridges instantiating PCIBus before or after realization depending on > whether the bus name needs to depend on the device id or not (with trend > towards instantiating the PCIBus during instance_init), at which point > in time the state should not be registered yet. The sketched solution > was to implement a "realized" property for BusState, so that we can > decouple vmstate_register() from instantation time rather than moving it > into instance_init. I agree. However, this is also a bug fix, and it would be a bit ugly to tie it to large infrastructure changes (same reason why I want to have my virtio hotplug/unplug fixes go in _before_ the realize patches, for example). With that in mind, Bandan's patch could be good for 1.7. Paolo