Ben Guthro
2007-Oct-24 21:04 UTC
[Xen-devel] [PATCH][QEMU] Clear bios framebuffer with minimal writes
Support for VGA bios to clear framebuffer with minimal writes. Signed-off-by: Ben Guthro <bguthro@virtualron.com> Signed-off-by: Gary Grebus <ggrebus@virtualiron.com> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2007-Oct-25 14:20 UTC
Re: [Xen-devel] [PATCH][QEMU] Clear bios framebuffer with minimal writes
On 24/10/07 22:04, "Ben Guthro" <bguthro@virtualiron.com> wrote:> Support for VGA bios to clear framebuffer with minimal writes. > > Signed-off-by: Ben Guthro <bguthro@virtualron.com> > Signed-off-by: Gary Grebus <ggrebus@virtualiron.com>Is this really just a workaround for the insane-sounding case of Vista clearing the screen, as described in one of the comments? Do I understand correctly, and it looks like Vista does 4096 writes for each iteration of the rep stosw? -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Gary Grebus
2007-Oct-25 15:23 UTC
Re: [Xen-devel] [PATCH][QEMU] Clear bios framebuffer with minimal writes
On Thu, 2007-10-25 at 15:20 +0100, Keir Fraser wrote:> On 24/10/07 22:04, "Ben Guthro" <bguthro@virtualiron.com> wrote: > > > Support for VGA bios to clear framebuffer with minimal writes. > > > > Signed-off-by: Ben Guthro <bguthro@virtualron.com> > > Signed-off-by: Gary Grebus <ggrebus@virtualiron.com> > > Is this really just a workaround for the insane-sounding case of Vista > clearing the screen, as described in one of the comments? Do I understand > correctly, and it looks like Vista does 4096 writes for each iteration of > the rep stosw?Yep. This happens when resizing the screen in Vista. It appears to do this by executing the VGA BIOS code in some sort of emulation, and the BIOS function to clear the screen (which uses a rep stosw) gets emulated as 4096 separate writes. This is so slow that occasionally some watchdog timer in Vista (that was timing the BIOS emulation) would expire and cause a blue screen. This fix was a bit of a hack. It might be possible to speed up VGA writes enough to make this unnecessary, but that was more of a challenge than I wanted at the time. /gary -- Gary Grebus Virtual Iron Software, Inc. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2007-Oct-25 15:34 UTC
Re: [Xen-devel] [PATCH][QEMU] Clear bios framebuffer with minimal writes
On 25/10/07 16:23, "Gary Grebus" <ggrebus@virtualiron.com> wrote:>> Is this really just a workaround for the insane-sounding case of Vista >> clearing the screen, as described in one of the comments? Do I understand >> correctly, and it looks like Vista does 4096 writes for each iteration of >> the rep stosw? > > Yep. This happens when resizing the screen in Vista. It appears to do > this by executing the VGA BIOS code in some sort of emulation, and the > BIOS function to clear the screen (which uses a rep stosw) gets emulated > as 4096 separate writes. > > This is so slow that occasionally some watchdog timer in Vista (that was > timing the BIOS emulation) would expire and cause a blue screen. > > This fix was a bit of a hack. It might be possible to speed up VGA > writes enough to make this unnecessary, but that was more of a challenge > than I wanted at the time.Ugh, that is awkward. Did you do this hack before the stdvga emulation-in-xen and buffered-io patch that you guys also sent out today? I wonder whether that speeds up vga writes enough, or whether you needed this hack despite the speedups that other patch achieved? Overall, I guess I''m not against this patch even though it is a bit sleazy. :-) But obviously it''s even better if the problem goes away by other means... -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Gary Grebus
2007-Oct-25 17:14 UTC
Re: [Xen-devel] [PATCH][QEMU] Clear bios framebuffer with minimal writes
On Thu, 2007-10-25 at 16:34 +0100, Keir Fraser wrote:> Ugh, that is awkward. Did you do this hack before the stdvga > emulation-in-xen and buffered-io patch that you guys also sent out today? I > wonder whether that speeds up vga writes enough, or whether you needed this > hack despite the speedups that other patch achieved? Overall, I guess I''m > not against this patch even though it is a bit sleazy. :-) But obviously > it''s even better if the problem goes away by other means... >This patch predates the stdvga emulation-in-xen and buffered-io changes. I''ll try with only the later changes and see if they are sufficient. /gary -- Gary Grebus Virtual Iron Software, Inc. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Gary Grebus
2007-Oct-30 17:52 UTC
Re: [Xen-devel] [PATCH][QEMU] Clear bios framebuffer with minimal writes
On Thu, 2007-10-25 at 13:14 -0400, Gary Grebus wrote:> On Thu, 2007-10-25 at 16:34 +0100, Keir Fraser wrote: > > > Ugh, that is awkward. Did you do this hack before the stdvga > > emulation-in-xen and buffered-io patch that you guys also sent out today? I > > wonder whether that speeds up vga writes enough, or whether you needed this > > hack despite the speedups that other patch achieved? Overall, I guess I''m > > not against this patch even though it is a bit sleazy. :-) But obviously > > it''s even better if the problem goes away by other means... > > > > This patch predates the stdvga emulation-in-xen and buffered-io changes. > I''ll try with only the later changes and see if they are sufficient. >I tried with only the stdvga and buffered-io patch. Things got worse, to the point that Vista no longer boots, encountering a BSOD due to a timeout in Vista graphics driver. Apparently the stdvga and buffered-io patch de-optimizes this particular case, but we didn''t notice due to the vgabios patch. The vgabios patch fixes the intermittent "BSOD on screen resize" problem either way. We won''t know if it''s really necessary until we can fix the stdvga etc. patch which at the moment looks a little suspect. /gary _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel