From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=37568 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q47dZ-0000Ca-Gs for qemu-devel@nongnu.org; Mon, 28 Mar 2011 04:17:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q47dW-0007la-N7 for qemu-devel@nongnu.org; Mon, 28 Mar 2011 04:17:19 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47948) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q47dW-0007kn-D2 for qemu-devel@nongnu.org; Mon, 28 Mar 2011 04:17:18 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p2S8HGfi005893 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 28 Mar 2011 04:17:16 -0400 Message-ID: <4D9043F6.5070506@redhat.com> Date: Mon, 28 Mar 2011 10:16:54 +0200 From: Jes Sorensen MIME-Version: 1.0 Subject: Re: [Qemu-devel] [V2 PATCH] floppy: save and restore DIR register References: <20110328024726.4753.77783.stgit@dhcp-91-7.nay.redhat.com.englab.nay.redhat.com> In-Reply-To: <20110328024726.4753.77783.stgit@dhcp-91-7.nay.redhat.com.englab.nay.redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jason Wang Cc: kwolf@redhat.com, pbonzini@redhat.com, qemu-devel@nongnu.org, quintela@redhat.com On 03/28/11 04:47, Jason Wang wrote: > We need to keep DIR register unchanged across migration, but currently it > depends on the media_changed flags from block layer. Since we do not > save/restore it and the bdrv_open() called in dest node may set the > media_changed flag when trying to open floppy image, guest driver may think the > floppy have changed after migration. To fix this, a new filed media_changed in > FDrive strcutre was introduced in order to save and restore the it from block > layer through pre_save/post_load callbacks. > > Signed-off-by: Jason Wang > --- > hw/fdc.c | 52 +++++++++++++++++++++++++++++++++++++++++++++++++++- > 1 files changed, 51 insertions(+), 1 deletions(-) Looks good to me. Reviewed-by: Jes Sorensen