(removing edk2-devel, adding Jan)
On 02/15/13 08:19, Michael Tokarev wrote:
15.02.2013 07:43, Kevin O'Connor wrote:
On Fri, Feb 15, 2013 at 04:10:59AM +0100, Laszlo Ersek wrote:
On 02/15/13 02:22, Kevin O'Connor wrote:
On Thu, Feb 14, 2013 at 08:16:02PM -0500, Kevin O'Connor wrote: By chance, are you using an older version of kvm? There was a bug in kvm that caused changes to memory mapped at 0xe0000-0xfffff to also be reflected in the "rom" image at 0xfffe0000-0xffffffff. It was my understand that this bug was fixed though.
You are great! Disabling KVM for the guest (/domain/@type='qemu') made the reboot work on both the RHEL-6 devel version of qemu and on upstream 1.3.1.
(I didn't try suspend/resume yet.)
Do you recall the precise commit that fixed the "reflection"? I've been eyeballing kvm commit messages for a few ten minutes now, but of course in vain. (CC'ing Gleb and Marcelo.)
I found this email thread:
http://kerneltrap.org/mailarchive/linux-kvm/2010/9/21/6267744
I confirm RHEL-6 qemu-kvm lacks that patch; we still have the FIXME and the return statement that depend on kvm_enabled() in i440fx_update_memory_mappings().
This patch is more than 2 years old and is applied to all more or less recent qemu versions. This does not tell us why disabling kvm (with this patch applied!) makes a difference.
I just retested on v1.3.1 + kvm, the problem is still there indeed.
(Note that neither Gleb's patch, aa85bd8b "support piix PAM registers in KVM", nor the patch that it partially undid:
commit d03f4d2defd76f35f46f5418979f3e6d14a11183 Author: Jan Kiszka jan.kiszka@web.de Date: Wed Sep 10 21:34:44 2008 +0200
I440fx: do change ISA mappings under KVM
As long as KVM does not support remapping or protection state changes of guest memory, do not fiddle with the ISA mappings that QEMU see, confusing both the monitor and the gdbstub.
Signed-off-by: Jan Kiszka jan.kiszka@web.de Signed-off-by: Avi Kivity avi@qumranet.com
made it ever to qemu; these are qemu-kvm commits.)
So there must be another (maybe similar) bug somewhere...
Maybe there was a concurrent or slightly earlier change to KVM that enabled the userspace fix too?... IOW the KVM fix could be necessary but not sufficient, the KVM fix + the qemu-kvm fix together are sufficient.
If I disable KVM, i440fx_update_memory_mappings() probably does the same thing in RHEL-6 qemu-kvm as in upstream qemu v1.3.1. If I enable KVM, then RHEL-6 qemu-kvm breaks immediately in userspace, while upstream 1.3.1 might want to rely on KVM, but runs into a bug (?) on the RHEL-6 host kernel.
Thanks, Laszlo