[Bug 65561] KVM:Entry failed on Single stepping sti instruction

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugzilla.kernel.org/show_bug.cgi?id=65561

--- Comment #18 from Jidong Xiao <jidong.xiao@xxxxxxxxx> ---
Hi, Paolo,

I am still reading the source code so as to understand the root cause of this
problem. In particular, I added some printk statements in x86_emulate_insn().
For example, I added the following printk statement.

...
        switch (c->b) {
        case 0x00 ... 0x05:
                printk(KERN_ERR "DEBUG: Passed %s %d
\n",__FUNCTION__,__LINE__);
              add:              /* add */
                emulate_2op_SrcV("add", c->src, c->dst, ctxt->eflags);
                break;
...

And then in the guest OS, I run a c program like this:

linux:~/code/testc # cat test.c
#include <stdio.h>

int main(void)
{
        int foo = 10, bar = 15;
        __asm__ __volatile__("add  %%ebx,%%eax"
                             :"=a"(foo)
                             :"a"(foo), "b"(bar)
                             );
        printf("foo+bar=%d\n", foo);
        return 0;
}

I thought that because I am using the "add" instruction, the printk statement
in the host os kernel should be invoked, however, my experimental result prove
it's untrue. So I am totally confused with this kvm emulator.

If the kvm trying to emulate these instructions, why that, when I run these
instructions in the guest, the corresponding emulate code are not invoked? So
how to trigger this printk statement? Thanks.

-- 
You are receiving this mail because:
You are watching the assignee of the bug.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux