Received: from eggs.gnu.org ([2001:4830:134:3::10]:52406) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3NfP-00037s-L7 for qemu-devel@nongnu.org; Wed, 15 Jan 2014 05:25:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W3NfK-0001cJ-AA for qemu-devel@nongnu.org; Wed, 15 Jan 2014 05:25:47 -0500 Received: from mx1.redhat.com ([209.132.183.28]:49341) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3NfJ-0001cD-Pj for qemu-devel@nongnu.org; Wed, 15 Jan 2014 05:25:42 -0500 From: Juan Quintela In-Reply-To: (Peter Crosthwaite's message of "Wed, 15 Jan 2014 18:24:24 +1000") References: <1389435213-4378-1-git-send-email-b.galvani@gmail.com> <1389435213-4378-2-git-send-email-b.galvani@gmail.com> <20140114051938.GC4803@stefanha-thinkpad.redhat.com> Date: Wed, 15 Jan 2014 11:25:34 +0100 Message-ID: <87eh49zgm9.fsf@elfo.mitica> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH v2 1/2] hw/net: add support for Allwinner EMAC Fast Ethernet controller Reply-To: quintela@redhat.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Crosthwaite Cc: Edgar Iglesias , Peter Maydell , "qemu-devel@nongnu.org Developers" , Beniamino Galvani , Stefan Hajnoczi , Li Guang Peter Crosthwaite wrote: > But is the saved link state meaningful? The fact that net is not > migrating means that this link_ok migrated variable is potentially > incoherent with the net layer. E.G. What happens in the following > case: > > Run QEMU > Link is Good > Save > > Run Again > Link is bad > Load > > The loaded emulation will have link_ok due to the vmsd load despite > the link being down in the new net layer environment. It will not > correct until net-layer activity causes a ->link_state_changed > callback. > > Can this be just solved cleanly by calling the mii_set_link fn (added > in this patch) always on post load and removing this link_ok state? > This will mean that guest will see a link state transition immediately > on load if the link state changes from the saved-machine state to the > loaded-machine state. You can do that on post-load, but the problem is that when you run post-load, the guest is not running yet on destination, so you need to be careful about what functions do you use. Later, Juan.