On Wed, Jan 18, 2012 at 04:09:45PM +0200, Gleb Natapov wrote:
On Wed, Jan 18, 2012 at 08:27:31AM -0500, Kevin O'Connor wrote:
On Wed, Jan 18, 2012 at 11:40:28AM +0200, Gleb Natapov wrote:
Hi Kevin,
Commit 8b0c509e7cdb broke S3 resume on QEMU. Before this commit QEMU compiled bios with S3_RESUME_VGA_INIT enabled. After it this is no longer an option.
I didn't know QEmu used custom compile options. I don't see this in the QEmu source - where does it set it?
I not sure what QEMU upstream does. In RHEL we have local patch to change the setting. Without it resume does not work correctly.
Moving the option from compile time to run time should be better all around. Can QEmu just set the flag in fwcfg if this functionality is needed?
It can I suppose, but then you will not be able to use newer Seabios with older QEMU. The question is if such an option is the way to go forward since for QEMU it will always be set anyway.
The current SeaBIOS checks fwcfg for a "file" named "etc/s3-resume-vga-init" - if it exists it will use it. This works on all versions of qemu (though, of course, on current qemu the file isn't found and the default is to not run the vgabios on resume).
As for the option always being set - we discussed this some time back. My read of the ACPI spec says that the firmware should not need to do any device initialization on resume (including running the vga bios). The ACPI spec definitely doesn't require the firmware to run the vga bios (or even allude to the possibility). Further, I haven't seen any spec that indicates the vga bios should be prepared to be executed on a resume. So, in the general case, I see running the vga bios as potentially harmful to the resume process. (We would be executing third-party code in a restricted environment and expecting it to not touch any memory, with no apparent spec documenting that fact.)
If someone can point out a spec to the contrary I'd be happy to change the default in SeaBIOS.
-Kevin