public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Izik Eidus <izike-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
To: Andi Kleen <andi-Vw/NltI1exuRpAAqCnN02g@public.gmane.org>
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
	Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
Subject: Re: kvm-59 doesn't work
Date: Wed, 23 Jan 2008 15:18:34 +0200	[thread overview]
Message-ID: <47973EAA.2000007@qumranet.com> (raw)
In-Reply-To: <20080115115731.GA31275-qrUzlfsMFqo/4alezvVtWx2eb7JE58TQ@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 637 bytes --]

Andi Kleen wrote:
> On Tue, Jan 15, 2008 at 12:56:52PM +0200, Avi Kivity wrote:
>   
>> Andi Kleen wrote:
>>     
>>> FWIW it seems things are broken even without -kernel in -59 too. If I try
>>> to boot an existing image with just -hda ... the VGA screen just stays
>>> black while the process runs at 99% CPU. Again with -49 it works fine.
>>>
>>>  
>>>       
>> Yes, 6b8bb99a9cde386d72b4b7c22b92f4bdec333dab in kvm-userspace.git ought 
>> to fix it.
>>     
>
> Thanks will try later. How about the oops in 2.6.24 I reported though?
>
> -Andi
>
>   
the bellow patch should fix this opss
(it is targeted for  2.6.24-rc7)

-- 
woof.


[-- Attachment #2: fix-decode.patch --]
[-- Type: text/x-patch, Size: 1815 bytes --]

>From cb019c68bea9955d553c3ef6946e3abed357f1c2 Mon Sep 17 00:00:00 2001
From: Izik Eidus <izike-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
Date: Wed, 23 Jan 2008 15:16:26 +0200
Subject: [PATCH] KVM: x86 emulator: fix decoding of registers to dst and src in case of
 instructions that declared  as SrcMem or DstMem,

right now for instructions that declared as SrcMem or DstMem we dont decode
the registers for dst and src.

Signed-off-by: Izik Eidus <izike-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
---
 drivers/kvm/x86_emulate.c |   31 ++++++++++++++++++++++++++++++-
 1 files changed, 30 insertions(+), 1 deletions(-)

diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c
index bd46de6..c5251f4 100644
--- a/drivers/kvm/x86_emulate.c
+++ b/drivers/kvm/x86_emulate.c
@@ -830,7 +830,21 @@ done_prefixes:
 		 */
 		if ((d & ModRM) && modrm_mod == 3) {
 			src.type = OP_REG;
-			break;
+			src.ptr = decode_register(modrm_reg, _regs, 0);
+			switch ((src.bytes = op_bytes)) {
+			case 1:
+				src.val = src.orig_val = *(u8 *) src.ptr;
+				break;
+			case 2:
+				src.val = src.orig_val = *(u16 *) src.ptr;
+				break;
+			case 4:
+				src.val = src.orig_val = *(u32 *) src.ptr;
+				break;
+			case 8:
+				src.val = src.orig_val = *(u64 *) src.ptr;
+				break;
+			}
 		}
 		src.type = OP_MEM;
 		src.ptr = (unsigned long *)cr2;
@@ -906,6 +920,21 @@ done_prefixes:
 		 */
 		if ((d & ModRM) && modrm_mod == 3) {
 			dst.type = OP_REG;
+			dst.ptr = decode_register(modrm_reg, _regs, 0);
+			switch ((dst.bytes = op_bytes)) {
+			case 1:
+				dst.val = *(u8 *)dst.ptr;
+				break;
+			case 2:
+				dst.val = *(u16 *)dst.ptr;
+				break;
+			case 4:
+				dst.val = *(u32 *)dst.ptr;
+				break;
+			case 8:
+				dst.val = *(u64 *)dst.ptr;
+				break;
+			}
 			break;
 		}
 		if (d & BitOp) {
-- 
1.5.3.6


[-- Attachment #3: Type: text/plain, Size: 228 bytes --]

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

[-- Attachment #4: Type: text/plain, Size: 186 bytes --]

_______________________________________________
kvm-devel mailing list
kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/kvm-devel

  parent reply	other threads:[~2008-01-23 13:18 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-13 16:27 kvm-59 doesn't work Andi Kleen
     [not found] ` <20080113162751.GA20663-3rXA9MLqAseW/qJFnhkgxti2O/JbrIOy@public.gmane.org>
2008-01-13 16:42   ` Avi Kivity
     [not found]     ` <478A3F87.6040509-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2008-01-13 17:09       ` Izik Eidus
     [not found]         ` <478A45B4.1050208-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2008-01-13 17:19           ` Anthony Liguori
2008-01-13 17:18       ` Anthony Liguori
     [not found]         ` <478A47E4.8020109-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org>
2008-01-13 17:15           ` Izik Eidus
     [not found]             ` <478A473E.5090907-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2008-01-13 20:24               ` Anthony Liguori
     [not found]                 ` <478A7382.5040406-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org>
2008-01-13 21:43                   ` Izik Eidus
2008-01-13 17:59           ` Andi Kleen
     [not found]             ` <20080113175922.GA4002-qrUzlfsMFqo/4alezvVtWx2eb7JE58TQ@public.gmane.org>
2008-01-13 18:08               ` Avi Kivity
     [not found]                 ` <478A53BB.30308-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2008-01-13 18:17                   ` Andi Kleen
     [not found]                     ` <20080113181704.GA4196-qrUzlfsMFqo/4alezvVtWx2eb7JE58TQ@public.gmane.org>
2008-01-13 18:21                       ` Avi Kivity
     [not found]                         ` <478A56BF.8020507-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2008-01-13 18:16                           ` Izik Eidus
2008-01-13 18:33                           ` Andi Kleen
     [not found]                             ` <20080113183331.GB4196-qrUzlfsMFqo/4alezvVtWx2eb7JE58TQ@public.gmane.org>
2008-01-13 18:37                               ` kvm-59 doesn't work II Andi Kleen
2008-01-13 18:41                               ` kvm-59 doesn't work Alexey Eremenko
2008-01-15 10:56                               ` Avi Kivity
     [not found]                                 ` <478C9174.6020909-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2008-01-15 11:57                                   ` Andi Kleen
     [not found]                                     ` <20080115115731.GA31275-qrUzlfsMFqo/4alezvVtWx2eb7JE58TQ@public.gmane.org>
2008-01-15 12:14                                       ` Avi Kivity
2008-01-23 13:18                                       ` Izik Eidus [this message]
     [not found]                                         ` <47973EAA.2000007-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2008-01-23 13:29                                           ` Izik Eidus
     [not found]                                             ` <47974132.40909-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2008-01-23 13:38                                               ` Laurent Vivier
2008-01-23 13:43                                                 ` Laurent Vivier
2008-01-23 15:57                                               ` Avi Kivity

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=47973EAA.2000007@qumranet.com \
    --to=izike-atkuwr5tajbwk0htik3j/w@public.gmane.org \
    --cc=andi-Vw/NltI1exuRpAAqCnN02g@public.gmane.org \
    --cc=avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org \
    --cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.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