Tue, 21 Aug 2007

kvm-lite: sash prompt arrives

Friday I hit the "VFS: Cannot mount root" and thought "I'm basically there", and spent the weekend finalizing LCA paper submissions.

But I just spent much of last night and all of today getting to the sash prompt. Nasty issues included paravirt patching being terminally broken recently (but worked well enough for native), learning PAE (lguest doesn't do it, so I had been blissfully unaware) and dealing with QEMU internals. Diabolical issues included: and inject_page_fault() can be called from inside the emulation code, which has temporary copies of your registers and will "restore" them over any modifications you make. "push %ebx" is not emulated correctly by KVM, so if it faults we get a strange crash later. Finally, (and this took over a day of debugging) qemu does not seem to emulate cmpxchg8 reliably, and can zero out the %edi register. I was running the whole thing under qemu for debugging, and it took me an awfully long time to prove to myself that the host wasn't somehow corrupting guest registers.

$ wc -l kvm-lite.patch
3451 kvm-lite.patch
$ grep -c FIXME kvm-lite.patch
35

That's over 1% FIXMEs by weight! So guest what's next...


[/tech] permanent link