On Fri, 9 Dec 2011, Anthony PERARD wrote: > During the initialisation of the machine at restore time, the access to the > VRAM will fail because QEMU does not know yet the right guest address to map, > so the vram_ptr is NULL. > > So this patch avoid using a NULL pointer during initialisation, and try to get > another vram_ptr if the call failed the first time.
I think it would be a good idea to split this patch into two patches: one that avoids doing the memset on restore, because it is actually futile in all cases; and another patch that tries to set the vga.vram_ptr again in case it is still NULL.