[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-devel] [Qemu-devel] [PATCH 5/5] vga-cirrus: Workaround during restore when using Xen.
- To: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
- From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
- Date: Fri, 25 Nov 2011 12:33:34 +0000
- Cc: Xen Devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, QEMU-devel <qemu-devel@xxxxxxxxxx>
- Delivery-date: Fri, 25 Nov 2011 12:35:00 +0000
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=+LvmRKB0fXnY5I6MgWhzk+rEyiO0YXkSegCH3GC81GE=; b=Cq2egilNhihaLSQt4NpzPLlM7Ojr9m5GUbUKSouQYhaNolRGEGyWYU2aDGVV+71C8/ YDw2++HgHvtQFl0JuJqg5Veif8nvk+mX3zQb6R43gbh51FTYzdWnfjA+udbK/C8D2nxt STBaFtZXm+nsSWoPUQH7JrRKXQ2UDIb+Y0tv8=
- List-id: Xen developer discussion <xen-devel.lists.xensource.com>
On Fri, Nov 25, 2011 at 11:51, Stefano Stabellini
<stefano.stabellini@xxxxxxxxxxxxx> wrote:
>> On Thu, Nov 24, 2011 at 18:30, Stefano Stabellini
>> <stefano.stabellini@xxxxxxxxxxxxx> wrote:
>> >
>> >> @@ -2784,9 +2796,11 @@ static void cirrus_reset(void *opaque)
>> >> Â Â Â}
>> >> Â Â Âs->vga.cr[0x27] = s->device_id;
>> >>
>> >> - Â Â/* Win2K seems to assume that the pattern buffer is at 0xff
>> >> - Â Â Â initially ! */
>> >> - Â Âmemset(s->vga.vram_ptr, 0xff, s->real_vram_size);
>> >> + Â Âif (!runstate_check(RUN_STATE_PREMIGRATE)) {
>> >> + Â Â Â Â/* Win2K seems to assume that the pattern buffer is at 0xff
>> >> + Â Â Â Â Â initially ! */
>> >> + Â Â Â Âmemset(s->vga.vram_ptr, 0xff, s->real_vram_size);
>> >> + Â Â}
>> >>
>> >
>> > this is not too bad, I suppose that the videoram is going to be written
>> > again at restore time anyway so at least it saves some cycles
>>
>> Actually, I think the next time that this vram will be written again
>> is, when the guest is actually "waked-up" and wrote something there.
>> Otherwise, the "restore" of the vram is done before QEMU start. So,
>> the memset could leave some weard stuff the screen (a white screen?).
>
> So this is the succession of events:
>
> - vga_common_init
> allocates the videoram
>
> - cirrus_reset
> sets set videoram to 0xff
>
> - load_vmstate
> the old videoram is copied over, overwriting what cirrus_reset has done
>
> therefore setting the videoram to 0xff when resuming is a waste of
> efforts
Ooops, I reduce my answer to the only Xen case. So I agree with you.
--
Anthony PERARD
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel