From: Avi Kivity <avi@qumranet.com>
To: Michal Ludvig <mludvig@logix.net.nz>
Cc: kvm-devel@lists.sourceforge.net
Subject: Re: Kernel Oops with kvm 66 running WinXP
Date: Mon, 05 May 2008 15:00:33 +0300 [thread overview]
Message-ID: <481EF6E1.1070807@qumranet.com> (raw)
In-Reply-To: <481EEB4A.4060400@logix.net.nz>
[-- Attachment #1: Type: text/plain, Size: 500 bytes --]
Michal Ludvig wrote:
>>>
>>> loaded kvm module (kvm-68)
>>> kvm: emulating exchange as write
>>> Unable to handle kernel NULL pointer dereference at 0000000000000000
>>> RIP:
>>> [<ffffffff88373b4a>] :kvm:x86_emulate_insn+0x3fa/0x4240
>>
>> Please apply the attached patch, and post 'dmesg | grep writeback'.
>
> writeback: b 01 mordm e0
>
Ah, it only affects pre-npt, so my testing was worthless. The attached
patch should fix.
--
error compiling committee.c: too many arguments to function
[-- Attachment #2: smsw-fix.patch --]
[-- Type: text/x-patch, Size: 1347 bytes --]
diff --git a/kernel/x86_emulate.c b/kernel/x86_emulate.c
index f2a696d..8a96320 100644
--- a/kernel/x86_emulate.c
+++ b/kernel/x86_emulate.c
@@ -677,8 +677,9 @@ static int decode_modrm(struct x86_emulate_ctxt *ctxt,
c->use_modrm_ea = 1;
if (c->modrm_mod == 3) {
- c->modrm_val = *(unsigned long *)
- decode_register(c->modrm_rm, c->regs, c->d & ByteOp);
+ c->modrm_ptr = decode_register(c->modrm_rm,
+ c->regs, c->d & ByteOp);
+ c->modrm_val = *(unsigned long *)c->modrm_ptr;
return rc;
}
@@ -1005,6 +1006,7 @@ done_prefixes:
if ((c->d & ModRM) && c->modrm_mod == 3) {
c->src.type = OP_REG;
c->src.val = c->modrm_val;
+ c->src.ptr = c->modrm_ptr;
break;
}
c->src.type = OP_MEM;
@@ -1049,6 +1051,7 @@ done_prefixes:
if ((c->d & ModRM) && c->modrm_mod == 3) {
c->dst.type = OP_REG;
c->dst.val = c->dst.orig_val = c->modrm_val;
+ c->dst.ptr = c->modrm_ptr;
break;
}
c->dst.type = OP_MEM;
diff --git a/include/asm-x86/kvm_x86_emulate.h b/include/asm-x86/kvm_x86_emulate.h
index d6337f9..b877bbd 100644
--- a/kernel/include/asm-x86/kvm_x86_emulate.h
+++ b/kernel/include/asm-x86/kvm_x86_emulate.h
@@ -135,6 +135,7 @@ struct decode_cache {
u8 modrm_rm;
u8 use_modrm_ea;
unsigned long modrm_ea;
+ void *modrm_ptr;
unsigned long modrm_val;
struct fetch_cache fetch;
};
[-- Attachment #3: Type: text/plain, Size: 320 bytes --]
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
[-- Attachment #4: Type: text/plain, Size: 158 bytes --]
_______________________________________________
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel
next prev parent reply other threads:[~2008-05-05 12:00 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-26 12:12 Kernel Oops with kvm 66 running WinXP Michal Ludvig
2008-04-27 12:53 ` Avi Kivity
2008-04-27 13:45 ` Avi Kivity
2008-04-28 1:43 ` Michal Ludvig
2008-05-04 23:02 ` Michal Ludvig
2008-05-05 6:46 ` Izik Eidus
2008-05-05 6:59 ` Avi Kivity
2008-05-05 7:01 ` Izik Eidus
2008-05-05 7:02 ` Avi Kivity
2008-05-05 7:04 ` Izik Eidus
2008-05-05 7:11 ` Avi Kivity
2008-05-05 11:11 ` Michal Ludvig
2008-05-05 12:00 ` Avi Kivity [this message]
2008-05-05 12:15 ` Michal Ludvig
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=481EF6E1.1070807@qumranet.com \
--to=avi@qumranet.com \
--cc=kvm-devel@lists.sourceforge.net \
--cc=mludvig@logix.net.nz \
/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