]> git.proxmox.com Git - qemu.git/commit
floppy: save and restore DIR register
authorJason Wang <jasowang@redhat.com>
Wed, 6 Apr 2011 10:34:31 +0000 (18:34 +0800)
committerKevin Wolf <kwolf@redhat.com>
Thu, 7 Apr 2011 11:51:48 +0000 (13:51 +0200)
commit7d905f716bea633f2836e1d661387983aacdc6d6
treed9b9f4ecb0ef2af6c6c5a6a71017a9a1b0eb38e6
parent33897dc7d62970acb731aab2ef2a65c225a8d64c
floppy: save and restore DIR register

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 <jasowang@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
hw/fdc.c