On 20 December 2017 at 18:44, Dr. David Alan Gilbert
<email address hidden> wrote:
> From a quick look my guess would be the wpgrps_size in sd_vmstate is
> different on the source and destination for some reason
Good guess: I added a pre_save hook to sdcard.c's vmstate,
which reports wpgrps_size as 201, but in the pre_load hook
it is reported as 0.
This seems to be because nothing ever calls the sd_reset()
function. I suspect this is down to the "legacy" handling
of sd card setup in sd_init(), or possibly the generic handling
of reset for devices that connect to SD buses.
(sd_reset() eventually gets called when the guest OS
probes the SD controller and issues a card reset command,
which is why it's correctly set by the time we do a vmsave.)
On 20 December 2017 at 18:44, Dr. David Alan Gilbert
<email address hidden> wrote:
> From a quick look my guess would be the wpgrps_size in sd_vmstate is
> different on the source and destination for some reason
Good guess: I added a pre_save hook to sdcard.c's vmstate,
which reports wpgrps_size as 201, but in the pre_load hook
it is reported as 0.
This seems to be because nothing ever calls the sd_reset()
function. I suspect this is down to the "legacy" handling
of sd card setup in sd_init(), or possibly the generic handling
of reset for devices that connect to SD buses.
(sd_reset() eventually gets called when the guest OS
probes the SD controller and issues a card reset command,
which is why it's correctly set by the time we do a vmsave.)
thanks
-- PMM