From mboxrd@z Thu Jan 1 00:00:00 1970
From: bugzilla-daemon@bugzilla.kernel.org
Subject: [Bug 65561] KVM:Entry failed on Single stepping sti instruction
Date: Sat, 24 May 2014 04:59:01 +0000
Message-ID:
References:
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
To: kvm@vger.kernel.org
Return-path:
Received: from mail.kernel.org ([198.145.19.201]:60893 "EHLO mail.kernel.org"
rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
id S1750748AbaEXE7E (ORCPT );
Sat, 24 May 2014 00:59:04 -0400
Received: from mail.kernel.org (localhost [127.0.0.1])
by mail.kernel.org (Postfix) with ESMTP id 2785D203FB
for ; Sat, 24 May 2014 04:59:03 +0000 (UTC)
Received: from bugzilla2.web.kernel.org (bugzilla2.web.kernel.org [172.20.200.52])
by mail.kernel.org (Postfix) with ESMTP id 8F2B8203E3
for ; Sat, 24 May 2014 04:59:01 +0000 (UTC)
In-Reply-To:
Sender: kvm-owner@vger.kernel.org
List-ID:
https://bugzilla.kernel.org/show_bug.cgi?id=65561
--- Comment #18 from Jidong Xiao ---
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
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.