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

--- Comment #31 from Jidong Xiao <jidong.x...@gmail.com> ---
Hi, Paolo,

I added a sti instruction in kvm-unit-tests:x86/debug.c, like this:
        asm volatile(
                "pushf\n\t"
                "pop %%rax\n\t"
                "sti\n\t"
                "or $(1<<8),%%rax\n\t"
                "push %%rax\n\t"
                "lea (%%rip),%0\n\t"
                "popf\n\t"
                "and $~(1<<8),%%rax\n\t"
                "push %%rax\n\t"
                "popf\n\t"
                : "=g" (start) : : "rax");
        report("single step",
               n == 3 &&
               bp_addr[0] == start+1+6 && dr6[0] == 0xffff4ff0 &&
               bp_addr[1] == start+1+6+1 && dr6[1] == 0xffff4ff0 &&
               bp_addr[2] == start+1+6+1+1 && dr6[2] == 0xffff4ff0);

And then make, and run the test, it looks like everything is okay.
linux:~/code/kvm-unit-tests # /usr/local2/bin/qemu-system-x86_64 -enable-kvm
-device pc-testdev -serial stdio -device isa-debug-exit,iobase=0xf4,iosize=0x4
-kernel ./x86/debug.flat
enabling apic
PASS: #BP
PASS: hw breakpoint
PASS: single step
PASS: hw watchpoint


I also tried to add a cli before sti, and the test also passed.

-- 
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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to