From: bugzilla-daemon@bugzilla.kernel.org
To: kvm@vger.kernel.org
Subject: [Bug 65561] KVM:Entry failed on Single stepping sti instruction
Date: Sat, 24 May 2014 06:15:53 +0000 [thread overview]
Message-ID: <bug-65561-28872-pLHa2o2TWx@https.bugzilla.kernel.org/> (raw)
In-Reply-To: <bug-65561-28872@https.bugzilla.kernel.org/>
https://bugzilla.kernel.org/show_bug.cgi?id=65561
--- Comment #25 from Jidong Xiao <jidong.xiao@gmail.com> ---
(In reply to Jatin Kumar from comment #24)
> > linux:~/code/cvedr # ./accessmsr
> > Segmentation fault
> You got a seg fault because it is privileged instruction and I run it in
> kernel mode not user mode. But you are likely to be running your program in
> user mode. Try something like out instruction.
>
> > Even though my c program in the guest os got a segmentation fault, from the
> > host os level, I don't see the printk statement is triggered, so this is not
> > about privileged instructions or unprivileged instructions. I think there
> > must be some other conditions to trigger these printk statements.
> After getting the VM_EXIT it must be first checking if it requires to
> emulate or should generate a fault. In this case it would have generated the
> fault without emulating it.
>
> Again, you can try it with 'out' instruction.
Alright, Jatin, I wrote a kernel module, like this:
linux:~/code/module # cat testout.c
#include <linux/module.h>
#include <linux/kernel.h>
int init_module(void)
{
printk(KERN_ALERT "Hello world 1.\n");
asm __volatile__("outb %al, %dx \n");
return 0;
}
void cleanup_module(void)
{
printk(KERN_ALERT "Goodbye world 1.\n");
}
I compiled this module and installed with `insmod testout.ko`, and nothing
happens. Noted that the emulator code includes the following lines:
case 0xee: /* out al,dx */
case 0xef: /* out (e/r)ax,dx */
printk(KERN_ERR "DEBUG: Passed %s %d
\n",__FUNCTION__,__LINE__);
port = c->regs[VCPU_REGS_RDX];
io_dir_in = 0;
I added that printk statement, and still, when I was loading the kernel module
in the guest OS, this printk statement was not invoked.
--
You are receiving this mail because:
You are watching the assignee of the bug.
next prev parent reply other threads:[~2014-05-24 6:15 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-23 17:27 [Bug 65561] New: KVM:Entry failed on Single stepping sti instruction bugzilla-daemon
2014-05-20 5:12 ` [Bug 65561] " bugzilla-daemon
2014-05-20 7:10 ` bugzilla-daemon
2014-05-20 11:03 ` bugzilla-daemon
2014-05-20 21:00 ` bugzilla-daemon
2014-05-21 4:43 ` bugzilla-daemon
2014-05-21 4:45 ` bugzilla-daemon
2014-05-21 7:13 ` bugzilla-daemon
2014-05-21 15:13 ` bugzilla-daemon
2014-05-21 15:20 ` bugzilla-daemon
2014-05-21 16:05 ` bugzilla-daemon
2014-05-21 16:30 ` bugzilla-daemon
2014-05-21 16:39 ` bugzilla-daemon
2014-05-21 16:50 ` bugzilla-daemon
2014-05-21 17:14 ` bugzilla-daemon
2014-05-21 20:30 ` bugzilla-daemon
2014-05-21 21:08 ` bugzilla-daemon
2014-05-22 2:02 ` bugzilla-daemon
2014-05-24 4:59 ` bugzilla-daemon
2014-05-24 5:27 ` bugzilla-daemon
2014-05-24 5:38 ` bugzilla-daemon
2014-05-24 5:43 ` bugzilla-daemon
2014-05-24 5:46 ` bugzilla-daemon
2014-05-24 5:51 ` bugzilla-daemon
2014-05-24 5:56 ` bugzilla-daemon
2014-05-24 6:15 ` bugzilla-daemon [this message]
2014-05-24 6:29 ` bugzilla-daemon
2014-05-24 7:24 ` bugzilla-daemon
2014-05-24 12:26 ` bugzilla-daemon
2014-05-24 23:12 ` bugzilla-daemon
2014-05-25 3:03 ` bugzilla-daemon
2014-05-25 6:46 ` bugzilla-daemon
2014-05-25 7:48 ` bugzilla-daemon
2014-05-25 7:58 ` bugzilla-daemon
2014-05-25 8:00 ` bugzilla-daemon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-65561-28872-pLHa2o2TWx@https.bugzilla.kernel.org/ \
--to=bugzilla-daemon@bugzilla.kernel.org \
--cc=kvm@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox