Actual KVM support

Hi,
I’m trying to get kvm running on Lenovo Ideapad S12 via nano version. I’m using latest vanilla 2.6.30.5 and 2.6.31-rc8 kernels with 0.10.50 qemu-kvm running on arch x86_64.

# cat /proc/cpuinfo processor : 0 vendor_id : CentaurHauls cpu family : 6 model : 15 model name : VIA Nano processor U2250 (1.6GHz Capable) stepping : 3 cpu MHz : 1600.000 cache size : 1024 KB fpu : yes fpu_exception : yes cpuid level : 10 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat clflush acpi mmx fxsr sse sse2 ss tm pbe syscall nx lm constant_tsc rep_good pni monitor **vmx** est tm2 ssse3 cx16 xtpr rng rng_en ace ace_en ace2 phe phe_en lahf_lm bogomips : 3191.83 clflush size : 64 cache_alignment : 128 address sizes : 36 bits physical, 48 bits virtual power management:

Processor has Intel hardware virtualization extension. Bios that is phoenix donkey poo has no configuration for anything except boot device priority. Anyway kvm and kvm-intel modules load successfully without “kvm: disabled by bios” message. qemu-kvm starts perfectly without any warning messages. But just after VM execution starts, qemu-kvm falls in poll loop utilizing CPU by 100%. There is no even “Press F12 for boot menu” message appears. If I disable hardware virtualization with -no-kvm option VM runs normally.

Here is an piece of strace (note EAGAINs, I didn’t have a look with gdb yet). (fd 8 stands for evenfd(0) and fd 4 for a pipe (near /dev/kvm open))

select(11, [0 4 8 10], ], ], {1, 0}) = 2 (in [4 8], left {0, 999990}) read(8, "\1\0\0\0\0\0\0\0"..., 8) = 8 read(4, "\0"..., 512) = 1 read(4, 0x7fff7755f550, 512) = -1 EAGAIN (Resource temporarily unavailable) select(11, [0 4 8 10], ], ], {1, 0}) = 1 (in [10], left {0, 971451}) read(10, "\16\0\0\0\0\0\0\0\376\377\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 128) = 128 rt_sigaction(SIGALRM, NULL, {0x40b830, ~[KILL STOP RTMIN RT_1], SA_RESTORER, 0x7f993c320790}, 8) = 0 write(5, "\0"..., 1) = 1 write(9, "\1\0\0\0\0\0\0\0"..., 8) = 8 read(10, 0x7fff7755f6c0, 128) = -1 EAGAIN (Resource temporarily unavailable) timer_gettime(0, {it_interval={0, 0}, it_value={0, 0}}) = 0 timer_settime(0, 0, {it_interval={0, 0}, it_value={0, 250000}}, NULL) = 0 timer_gettime(0, {it_interval={0, 0}, it_value={0, 178343}}) = 0 select(11, [0 4 8 10], ], ], {1, 0}) = 2 (in [4 8], left {0, 999990})
This calls loops forever.

Nothing in qemu-kvm and kernel log in 2.6.30.5. And there is pretty heavy logging with 2.6.31-rc8
6585.687869] handle_exception: unexpected, vectoring info 0x8000000d intr info 0x80000b0d
6585.687894] handle_exception: unexpected, vectoring info 0x8000000d intr info 0x80000b0d
6585.687919] handle_exception: unexpected, vectoring info 0x8000000d intr info 0x80000b0d
6585.687944] handle_exception: unexpected, vectoring info 0x8000000d intr info 0x80000b0d
6585.687970] handle_exception: unexpected, vectoring info 0x8000000d intr info 0x80000b0d
6585.687995] handle_exception: unexpected, vectoring info 0x8000000d intr info 0x80000b0d

So, the question is - whose issue is this? Bios or KVM? Any tips on how I can perform dipper view on this issue?

nothing new in gdb for qemu-kvm. loop in vl.c:mail_loop_wait
-no-kvm-irqchip and -no-kvm-pit doesn’t help
values from debugfs:

/sys/kernel/debug/kvm$ for file in *; do echo $file; cat $file; done efer_reload 0 exits 40769920 fpu_reload 40680 halt_exits 0 halt_wakeup 0 host_state_reload 44958 hypercalls 0 insn_emulation 21025 insn_emulation_fail 0 invlpg 0 io_exits 15051 irq_exits 49 irq_injections 1 irq_window 1 largepages 0 mmio_exits 120 mmu_cache_miss 58 mmu_flooded 0 mmu_pde_zapped 0 mmu_pte_updated 0 mmu_pte_write 0 mmu_recycled 0 mmu_shadow_zapped 91 mmu_unsync 0 mmu_unsync_global 0 nmi_injections 0 nmi_window 0 pf_fixed 99 pf_guest 0 remote_tlb_flush 0 request_irq 0 request_nmi 0 signal_exits 0 tlb_flush 28

The only values thats grows during loop are:
exits
40769920
fpu_reload
40680
host_state_reload
44958

Pretty good kvm documentation though :smiley: I hope I can figure out what happens. No other machine with kvm working unfortunately.

Hi,

I try to use kvm too on the same CPU on my samsung NC20, my /proc/cpuinfo :

processor : 0 vendor_id : CentaurHauls cpu family : 6 model : 15 model name : VIA Nano processor U2250@1300+MHz stepping : 2 cache size : 1024 KB fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 10 wp : yes flags : fpu vme de pse msr pae mce cx8 apic sep mtrr pge mca cmov pat clflush acpi mmx fxsr sse sse2 ss tm syscall lm up pni monitor vmx est tm2 ssse3 cx16 xtpr rng rng_en ace ace_en ace2 phe phe_en lahf_lm bogomips : 995.32 clflush size : 64 power management:

I use a kernel 2.6.28-generic from Ubuntu Jaunty Jackalope 9.04 and the kvm-88 version from kvm-88.tar.gz compiled by my samsung NC20 :

[code]# qemu-system-x86_64 -version
QEMU PC emulator version 0.10.50 (qemu-kvm-devel-88), Copyright © 2003-2008 Fabrice Bellard

dmesg | tail -1

2455.592012] loaded kvm module (kvm-kmod-devel-88) [/code]

I’ve got the same problem that basilgor, infinite loops, handle_exception: unexpected, vectoring info 0x8000000d intr info 0x80000b0d and when I use the -no-kvm option, VMs works.

As basilgor -no-kvm-irqchip and -no-kvm-pit doesn’t help.