Skip to contentSkip to conversation

Kernel Oops with kvm 66 running WinXP

DISCUSSION Michal Ludvig 3 participants 14 messages Apr 26, 2008 – May 5, 2008 KVM

lore
Share & tools
lore
#0 lore raw

Hi,

I've experienced a kernel Oops on 2.6.24 with kvm 66 on AMD in 64bit mode while starting up WinXP:

kvm: emulating exchange as write

Unable to handle kernel NULL pointer dereference at 0000000000000000 RIP:
  [<ffffffff883a7a5a>] :kvm:x86_emulate_insn+0x3fa/0x4240
PGD 7658d067 PUD 242a6067 PMD 0
Oops: 0002 [1] SMP
CPU 0
Modules linked in: bridge llc reiserfs tun kvm_amd kvm nfs nfsd lockd 

nfs_acl auth_rpcgss sunrpc exportfs w83627ehf hwmon_vid autofs4 snd_pcm_oss snd_mixer_oss snd_seq snd_seq_device iptable_filter ip_tables ip6table_filter ip6_tables x_tables af_packet ipv6 fuse ext2 loop snd_hda_intel snd_pcm snd_timer k8temp i2c_nforce2 i2c_core hwmon sr_mod button cdrom snd soundcore snd_page_alloc forcedeth sg floppy linear sd_mod ehci_hcd ohci_hcd usbcore dm_snapshot edd dm_mod fan sata_nv pata_amd libata scsi_mod thermal processor
Pid: 3139, comm: qemu-system-x86 Not tainted 2.6.24-mludvig #1

RIP: 0010:[<ffffffff883a7a5a>]  [<ffffffff883a7a5a>] 
:kvm:x86_emulate_insn+0x3fa/0x4240
RSP: 0018:ffff8100609fdc18  EFLAGS: 00010246
RAX: 000000008001003b RBX: 0000000000000000 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff8100609fe000
RBP: ffff8100609ff320 R08: ffff8100609ff3c0 R09: 0000000000000006
R10: 0000000000000002 R11: 0000000000000000 R12: ffff8100609ff368
R13: ffff8100609ff3c0 R14: ffffffff883be600 R15: 0000000001971353
FS:  0000000040804950(0063) GS:ffffffff8053e000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 0000000000000000 CR3: 000000006bb74000 CR4: 00000000000006e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process qemu-system-x86 (pid: 3139, threadinfo ffff8100609fc000, task 
ffff8100794d5680)
Stack:  00000000609fdc74 0000000012187318 000000000ea5f068 ffff8100609ff3c0
  ffff8100609fdc94 ffffffff8839c9e0 0000000000000000 ffff8100609fe000
  ffff8100609ff320 0000000000000000 0000000000000000 0000000000000000
Call Trace:
  [<ffffffff8839c9e0>] :kvm:kvm_get_cs_db_l_bits+0x20/0x40
  [<ffffffff8839dd2f>] :kvm:emulate_instruction+0x1bf/0x340
  [<ffffffff883c1a22>] :kvm_amd:emulate_on_interception+0x12/0x60
  [<ffffffff883a11d9>] :kvm:kvm_arch_vcpu_ioctl_run+0x169/0x6d0
  [<ffffffff8839c14c>] :kvm:kvm_vcpu_ioctl+0x41c/0x440
  [<ffffffff802305f3>] __wake_up+0x43/0x70
  [<ffffffff803374c1>] __up_read+0x21/0xb0
  [<ffffffff802586ec>] futex_wake+0xcc/0xf0
  [<ffffffff80259559>] do_futex+0x129/0xbb0
  [<ffffffff8022e7bd>] __dequeue_entity+0x3d/0x50
  [<ffffffff8839b925>] :kvm:kvm_vm_ioctl+0x85/0x200
  [<ffffffff802ab10f>] do_ioctl+0x2f/0xa0
  [<ffffffff802ab3a0>] vfs_ioctl+0x220/0x2d0
  [<ffffffff802ab4e1>] sys_ioctl+0x91/0xb0
  [<ffffffff8020bcae>] system_call+0x7e/0x83


Code: 66 89 02 e9 ee fc ff ff 48 8b 95 88 00 00 00 48 8b 45 78 88
RIP  [<ffffffff883a7a5a>] :kvm:x86_emulate_insn+0x3fa/0x4240
  RSP <ffff8100609fdc18>
CR2: 0000000000000000
---[ end trace d358bab3f035112e ]---

The host is still alive but the XP guest is locked up in a boot screen.

Michal

-------------------------------------------------------------------------
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

#1 lore raw
Quoted 62 lines · Michal Ludvig

Hi,

I've experienced a kernel Oops on 2.6.24 with kvm 66 on AMD in 64bit mode while starting up WinXP:

kvm: emulating exchange as write

Unable to handle kernel NULL pointer dereference at 0000000000000000 RIP:
  [<ffffffff883a7a5a>] :kvm:x86_emulate_insn+0x3fa/0x4240
PGD 7658d067 PUD 242a6067 PMD 0
Oops: 0002 [1] SMP
CPU 0
Modules linked in: bridge llc reiserfs tun kvm_amd kvm nfs nfsd lockd 

nfs_acl auth_rpcgss sunrpc exportfs w83627ehf hwmon_vid autofs4 snd_pcm_oss snd_mixer_oss snd_seq snd_seq_device iptable_filter ip_tables ip6table_filter ip6_tables x_tables af_packet ipv6 fuse ext2 loop snd_hda_intel snd_pcm snd_timer k8temp i2c_nforce2 i2c_core hwmon sr_mod button cdrom snd soundcore snd_page_alloc forcedeth sg floppy linear sd_mod ehci_hcd ohci_hcd usbcore dm_snapshot edd dm_mod fan sata_nv pata_amd libata scsi_mod thermal processor
Pid: 3139, comm: qemu-system-x86 Not tainted 2.6.24-mludvig #1

RIP: 0010:[<ffffffff883a7a5a>]  [<ffffffff883a7a5a>] 
:kvm:x86_emulate_insn+0x3fa/0x4240
RSP: 0018:ffff8100609fdc18  EFLAGS: 00010246
RAX: 000000008001003b RBX: 0000000000000000 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff8100609fe000
RBP: ffff8100609ff320 R08: ffff8100609ff3c0 R09: 0000000000000006
R10: 0000000000000002 R11: 0000000000000000 R12: ffff8100609ff368
R13: ffff8100609ff3c0 R14: ffffffff883be600 R15: 0000000001971353
FS:  0000000040804950(0063) GS:ffffffff8053e000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 0000000000000000 CR3: 000000006bb74000 CR4: 00000000000006e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process qemu-system-x86 (pid: 3139, threadinfo ffff8100609fc000, task 
ffff8100794d5680)
Stack:  00000000609fdc74 0000000012187318 000000000ea5f068 ffff8100609ff3c0
  ffff8100609fdc94 ffffffff8839c9e0 0000000000000000 ffff8100609fe000
  ffff8100609ff320 0000000000000000 0000000000000000 0000000000000000
Call Trace:
  [<ffffffff8839c9e0>] :kvm:kvm_get_cs_db_l_bits+0x20/0x40
  [<ffffffff8839dd2f>] :kvm:emulate_instruction+0x1bf/0x340
  [<ffffffff883c1a22>] :kvm_amd:emulate_on_interception+0x12/0x60
  [<ffffffff883a11d9>] :kvm:kvm_arch_vcpu_ioctl_run+0x169/0x6d0
  [<ffffffff8839c14c>] :kvm:kvm_vcpu_ioctl+0x41c/0x440
  [<ffffffff802305f3>] __wake_up+0x43/0x70
  [<ffffffff803374c1>] __up_read+0x21/0xb0
  [<ffffffff802586ec>] futex_wake+0xcc/0xf0
  [<ffffffff80259559>] do_futex+0x129/0xbb0
  [<ffffffff8022e7bd>] __dequeue_entity+0x3d/0x50
  [<ffffffff8839b925>] :kvm:kvm_vm_ioctl+0x85/0x200
  [<ffffffff802ab10f>] do_ioctl+0x2f/0xa0
  [<ffffffff802ab3a0>] vfs_ioctl+0x220/0x2d0
  [<ffffffff802ab4e1>] sys_ioctl+0x91/0xb0
  [<ffffffff8020bcae>] system_call+0x7e/0x83


Code: 66 89 02 e9 ee fc ff ff 48 8b 95 88 00 00 00 48 8b 45 78 88
RIP  [<ffffffff883a7a5a>] :kvm:x86_emulate_insn+0x3fa/0x4240
  RSP <ffff8100609fdc18>
CR2: 0000000000000000
---[ end trace d358bab3f035112e ]---
Quoted 3 lines

The host is still alive but the XP guest is locked up in a boot screen.

Please mail me (privately) an 'objdump -Sr x86_emulate.o' from the kernel directory, so we can see where this happened.

Signature · 8 lines
error compiling committee.c: too many arguments to function


-------------------------------------------------------------------------
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
#2 lore raw
Quoted 53 lines · Avi Kivity
Quoted 52 lines · Michal Ludvig

Hi,

I've experienced a kernel Oops on 2.6.24 with kvm 66 on AMD in 64bit mode while starting up WinXP:

kvm: emulating exchange as write

Unable to handle kernel NULL pointer dereference at 0000000000000000 RIP:
  [<ffffffff883a7a5a>] :kvm:x86_emulate_insn+0x3fa/0x4240
PGD 7658d067 PUD 242a6067 PMD 0
Oops: 0002 [1] SMP
CPU 0
Modules linked in: bridge llc reiserfs tun kvm_amd kvm nfs nfsd lockd nfs_acl auth_rpcgss sunrpc exportfs w83627ehf hwmon_vid autofs4 snd_pcm_oss snd_mixer_oss snd_seq snd_seq_device iptable_filter ip_tables ip6table_filter ip6_tables x_tables af_packet ipv6 fuse ext2 loop snd_hda_intel snd_pcm snd_timer k8temp i2c_nforce2 i2c_core hwmon sr_mod button cdrom snd soundcore snd_page_alloc forcedeth sg floppy linear sd_mod ehci_hcd ohci_hcd usbcore dm_snapshot edd dm_mod fan sata_nv pata_amd libata scsi_mod thermal processor
Pid: 3139, comm: qemu-system-x86 Not tainted 2.6.24-mludvig #1
RIP: 0010:[<ffffffff883a7a5a>]  [<ffffffff883a7a5a>] :kvm:x86_emulate_insn+0x3fa/0x4240
RSP: 0018:ffff8100609fdc18  EFLAGS: 00010246
RAX: 000000008001003b RBX: 0000000000000000 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff8100609fe000
RBP: ffff8100609ff320 R08: ffff8100609ff3c0 R09: 0000000000000006
R10: 0000000000000002 R11: 0000000000000000 R12: ffff8100609ff368
R13: ffff8100609ff3c0 R14: ffffffff883be600 R15: 0000000001971353
FS:  0000000040804950(0063) GS:ffffffff8053e000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 0000000000000000 CR3: 000000006bb74000 CR4: 00000000000006e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process qemu-system-x86 (pid: 3139, threadinfo ffff8100609fc000, task ffff8100794d5680)
Stack:  00000000609fdc74 0000000012187318 000000000ea5f068 ffff8100609ff3c0
  ffff8100609fdc94 ffffffff8839c9e0 0000000000000000 ffff8100609fe000
  ffff8100609ff320 0000000000000000 0000000000000000 0000000000000000
Call Trace:
  [<ffffffff8839c9e0>] :kvm:kvm_get_cs_db_l_bits+0x20/0x40
  [<ffffffff8839dd2f>] :kvm:emulate_instruction+0x1bf/0x340
  [<ffffffff883c1a22>] :kvm_amd:emulate_on_interception+0x12/0x60
  [<ffffffff883a11d9>] :kvm:kvm_arch_vcpu_ioctl_run+0x169/0x6d0
  [<ffffffff8839c14c>] :kvm:kvm_vcpu_ioctl+0x41c/0x440
  [<ffffffff802305f3>] __wake_up+0x43/0x70
  [<ffffffff803374c1>] __up_read+0x21/0xb0
  [<ffffffff802586ec>] futex_wake+0xcc/0xf0
  [<ffffffff80259559>] do_futex+0x129/0xbb0
  [<ffffffff8022e7bd>] __dequeue_entity+0x3d/0x50
  [<ffffffff8839b925>] :kvm:kvm_vm_ioctl+0x85/0x200
  [<ffffffff802ab10f>] do_ioctl+0x2f/0xa0
  [<ffffffff802ab3a0>] vfs_ioctl+0x220/0x2d0
  [<ffffffff802ab4e1>] sys_ioctl+0x91/0xb0
  [<ffffffff8020bcae>] system_call+0x7e/0x83


Code: 66 89 02 e9 ee fc ff ff 48 8b 95 88 00 00 00 48 8b 45 78 88
RIP  [<ffffffff883a7a5a>] :kvm:x86_emulate_insn+0x3fa/0x4240
  RSP <ffff8100609fdc18>
CR2: 0000000000000000
---[ end trace d358bab3f035112e ]---
Quoted 6 lines
Quoted 3 lines

The host is still alive but the XP guest is locked up in a boot screen.

Please mail me (privately) an 'objdump -Sr x86_emulate.o' from the kernel directory, so we can see where this happened.

Ok. Please try with the attached patch and let us know. Also repeat without the patch, so we can be sure it is easily reproducible.

Signature · 1 line
error compiling committee.c: too many arguments to function
kernel/x86_emulate.c +12 -17
index 46ef78f..8e1b32f 100644
@@ -275,15 +275,12 @@ static u16 group_table[] = {
 	SrcMem | ModRM, 0, SrcMem | ModRM | Stack, 0,
 	[Group7*8] =
 	0, 0, ModRM | SrcMem, ModRM | SrcMem,
-	SrcNone | ModRM | DstMem | Mov, 0,
-	SrcMem16 | ModRM | Mov, SrcMem | ModRM | ByteOp,
+	SrcNone | ModRM | DstMem, 0, SrcMem | ModRM, SrcMem | ModRM | ByteOp,
 };
 
 static u16 group2_table[] = {
 	[Group7*8] =
-	SrcNone | ModRM, 0, 0, 0,
-	SrcNone | ModRM | DstMem | Mov, 0,
-	SrcMem16 | ModRM | Mov, 0,
+	SrcNone | ModRM, 0, 0, 0, SrcNone | ModRM | DstMem, 0, SrcMem | ModRM, 0,
 };
 
 /* EFLAGS bit definitions. */
@@ -1725,8 +1722,6 @@ twobyte_insn:
 				goto done;
 
 			kvm_emulate_hypercall(ctxt->vcpu);
-			/* Disable writeback. */
-			c->dst.type = OP_NONE;
 			break;
 		case 2: /* lgdt */
 			rc = read_descriptor(ctxt, ops, c->src.ptr,
@@ -1734,8 +1729,6 @@ twobyte_insn:
 			if (rc)
 				goto done;
 			realmode_lgdt(ctxt->vcpu, size, address);
-			/* Disable writeback. */
-			c->dst.type = OP_NONE;
 			break;
 		case 3: /* lidt/vmmcall */
 			if (c->modrm_mod == 3 && c->modrm_rm == 1) {
@@ -1751,25 +1744,27 @@ twobyte_insn:
 					goto done;
 				realmode_lidt(ctxt->vcpu, size, address);
 			}
-			/* Disable writeback. */
-			c->dst.type = OP_NONE;
 			break;
 		case 4: /* smsw */
-			c->dst.bytes = 2;
-			c->dst.val = realmode_get_cr(ctxt->vcpu, 0);
+			if (c->modrm_mod != 3)
+				goto cannot_emulate;
+			*(u16 *)&c->regs[c->modrm_rm]
+				= realmode_get_cr(ctxt->vcpu, 0);
 			break;
 		case 6: /* lmsw */
-			realmode_lmsw(ctxt->vcpu, (u16)c->src.val,
-				      &ctxt->eflags);
+			if (c->modrm_mod != 3)
+				goto cannot_emulate;
+			realmode_lmsw(ctxt->vcpu, (u16)c->modrm_val,
+						  &ctxt->eflags);
 			break;
 		case 7: /* invlpg*/
 			emulate_invlpg(ctxt->vcpu, memop);
-			/* Disable writeback. */
-			c->dst.type = OP_NONE;
 			break;
 		default:
 			goto cannot_emulate;
 		}
+		/* Disable writeback. */
+		c->dst.type = OP_NONE;
 		break;
 	case 0x06:
 		emulate_clts(ctxt->vcpu);

-------------------------------------------------------------------------
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

_______________________________________________
kvm-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel

#3 lore raw
Quoted 18 lines · Avi Kivity
Quoted 17 lines · Avi Kivity
Quoted 15 lines · Michal Ludvig

Hi,

I've experienced a kernel Oops on 2.6.24 with kvm 66 on AMD in 64bit mode while starting up WinXP:

kvm: emulating exchange as write

Unable to handle kernel NULL pointer dereference at 0000000000000000 
RIP:
  [<ffffffff883a7a5a>] :kvm:x86_emulate_insn+0x3fa/0x4240
PGD 7658d067 PUD 242a6067 PMD 0
Oops: 0002 [1] SMP

[...]
The host is still alive but the XP guest is locked up in a boot screen.

Quoted 6 lines
Quoted 3 lines

Please mail me (privately) an 'objdump -Sr x86_emulate.o' from the kernel directory, so we can see where this happened.

Ok. Please try with the attached patch and let us know. Also repeat without the patch, so we can be sure it is easily reproducible.

Hi, the patch fixed the problem, thanks. It was 100% reproducible (Oops in 3 out of 3 attempts) and now it booted up.

Michal

-------------------------------------------------------------------------
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

#4 lore raw
In reply to Avi Kivity
Quoted 8 lines · Avi Kivity
Quoted 7 lines · Avi Kivity
Quoted 6 lines · Michal Ludvig

Hi,

I've experienced a kernel Oops on 2.6.24 with kvm 66 on AMD in 64bit mode while starting up WinXP:

The host is still alive but the XP guest is locked up in a boot screen.

Hi again, just wanted to let you know that I still get this Oops with kvm-68. It comes a bit later, not during the boot but after the XP desktop comes up. As there were some changes in kernel/x86_emulate.c the patch you provided for kvm-66 can't be applied anymore.

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
PGD 3145e067 PUD 409b9067 PMD 0
Oops: 0002 [1] SMP
CPU 0
Modules linked in: kvm_amd kvm reiserfs tun bridge llc nfsd lockd 

nfs_acl auth_rpcgss sunrpc exportfs iptable_filter ip_tables autofs4 snd_pcm_oss snd_mixer_oss w83627ehf snd_seq snd_seq_device hwmon_vid ip6table_filter ip6_tables x_tables af_packet ipv6 fuse ext2 loop snd_hda_intel snd_pcm snd_timer snd soundcore snd_page_alloc sr_mod k8temp hwmon i2c_nforce2 button i2c_core cdrom forcedeth sg floppy linear ehci_hcd ohci_hcd sd_mod usbcore dm_snapshot edd dm_mod fan sata_nv pata_amd libata scsi_mod thermal processor
Pid: 14776, comm: qemu-system-x86 Not tainted 2.6.24-mludvig #1

RIP: 0010:[<ffffffff88373b4a>]  [<ffffffff88373b4a>] 
:kvm:x86_emulate_insn+0x3fa/0x4240
RSP: 0018:ffff81007d52fc18  EFLAGS: 00010246
RAX: 000000008001003b RBX: 0000000000000000 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff810079c5c000
RBP: ffff810079c5d320 R08: ffff810079c5d3c0 R09: 0000000000000006
R10: 0000000000000002 R11: 0000000000000000 R12: ffff810079c5d368
R13: ffff810079c5d3c0 R14: ffffffff8838ab20 R15: 00000000019d1353
FS:  0000000040800950(0063) GS:ffffffff8053e000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 0000000000000000 CR3: 000000007985a000 CR4: 00000000000006e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process qemu-system-x86 (pid: 14776, threadinfo ffff81007d52e000, task 
ffff81003f4e6780)
Stack:  000000007d52fc74 0000000011fda618 000000000f399068 ffff810079c5d3c0
  ffff81007d52fc94 ffffffff88368ae0 0000000000000000 ffff810079c5c000
  ffff810079c5d320 0000000000000000 0000000000000000 0000000000000000
Call Trace:
  [<ffffffff88368ae0>] :kvm:seg_desct_to_kvm_desct+0x40/0xb0
  [<ffffffff88369dff>] :kvm:emulate_instruction+0x1bf/0x340
  [<ffffffff883d99e2>] :kvm_amd:emulate_on_interception+0x12/0x60
  [<ffffffff8836d2b9>] :kvm:kvm_arch_vcpu_ioctl_run+0x169/0x6d0
  [<ffffffff883681fc>] :kvm:kvm_vcpu_ioctl+0x41c/0x440
  [<ffffffff802305f3>] __wake_up+0x43/0x70
  [<ffffffff803374c1>] __up_read+0x21/0xb0
  [<ffffffff802586ec>] futex_wake+0xcc/0xf0
  [<ffffffff80259559>] do_futex+0x129/0xbb0
  [<ffffffff8022e7bd>] __dequeue_entity+0x3d/0x50
  [<ffffffff883679c5>] :kvm:kvm_vm_ioctl+0x85/0x200
  [<ffffffff8044357f>] thread_return+0x3a/0x62b
  [<ffffffff8027a620>] do_writepages+0x20/0x40
  [<ffffffff802ab10f>] do_ioctl+0x2f/0xa0
  [<ffffffff802ab3a0>] vfs_ioctl+0x220/0x2d0
  [<ffffffff802ab4e1>] sys_ioctl+0x91/0xb0
  [<ffffffff8020bcae>] system_call+0x7e/0x83


Code: 66 89 02 e9 ee fc ff ff 48 8b 95 88 00 00 00 48 8b 45 78 88
RIP  [<ffffffff88373b4a>] :kvm:x86_emulate_insn+0x3fa/0x4240
  RSP <ffff81007d52fc18>
CR2: 0000000000000000
---[ end trace d485159bd8f95a33 ]---

Michal

-------------------------------------------------------------------------
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

#5 lore raw
Quoted 43 lines · Michal Ludvig
Quoted 8 lines · Avi Kivity
Quoted 7 lines · Avi Kivity
Quoted 6 lines · Michal Ludvig

Hi,

I've experienced a kernel Oops on 2.6.24 with kvm 66 on AMD in 64bit mode while starting up WinXP:

The host is still alive but the XP guest is locked up in a boot screen.

Hi again, just wanted to let you know that I still get this Oops with kvm-68. It comes a bit later, not during the boot but after the XP desktop comes up. As there were some changes in kernel/x86_emulate.c the patch you provided for kvm-66 can't be applied anymore.

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
PGD 3145e067 PUD 409b9067 PMD 0
Oops: 0002 [1] SMP
CPU 0
Modules linked in: kvm_amd kvm reiserfs tun bridge llc nfsd lockd 

nfs_acl auth_rpcgss sunrpc exportfs iptable_filter ip_tables autofs4 snd_pcm_oss snd_mixer_oss w83627ehf snd_seq snd_seq_device hwmon_vid ip6table_filter ip6_tables x_tables af_packet ipv6 fuse ext2 loop snd_hda_intel snd_pcm snd_timer snd soundcore snd_page_alloc sr_mod k8temp hwmon i2c_nforce2 button i2c_core cdrom forcedeth sg floppy linear ehci_hcd ohci_hcd sd_mod usbcore dm_snapshot edd dm_mod fan sata_nv pata_amd libata scsi_mod thermal processor
Pid: 14776, comm: qemu-system-x86 Not tainted 2.6.24-mludvig #1

RIP: 0010:[<ffffffff88373b4a>]  [<ffffffff88373b4a>] 
:kvm:x86_emulate_insn+0x3fa/0x4240
RSP: 0018:ffff81007d52fc18  EFLAGS: 00010246
RAX: 000000008001003b RBX: 0000000000000000 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff810079c5c000
RBP: ffff810079c5d320 R08: ffff810079c5d3c0 R09: 0000000000000006
R10: 0000000000000002 R11: 0000000000000000 R12: ffff810079c5d368
R13: ffff810079c5d3c0 R14: ffffffff8838ab20 R15: 00000000019d1353
FS:  0000000040800950(0063) GS:ffffffff8053e000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 0000000000000000 CR3: 000000007985a000 CR4: 00000000000006e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
Quoted 8 lines
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process qemu-system-x86 (pid: 14776, threadinfo ffff81007d52e000, task 
ffff81003f4e6780)
Stack:  000000007d52fc74 0000000011fda618 000000000f399068 ffff810079c5d3c0
  ffff81007d52fc94 ffffffff88368ae0 0000000000000000 ffff810079c5c000
  ffff810079c5d320 0000000000000000 0000000000000000 0000000000000000
Call Trace:
  [<ffffffff88368ae0>] :kvm:seg_desct_to_kvm_desct+0x40/0xb0

ok, if we are here it mean windows did task switch,
and if windows did task switch it mean something was probably wrong before.

Quoted 35 lines

[<ffffffff88369dff>] :kvm:emulate_instruction+0x1bf/0x340 [<ffffffff883d99e2>] :kvm_amd:emulate_on_interception+0x12/0x60 [<ffffffff8836d2b9>] :kvm:kvm_arch_vcpu_ioctl_run+0x169/0x6d0 [<ffffffff883681fc>] :kvm:kvm_vcpu_ioctl+0x41c/0x440

  [<ffffffff802305f3>] __wake_up+0x43/0x70
  [<ffffffff803374c1>] __up_read+0x21/0xb0
  [<ffffffff802586ec>] futex_wake+0xcc/0xf0
  [<ffffffff80259559>] do_futex+0x129/0xbb0
  [<ffffffff8022e7bd>] __dequeue_entity+0x3d/0x50
  [<ffffffff883679c5>] :kvm:kvm_vm_ioctl+0x85/0x200
  [<ffffffff8044357f>] thread_return+0x3a/0x62b
  [<ffffffff8027a620>] do_writepages+0x20/0x40
  [<ffffffff802ab10f>] do_ioctl+0x2f/0xa0
  [<ffffffff802ab3a0>] vfs_ioctl+0x220/0x2d0
  [<ffffffff802ab4e1>] sys_ioctl+0x91/0xb0
  [<ffffffff8020bcae>] system_call+0x7e/0x83


Code: 66 89 02 e9 ee fc ff ff 48 8b 95 88 00 00 00 48 8b 45 78 88
RIP  [<ffffffff88373b4a>] :kvm:x86_emulate_insn+0x3fa/0x4240
  RSP <ffff81007d52fc18>
CR2: 0000000000000000
---[ end trace d485159bd8f95a33 ]---

Michal

-------------------------------------------------------------------------
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
_______________________________________________
kvm-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel

Signature · 7 lines
woof.

-------------------------------------------------------------------------
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
#6 lore raw
Quoted 58 lines · Izik Eidus
Quoted 46 lines · Michal Ludvig
Quoted 11 lines · Avi Kivity
Quoted 9 lines · Avi Kivity
Quoted 7 lines · Michal Ludvig

Hi,

I've experienced a kernel Oops on 2.6.24 with kvm 66 on AMD in 64bit mode while starting up WinXP:

The host is still alive but the XP guest is locked up in a boot screen.

Hi again, just wanted to let you know that I still get this Oops with kvm-68. It comes a bit later, not during the boot but after the XP desktop comes up. As there were some changes in kernel/x86_emulate.c the patch you provided for kvm-66 can't be applied anymore.

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
PGD 3145e067 PUD 409b9067 PMD 0
Oops: 0002 [1] SMP
CPU 0
Modules linked in: kvm_amd kvm reiserfs tun bridge llc nfsd lockd 

nfs_acl auth_rpcgss sunrpc exportfs iptable_filter ip_tables autofs4 snd_pcm_oss snd_mixer_oss w83627ehf snd_seq snd_seq_device hwmon_vid ip6table_filter ip6_tables x_tables af_packet ipv6 fuse ext2 loop snd_hda_intel snd_pcm snd_timer snd soundcore snd_page_alloc sr_mod k8temp hwmon i2c_nforce2 button i2c_core cdrom forcedeth sg floppy linear ehci_hcd ohci_hcd sd_mod usbcore dm_snapshot edd dm_mod fan sata_nv pata_amd libata scsi_mod thermal processor
Pid: 14776, comm: qemu-system-x86 Not tainted 2.6.24-mludvig #1

RIP: 0010:[<ffffffff88373b4a>]  [<ffffffff88373b4a>] 
:kvm:x86_emulate_insn+0x3fa/0x4240
RSP: 0018:ffff81007d52fc18  EFLAGS: 00010246
RAX: 000000008001003b RBX: 0000000000000000 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff810079c5c000
RBP: ffff810079c5d320 R08: ffff810079c5d3c0 R09: 0000000000000006
R10: 0000000000000002 R11: 0000000000000000 R12: ffff810079c5d368
R13: ffff810079c5d3c0 R14: ffffffff8838ab20 R15: 00000000019d1353
FS:  0000000040800950(0063) GS:ffffffff8053e000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 0000000000000000 CR3: 000000007985a000 CR4: 00000000000006e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
Quoted 9 lines
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process qemu-system-x86 (pid: 14776, threadinfo ffff81007d52e000, task 
ffff81003f4e6780)
Stack:  000000007d52fc74 0000000011fda618 000000000f399068 ffff810079c5d3c0
  ffff81007d52fc94 ffffffff88368ae0 0000000000000000 ffff810079c5c000
  ffff810079c5d320 0000000000000000 0000000000000000 0000000000000000
Call Trace:
  [<ffffffff88368ae0>] :kvm:seg_desct_to_kvm_desct+0x40/0xb0
Quoted 4 lines

ok, if we are here it mean windows did task switch,
and if windows did task switch it mean something was probably wrong before.

We need to fix the oops regardless.

Signature · 8 lines
error compiling committee.c: too many arguments to function


-------------------------------------------------------------------------
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
#7 lore raw
Quoted 63 lines · Avi Kivity
Quoted 62 lines · Izik Eidus
Quoted 59 lines · Michal Ludvig
Quoted 4 lines · Avi Kivity
Quoted 2 lines · Avi Kivity

Michal Ludvig wrote:

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

Hi,

I've experienced a kernel Oops on 2.6.24 with kvm 66 on AMD in 64bit mode while starting up WinXP:

The host is still alive but the XP guest is locked up in a boot screen.

Hi again, just wanted to let you know that I still get this Oops with kvm-68. It comes a bit later, not during the boot but after the XP desktop comes up. As there were some changes in kernel/x86_emulate.c the patch you provided for kvm-66 can't be applied anymore.

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
PGD 3145e067 PUD 409b9067 PMD 0
Oops: 0002 [1] SMP
CPU 0
Modules linked in: kvm_amd kvm reiserfs tun bridge llc nfsd lockd

nfs_acl auth_rpcgss sunrpc exportfs iptable_filter ip_tables autofs4 snd_pcm_oss snd_mixer_oss w83627ehf snd_seq snd_seq_device hwmon_vid ip6table_filter ip6_tables x_tables af_packet ipv6 fuse ext2 loop snd_hda_intel snd_pcm snd_timer snd soundcore snd_page_alloc sr_mod k8temp hwmon i2c_nforce2 button i2c_core cdrom forcedeth sg floppy linear ehci_hcd ohci_hcd sd_mod usbcore dm_snapshot edd dm_mod fan sata_nv pata_amd libata scsi_mod thermal processor
Pid: 14776, comm: qemu-system-x86 Not tainted 2.6.24-mludvig #1

RIP: 0010:[<ffffffff88373b4a>]  [<ffffffff88373b4a>]
:kvm:x86_emulate_insn+0x3fa/0x4240
RSP: 0018:ffff81007d52fc18  EFLAGS: 00010246
RAX: 000000008001003b RBX: 0000000000000000 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff810079c5c000
RBP: ffff810079c5d320 R08: ffff810079c5d3c0 R09: 0000000000000006
R10: 0000000000000002 R11: 0000000000000000 R12: ffff810079c5d368
R13: ffff810079c5d3c0 R14: ffffffff8838ab20 R15: 00000000019d1353
FS:  0000000040800950(0063) GS:ffffffff8053e000(0000)

knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 0000000000000000 CR3: 000000007985a000 CR4: 00000000000006e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 Process qemu-system-x86 (pid: 14776, threadinfo ffff81007d52e000, task ffff81003f4e6780)

Stack:  000000007d52fc74 0000000011fda618 000000000f399068
ffff810079c5d3c0
  ffff81007d52fc94 ffffffff88368ae0 0000000000000000 ffff810079c5c000
  ffff810079c5d320 0000000000000000 0000000000000000 0000000000000000
Call Trace:
  [<ffffffff88368ae0>] :kvm:seg_desct_to_kvm_desct+0x40/0xb0
Quoted 9 lines
Quoted 5 lines

ok, if we are here it mean windows did task switch,
and if windows did task switch it mean something was probably wrong before.

We need to fix the oops regardless.

i know..., it was just an hint...

Signature · 7 lines
woof.

-------------------------------------------------------------------------
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
#8 lore raw
In reply to Avi Kivity
Quoted 64 lines · Avi Kivity
Quoted 63 lines · Izik Eidus
Quoted 60 lines · Michal Ludvig
Quoted 4 lines · Avi Kivity
Quoted 2 lines · Avi Kivity

Michal Ludvig wrote:

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

Hi,

I've experienced a kernel Oops on 2.6.24 with kvm 66 on AMD in 64bit mode while starting up WinXP:

The host is still alive but the XP guest is locked up in a boot screen.

Hi again, just wanted to let you know that I still get this Oops with kvm-68. It comes a bit later, not during the boot but after the XP desktop comes up. As there were some changes in kernel/x86_emulate.c the patch you provided for kvm-66 can't be applied anymore.

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
PGD 3145e067 PUD 409b9067 PMD 0
Oops: 0002 [1] SMP
CPU 0
Modules linked in: kvm_amd kvm reiserfs tun bridge llc nfsd lockd 

nfs_acl auth_rpcgss sunrpc exportfs iptable_filter ip_tables autofs4 snd_pcm_oss snd_mixer_oss w83627ehf snd_seq snd_seq_device hwmon_vid ip6table_filter ip6_tables x_tables af_packet ipv6 fuse ext2 loop snd_hda_intel snd_pcm snd_timer snd soundcore snd_page_alloc sr_mod k8temp hwmon i2c_nforce2 button i2c_core cdrom forcedeth sg floppy linear ehci_hcd ohci_hcd sd_mod usbcore dm_snapshot edd dm_mod fan sata_nv pata_amd libata scsi_mod thermal processor
Pid: 14776, comm: qemu-system-x86 Not tainted 2.6.24-mludvig #1

RIP: 0010:[<ffffffff88373b4a>]  [<ffffffff88373b4a>] 
:kvm:x86_emulate_insn+0x3fa/0x4240
RSP: 0018:ffff81007d52fc18  EFLAGS: 00010246
RAX: 000000008001003b RBX: 0000000000000000 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff810079c5c000
RBP: ffff810079c5d320 R08: ffff810079c5d3c0 R09: 0000000000000006
R10: 0000000000000002 R11: 0000000000000000 R12: ffff810079c5d368
R13: ffff810079c5d3c0 R14: ffffffff8838ab20 R15: 00000000019d1353
FS:  0000000040800950(0063) GS:ffffffff8053e000(0000) 

knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 0000000000000000 CR3: 000000007985a000 CR4: 00000000000006e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 Process qemu-system-x86 (pid: 14776, threadinfo ffff81007d52e000, task ffff81003f4e6780)

Stack:  000000007d52fc74 0000000011fda618 000000000f399068 
ffff810079c5d3c0
  ffff81007d52fc94 ffffffff88368ae0 0000000000000000 ffff810079c5c000
  ffff810079c5d320 0000000000000000 0000000000000000 0000000000000000
Call Trace:
  [<ffffffff88368ae0>] :kvm:seg_desct_to_kvm_desct+0x40/0xb0
Quoted 9 lines
Quoted 5 lines

ok, if we are here it mean windows did task switch,
and if windows did task switch it mean something was probably wrong before.

We need to fix the oops regardless.

Oh, I think that's just garbage on the stack. Actual oops is in x86_emulate_insn.

Signature · 8 lines
error compiling committee.c: too many arguments to function


-------------------------------------------------------------------------
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
#9 lore raw
Quoted 71 lines · Avi Kivity
Quoted 70 lines · Avi Kivity
Quoted 68 lines · Izik Eidus
Quoted 53 lines · Michal Ludvig
Quoted 4 lines · Avi Kivity
Quoted 2 lines · Avi Kivity

Michal Ludvig wrote:

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

Hi,

I've experienced a kernel Oops on 2.6.24 with kvm 66 on AMD in 64bit mode while starting up WinXP:

The host is still alive but the XP guest is locked up in a boot screen.

Hi again, just wanted to let you know that I still get this Oops with kvm-68. It comes a bit later, not during the boot but after the XP desktop comes up. As there were some changes in kernel/x86_emulate.c the patch you provided for kvm-66 can't be applied anymore.

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
PGD 3145e067 PUD 409b9067 PMD 0
Oops: 0002 [1] SMP
CPU 0
Modules linked in: kvm_amd kvm reiserfs tun bridge llc nfsd lockd

nfs_acl auth_rpcgss sunrpc exportfs iptable_filter ip_tables autofs4 snd_pcm_oss snd_mixer_oss w83627ehf snd_seq snd_seq_device hwmon_vid ip6table_filter ip6_tables x_tables af_packet ipv6 fuse ext2 loop snd_hda_intel snd_pcm snd_timer snd soundcore snd_page_alloc sr_mod k8temp hwmon i2c_nforce2 button i2c_core cdrom forcedeth sg floppy linear ehci_hcd ohci_hcd sd_mod usbcore dm_snapshot edd dm_mod fan sata_nv pata_amd libata scsi_mod thermal processor
Pid: 14776, comm: qemu-system-x86 Not tainted 2.6.24-mludvig #1

RIP: 0010:[<ffffffff88373b4a>]  [<ffffffff88373b4a>]
:kvm:x86_emulate_insn+0x3fa/0x4240
RSP: 0018:ffff81007d52fc18  EFLAGS: 00010246
RAX: 000000008001003b RBX: 0000000000000000 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff810079c5c000
RBP: ffff810079c5d320 R08: ffff810079c5d3c0 R09: 0000000000000006
R10: 0000000000000002 R11: 0000000000000000 R12: ffff810079c5d368
R13: ffff810079c5d3c0 R14: ffffffff8838ab20 R15: 00000000019d1353
FS:  0000000040800950(0063) GS:ffffffff8053e000(0000)

knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 0000000000000000 CR3: 000000007985a000 CR4: 00000000000006e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 Process qemu-system-x86 (pid: 14776, threadinfo ffff81007d52e000, task ffff81003f4e6780)

Quoted 7 lines
Stack:  000000007d52fc74 0000000011fda618 000000000f399068
ffff810079c5d3c0
  ffff81007d52fc94 ffffffff88368ae0 0000000000000000 ffff810079c5c000
  ffff810079c5d320 0000000000000000 0000000000000000 0000000000000000
Call Trace:
  [<ffffffff88368ae0>] :kvm:seg_desct_to_kvm_desct+0x40/0xb0

ok, if we are here it mean windows did task switch,
and if windows did task switch it mean something was probably wrong before.

Quoted 7 lines
Quoted 3 lines

We need to fix the oops regardless.

Oh, I think that's just garbage on the stack. Actual oops is in x86_emulate_insn.

i saw that the opss was in x86_emulate_insn, you think that seg_desct_to_kvm_desct never got called? (i would expect to see more traces before this function such as task_switch()...

Signature · 7 lines
woof.

-------------------------------------------------------------------------
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
#10 lore raw
In reply to Michal Ludvig
Quoted 7 lines · Michal Ludvig

Hi again, just wanted to let you know that I still get this Oops with kvm-68. It comes a bit later, not during the boot but after the XP desktop comes up. As there were some changes in kernel/x86_emulate.c the patch you provided for kvm-66 can't be applied anymore.

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'.

Signature · 1 line
error compiling committee.c: too many arguments to function
kernel/x86_emulate.c +7 -0
index f2a696d..7f5a99f 100644
@@ -1202,6 +1202,13 @@ static inline int writeback(struct x86_emulate_ctxt *ctxt,
 
 	switch (c->dst.type) {
 	case OP_REG:
+
+		if (!c->dst.ptr) {
+			printk("writeback: b %02x mordm %02x\n",
+			       c->b, c->modrm);
+			return 0;
+		}
+
 		/* The 4-byte case *is* correct:
 		 * in 64-bit mode we zero-extend.
 		 */

-------------------------------------------------------------------------
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

_______________________________________________
kvm-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel

#11 lore raw
Quoted 7 lines · Avi Kivity
Quoted 6 lines · Michal Ludvig

Hi again, just wanted to let you know that I still get this Oops with kvm-68. It comes a bit later, not during the boot but after the XP desktop comes up. As there were some changes in kernel/x86_emulate.c the patch you provided for kvm-66 can't be applied anymore.

Quoted 6 lines
Quoted 4 lines

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

M.

-------------------------------------------------------------------------
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

#12 lore raw
Quoted 10 lines · Michal Ludvig
Quoted 7 lines
Quoted 5 lines

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.

Signature · 1 line
error compiling committee.c: too many arguments to function
kernel/x86_emulate.c +5 -2
index f2a696d..8a96320 100644
@@ -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;
kernel/include/asm-x86/kvm_x86_emulate.h +1 -0
index d6337f9..b877bbd 100644
@@ -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;
 };

-------------------------------------------------------------------------
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

_______________________________________________
kvm-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel

#13 lore raw
Quoted 8 lines · Avi Kivity
Quoted 7 lines · Michal Ludvig
Quoted 7 lines
Quoted 6 lines

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

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

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.

Ack. It runs fine now. Thanks. M.

-------------------------------------------------------------------------
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