From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=39869 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q35dV-0006au-8x for qemu-devel@nongnu.org; Fri, 25 Mar 2011 07:57:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q35dT-0002wb-Pg for qemu-devel@nongnu.org; Fri, 25 Mar 2011 07:57:00 -0400 Received: from mail-iw0-f173.google.com ([209.85.214.173]:62305) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q35dT-0002wP-Mj for qemu-devel@nongnu.org; Fri, 25 Mar 2011 07:56:59 -0400 Received: by iwl42 with SMTP id 42so1125545iwl.4 for ; Fri, 25 Mar 2011 04:56:58 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <4D8C8305.7030906@redhat.com> Date: Fri, 25 Mar 2011 12:56:53 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <20110325062741.23726.36621.stgit@dhcp-91-7.nay.redhat.com.englab.nay.redhat.com> In-Reply-To: <20110325062741.23726.36621.stgit@dhcp-91-7.nay.redhat.com.englab.nay.redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH] floppy: save and restore DIR register List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jason Wang Cc: kwolf@redhat.com, qemu-devel@nongnu.org, quintela@redhat.com On 03/25/2011 07:27 AM, Jason Wang wrote: > We need to keep DIR register unchanged across migration, but currently it > depends on the media_changed flags from block layer and we do not save/restore > it which could let the guest driver 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. I guess you can avoid saving if the media changed flag is zero, too (which should be the common case after the guest has booted, right?). Paolo