On Tue, Dec 23, 2008 at 12:04 PM, Alexander Graf <[email protected]> wrote: > Your KVM kernel module does not like that the guest writes into > MSR_VM_HSAVE_PA. This is pretty fundamental and should always work if you > build current git kvm kernel modules. Are you sure you're using the current > git modules? Are you using the -enable-nesting option for qemu? > > Please try to rmmod everything, take a fresh checkout from git, compile it > and load the module with insmod kvm-amd.ko nested=1. I can't think of any > way this could fail. >
OK, so I followed your directions above much more carefully, got the latest checkout and insmod'd kvm, kvm-amd nested=1 and watched carefully to the syslog (dmesg). When the kvm_amd module was loaded I get: kvm: Nested Virtualization enabled Good sign. So I booted up a guest with: sudo qemu-system-x86_64 -enable-nesting -m 512 -drive file=/dev/storage/deshantm-desktop,if=virtio,boot=on -drive file=/dev/storage/deshantm-temp-space,if=virtio -usb -usbdevice tablet -net nic,macaddr=00:16:3e:16:00:00,model=virtio -net tap,script=/usr/local/share/qemu-ifup -daemonize -vnc :16 I checked /proc/cpuinfo, which showed the svm flag (doesn't show the svm flag without the -enable-nesting) So all looks pretty good. During the guest boot, some normal looking messages. Dec 23 22:42:28 amdbox kernel: [15715.578035] device tap0 entered promiscuous mode Dec 23 22:42:28 amdbox kernel: [15715.578059] br0: port 2(tap0) entering learning state Dec 23 22:42:29 amdbox avahi-daemon[5457]: Registering new address record for fe80::f01d:36ff:fe6f:597 on tap0.*. Dec 23 22:42:37 amdbox kernel: [15724.576010] br0: topology change detected, propagating Dec 23 22:42:37 amdbox kernel: [15724.576014] br0: port 2(tap0) entering forwarding state Dec 23 22:42:38 amdbox kernel: [15725.185009] tap0: no IPv6 routers present Then, in the guest I run a more simple command: sudo qemu-system-x86_64 -hda ubuntu-server.img -cdrom install_cd.iso which produces dmesg in the base as follows: Dec 23 22:44:05 amdbox kernel: [15812.088706] __ratelimit: 20 callbacks suppressed Dec 23 22:44:05 amdbox kernel: [15812.088710] emulation failed (mmio) rip ffffffffa0370a11 0f 01 da 0f Dec 23 22:44:05 amdbox kernel: [15812.088798] emulation failed (mmio) rip ffffffffa0370a11 0f 01 da 0f Dec 23 22:44:05 amdbox kernel: [15812.088865] emulation failed (mmio) rip ffffffffa0370a11 0f 01 da 0f Dec 23 22:44:05 amdbox kernel: [15812.088917] emulation failed (mmio) rip ffffffffa0370a11 0f 01 da 0f Dec 23 22:44:05 amdbox kernel: [15812.088977] emulation failed (mmio) rip ffffffffa0370a11 0f 01 da 0f Dec 23 22:44:05 amdbox kernel: [15812.089018] emulation failed (mmio) rip ffffffffa0370a11 0f 01 da 0f Dec 23 22:44:05 amdbox kernel: [15812.089069] emulation failed (mmio) rip ffffffffa0370a11 0f 01 da 0f Dec 23 22:44:05 amdbox kernel: [15812.089110] emulation failed (mmio) rip ffffffffa0370a11 0f 01 da 0f Dec 23 22:44:05 amdbox kernel: [15812.089151] emulation failed (mmio) rip ffffffffa0370a11 0f 01 da 0f Dec 23 22:44:05 amdbox kernel: [15812.089190] emulation failed (mmio) rip ffffffffa0370a11 0f 01 da 0f This gives a lockup of the guest. I also then tried a simpler guest command: sudo qemu-system-x86_64 -enable-nesting -m 512 -drive file=/dev/storage/deshantm-desktop,if=virtio,boot=on Which also produces the same syslog messages and locks up the guest when it tries to start kvm. (I tried to start the nested kvm with onlly a cdrom as well). git-log for the kernel shows: commit 7b8052aecd9c533661493d1140cbec0e1ab311d3 Author: Alexander Graf <[email protected]> Date: Thu Dec 18 13:30:57 2008 +0100 KVM: SVM: don't run into endless loop in nested svm With the emulation optimization after clgi, we can potentially run into an endless loop thanks to while(true). While this should never occur in practise, except for when the emulation is broken or really awkward code is executed in the VM, this wasn't a problem so far. Signed-off-by: Alexander Graf <[email protected]> Signed-off-by: Avi Kivity <[email protected]> commit e72dcf1240f59174ff7c18bd461021a00ed3e38c Author: Avi Kivity <[email protected]> Date: Tue Dec 23 19:46:01 2008 +0200 git-log on kvm-userspace shows commit cd5b58d8a2fbd134b09f0be1de33773f162b79d4 Merge: a0b5207... f9cac6f... Author: Avi Kivity <[email protected]> Date: Tue Dec 23 18:52:56 2008 +0200 Merge branch 'qemu-cvs' Conflicts: qemu/Makefile qemu/Makefile.target qemu/configure qemu/hw/pc.c qemu/hw/pc.h qemu/hw/pci.c qemu/hw/virtio-net.c qemu/net.c qemu/net.h qemu/pc-bios/bios.bin qemu/pc-bios/vgabios-cirrus.bin qemu/pc-bios/vgabios.bin qemu/target-ppc/helper.c qemu/vl.c Let me know if there is any other information I can provide to help troubleshoot. Thanks, Todd -- Todd Deshane http://todddeshane.net http://runningxen.com -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
