Hi there,
I run a guest VM in KVM, but it always get paused in the boot process. Below is the info about my environment,
- Host OS: ubuntu 12.04 64bits with linux kernel 3.2.0.36-generic and the default kvm package
- Guest OS: linux kernel 2.6.23, 64bits, two cpus, 4GB memory
What’s wired is that the guest VM works well with uniprocess.
The guest VM is paused by the error “emulation failure”. And i find that it’s caused by an instruction in the trampoline_data section – refer to arch/x86_64/kernel/trampoline.S. I’m not sure about the SMP boot process, but it’s said BSP uses IPI to start APs, and the APs will start run the trampoline code in real mode. As shown in the trampoline.S code, the first 4 bytes will be changed to a5a5a5a5 to make a marker to let BSP know that the code has been executed by APs. But i found that BSP will run the same code section after APs have changed the first 4 bytes, but BSP starts from the fifth byte (eip=4), which is ‘C8’ and an invalid instruction.
I’m not sure if it’s normal for BSP to run the trampoline code, but it’s definitely wrong to execute from that offset. It’s said it may be caused by APIC emulation in kernel space, but I’m not sure about this.
Anyone can help me? any suggestions will be much appreciated.