While creating some userspace patches for the nested SVM implementation,
I stumbled across an emulation problem in the x86 emulator that was not
there some weeks ago.
Basically I'm running into an endless loop at:
NSVM: emulating at 0xe0e4077d -> 0
which is the "VMLOAD" instruction.
The endless loop is caused by this code:
while(true) {
int er;
er = emulate_instruction(&svm->vcpu, kvm_run, 0, 0, 0);
nsvm_printk("NSVM: emulating at 0x%lx -> %d\n",
svm->vcpu.arch.regs[VCPU_REGS_RIP], er);
/* So we can now emulate the SVM instructions that most
probably
occur at the end of the codepath */
if (er != EMULATE_DONE) {
while (true)
if (nested_svm_emulate(svm, kvm_run) ==
EMULATE_FAIL)
break;
break;
}
}
While I have to admit that the while(true) is potentially a bad idea and
I should limit that to like 100 instructions (patch floating around
locally), emulate_instruction always returns EMULATE_DONE, even on the
vmload instruction (which is clearly wrong).
Does anyone have ideas on this?
Alex
--
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