Izik Eidus wrote:
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)

sorry i forgat one break in this patch
this is the fixed patch.

--
woof.

commit c481bc1108ebf293b7ea23c478378f360ef51758
Author: Izik Eidus <[EMAIL PROTECTED]>
Date:   Wed Jan 23 15:16:26 2008 +0200

    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 <[EMAIL PROTECTED]>

diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c
index bd46de6..1764afe 100644
--- a/drivers/kvm/x86_emulate.c
+++ b/drivers/kvm/x86_emulate.c
@@ -830,6 +830,21 @@ done_prefixes:
 		 */
 		if ((d & ModRM) && modrm_mod == 3) {
 			src.type = OP_REG;
+			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;
+			}
 			break;
 		}
 		src.type = OP_MEM;
@@ -906,6 +921,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) {
-------------------------------------------------------------------------
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/
_______________________________________________
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel

Reply via email to