On Tue, Apr 21, 2015 at 07:31:36AM +0800, Amos Kong wrote:
Hi Kevin,
When I use old seabios in some stable linux release, some bootable devices (2 ide disks) would be lost when I try to restart guest by Ctrl+Alt+Delete during boot stage.
Releated Red Hat BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1129549
I found an upstream commit [1] fixed this bug, but when I backport this patch to old seabios, guest will shutdown when I try to restart by Ctrl+Alt+Delete during boot stage.
Kevin, can you help to describe that: "Unfortunately, kvm does not keep a pristine copy of the BIOS at 0xffff0000" It's a kvm (userspace, QEMU) bug?
If it's a qemu-kvm bug, I should also fix this bz in old stable release.
Yes, my recollection was that it was a kvm bug. It was fixed in kvm after the above was committed to seabios - I don't know what the commit id was.
On a typical x86 machine, the BIOS image is located in read-only memory at 0xffff0000. The chipsets typically also support shadowing that image to ram (or as a read-only copy) at 0xf0000. However, neither qemu nor kvm fully support all the shadowing capabilities of a typical x86 chipset. So, seabios will copy itself from the image at 0xffff0000 to ram at 0xf0000. Unfortunately, kvm had a bug where the resulting ram image at 0xf0000 was actually mapped to the same ram at 0xffff0000 and changes to the memory copy at 0xf0000 would also change the copy at 0xffff0000. This made it impossible for reboots to redeploy the original pristine copy of seabios.
-Kevin