Full system emulation qemu (with ring0 and kernel)


I can’t get qemu to fully emulate my linux. The ring3 is emulated well but not the ring0/kernel code why?

I installed it from the sources, and here is the way I did it (only the configure part and the qemu launch should be important)
$ mkdir qemu_git_clone
$ mkdir installDir
$ cd qemu_git_clone
$ git clone git://git.qemu.org/qemu.git
$ cd qemu
$ ./configure --prefix=…/installDir --target-list=i386-softmmu,i386-linux-user --disable-kvm --enable-debug --disable-vnc --disable-xen --disable-brlapi --disable-vnc-tls --disable-vnc-sasl --disable-vnc-jpeg --disable-vnc-png --disable-vnc-thread --disable-system --disable-user --disable-linux-user --disable-darwin-user --disable-bsd-user --disable-guest-base
//ok there is a lot of stuff disabled even the bsd and darwin parts aren’t necessary …
$ make -j
$ sudo make install
$ cd …/installDir
$ ./bin/qemu-system-i386 /myVmdkPath/DebianWithoutGUI/DebianWithoutGUI.vmdk

i also unloaded kvm and kvm_intel in my kernel (they were loaded by default on my kubuntu)
$ sudo rmmod kvm_intel
$ sudo rmmod kvm

I am running a kubuntu 3.0.0-15-generic (64 bits archtecture).
The guest is an updated debian (32 bits architecture) (netinstall) without any GUI.

Now I have a sinple program inside my qemu guest that launches a getpid() syscall (so the int80 is called with 20 given in eax), this should go lookup in the interruption table and run the kernel code pointed by the idt entry, but (from what I understood) it just sets the environement of the emulated program in the guest and then call the real interruption handler of the kernel, and then I get the program’s pid. So nothing of the ring0 is emulated.
How can i change that ? Am I missign something (a configure flag) or qemu just don’t emulate the kernel code (anymore ?).
Any help appreciated, I don’t see a way of making qemu emulate the kernel code too now.