* [Qemu-devel] kernel-kqemu and linux @ 2006-03-17 8:25 Kevin F. Quinn 2006-03-20 23:39 ` Fabrice Bellard 0 siblings, 1 reply; 6+ messages in thread From: Kevin F. Quinn @ 2006-03-17 8:25 UTC (permalink / raw) To: qemu-devel [-- Attachment #1: Type: text/plain, Size: 1430 bytes --] Hi. I'm successfully running Windows 2000 guest on qemu (linux host) with kernel-kqemu, and the speed is excellent. However I can't get linux to run as a guest (still linux host); no matter what kernel or kernel config I create, it always BUGs at the same point: hda: hda1 hda2 hda3 ------------[ cut here ]------------ kernel BUG at mm/swap.c:215! invalid operand: 0000 [#1] Modules linked in: CPU: 0 EIP: 0060:[<c0141981>] Not tainted VLI EFLAGS: 00010256 (2.6.15-gentoo-r1) EIP is at release_pages+0x131/0x140 eax: 00000000 ebx: c12f98e0 ecx: c0458c94 edx: c12f98e0 esi: 00000000 edi: 00000000 ebp: 00000001 esp: d7fc1da8 ds: 007b es: 007b ss: 0068 Process swapper (pid: 1, threadinfo=d7fc0000 task=d7fe4a10) Stack: 00000000 00000000 00000000 c136eca8 d7fc1e30 00000040 0000000e c12fb160 c0458bc0 00000001 c04f2ac0 c0141bca c04f2ac8 00000001 00000000 d7fc1e28 00000001 d7fc1e28 00000001 00000001 ffffffff c01419b5 d7fc1e30 00000001 Call TRace: [<c0141bca>] __pagevec_lru_add_active+0xaa/0xc0 [<c01419b5>] __pagevec_release+0x25/0x30 [<c0142119>] invalidate_mapping_pages+0xf9/0x100 [<c014213e>] invalidate_inode_pages+0x1e/0x30 [<c015d658>] kill_bdev+0x19/0x40 [<c0232db9>] add_disk+0x49/0x60 ... (during ide probe) If kernel-kqemu works with linux 2.6 for anyone, could you email a .config that works?) Thanks, -- Kevin F. Quinn [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 191 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] kernel-kqemu and linux 2006-03-17 8:25 [Qemu-devel] kernel-kqemu and linux Kevin F. Quinn @ 2006-03-20 23:39 ` Fabrice Bellard 2006-03-21 6:13 ` Brad Campbell 2006-03-21 7:48 ` Kevin F. Quinn 0 siblings, 2 replies; 6+ messages in thread From: Fabrice Bellard @ 2006-03-20 23:39 UTC (permalink / raw) To: qemu-devel Try the following patch: diff -u -w -r1.39 helper2.c --- helper2.c 4 Dec 2005 18:46:06 -0000 1.39 +++ helper2.c 20 Mar 2006 23:38:51 -0000 @@ -110,6 +110,7 @@ env->pat = 0x0007040600070406ULL; env->cpuid_ext_features = 0; env->cpuid_features |= CPUID_FXSR | CPUID_MMX | CPUID_SSE | CPUID_SSE2 | CPUID_PAE | CPUID_SEP; + env->cpuid_features |= CPUID_APIC; /* TEST */ env->cpuid_xlevel = 0; { const char *model_id = "QEMU Virtual CPU version " QEMU_VERSION; If it works then APIC usage will become the default on i386... Fabrice. Kevin F. Quinn wrote: > Hi. > > I'm successfully running Windows 2000 guest on qemu (linux host) with > kernel-kqemu, and the speed is excellent. However I can't get linux to > run as a guest (still linux host); no matter what kernel or kernel > config I create, it always BUGs at the same point: > > hda: hda1 hda2 hda3 > ------------[ cut here ]------------ > kernel BUG at mm/swap.c:215! > invalid operand: 0000 [#1] > Modules linked in: > CPU: 0 > EIP: 0060:[<c0141981>] Not tainted VLI > EFLAGS: 00010256 (2.6.15-gentoo-r1) > EIP is at release_pages+0x131/0x140 > eax: 00000000 ebx: c12f98e0 ecx: c0458c94 edx: c12f98e0 > esi: 00000000 edi: 00000000 ebp: 00000001 esp: d7fc1da8 > ds: 007b es: 007b ss: 0068 > Process swapper (pid: 1, threadinfo=d7fc0000 task=d7fe4a10) > Stack: 00000000 00000000 00000000 c136eca8 d7fc1e30 00000040 0000000e > c12fb160 > c0458bc0 00000001 c04f2ac0 c0141bca c04f2ac8 00000001 00000000 > d7fc1e28 > 00000001 d7fc1e28 00000001 00000001 ffffffff c01419b5 d7fc1e30 > 00000001 > Call TRace: > [<c0141bca>] __pagevec_lru_add_active+0xaa/0xc0 > [<c01419b5>] __pagevec_release+0x25/0x30 > [<c0142119>] invalidate_mapping_pages+0xf9/0x100 > [<c014213e>] invalidate_inode_pages+0x1e/0x30 > [<c015d658>] kill_bdev+0x19/0x40 > [<c0232db9>] add_disk+0x49/0x60 > ... (during ide probe) > > > If kernel-kqemu works with linux 2.6 for anyone, could you email > a .config that works?) > > Thanks, > > > ------------------------------------------------------------------------ > > _______________________________________________ > Qemu-devel mailing list > Qemu-devel@nongnu.org > http://lists.nongnu.org/mailman/listinfo/qemu-devel ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] kernel-kqemu and linux 2006-03-20 23:39 ` Fabrice Bellard @ 2006-03-21 6:13 ` Brad Campbell 2006-03-21 11:13 ` Brad Campbell 2006-03-21 7:48 ` Kevin F. Quinn 1 sibling, 1 reply; 6+ messages in thread From: Brad Campbell @ 2006-03-21 6:13 UTC (permalink / raw) To: qemu-devel Fabrice Bellard wrote: > Try the following patch: > > diff -u -w -r1.39 helper2.c > --- helper2.c 4 Dec 2005 18:46:06 -0000 1.39 > +++ helper2.c 20 Mar 2006 23:38:51 -0000 > @@ -110,6 +110,7 @@ > env->pat = 0x0007040600070406ULL; > env->cpuid_ext_features = 0; > env->cpuid_features |= CPUID_FXSR | CPUID_MMX | CPUID_SSE | > CPUID_SSE2 > | CPUID_PAE | CPUID_SEP; > + env->cpuid_features |= CPUID_APIC; /* TEST */ > env->cpuid_xlevel = 0; > { > const char *model_id = "QEMU Virtual CPU version " > QEMU_VERSION; > > If it works then APIC usage will become the default on i386... > I'm afraid that makes no difference at all here.. PIII-M linux host and both 2.4 compiled for i386 and 2.6 compiled for PII linux guests Regards, Brad -- "Human beings, who are almost unique in having the ability to learn from the experience of others, are also remarkable for their apparent disinclination to do so." -- Douglas Adams ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] kernel-kqemu and linux 2006-03-21 6:13 ` Brad Campbell @ 2006-03-21 11:13 ` Brad Campbell 2006-03-21 17:10 ` Pascal Terjan 0 siblings, 1 reply; 6+ messages in thread From: Brad Campbell @ 2006-03-21 11:13 UTC (permalink / raw) To: qemu-devel Brad Campbell wrote: > Fabrice Bellard wrote: >> Try the following patch: >> >> diff -u -w -r1.39 helper2.c >> --- helper2.c 4 Dec 2005 18:46:06 -0000 1.39 >> +++ helper2.c 20 Mar 2006 23:38:51 -0000 >> @@ -110,6 +110,7 @@ >> env->pat = 0x0007040600070406ULL; >> env->cpuid_ext_features = 0; >> env->cpuid_features |= CPUID_FXSR | CPUID_MMX | CPUID_SSE | >> CPUID_SSE2 >> | CPUID_PAE | CPUID_SEP; >> + env->cpuid_features |= CPUID_APIC; /* TEST */ >> env->cpuid_xlevel = 0; >> { >> const char *model_id = "QEMU Virtual CPU version " >> QEMU_VERSION; >> >> If it works then APIC usage will become the default on i386... >> > > I'm afraid that makes no difference at all here.. > PIII-M linux host and both 2.4 compiled for i386 and 2.6 compiled for > PII linux guests More information here.. http://fnarfbargle.dyndns.org:81/qemu-oops/qemu.oops.log http://fnarfbargle.dyndns.org:81/qemu-oops/qemu.oops.log.2 Neat trick for capturing such groovy stuff.. In one console :- cat /dev/ptyzf | tee qemu.oops.log In another console :- qemu -hda vm-1.img -kernel /tracks/linux-2.6.15.6/arch/i386/boot/bzImage -serial /dev/ttyzf -append "console=ttyS0" -m 64 -kernel-kqemu Regards, Brad (who just learned about pseudo terminal devices) -- "Human beings, who are almost unique in having the ability to learn from the experience of others, are also remarkable for their apparent disinclination to do so." -- Douglas Adams ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] kernel-kqemu and linux 2006-03-21 11:13 ` Brad Campbell @ 2006-03-21 17:10 ` Pascal Terjan 0 siblings, 0 replies; 6+ messages in thread From: Pascal Terjan @ 2006-03-21 17:10 UTC (permalink / raw) To: qemu-devel On 3/21/06, Brad Campbell <brad@wasp.net.au> wrote: > Neat trick for capturing such groovy stuff.. > In one console :- > > cat /dev/ptyzf | tee qemu.oops.log > > In another console :- > > qemu -hda vm-1.img -kernel /tracks/linux-2.6.15.6/arch/i386/boot/bzImage -serial /dev/ttyzf -append > "console=ttyS0" -m 64 -kernel-kqemu More simple and does not need any right on /dev/tty* : qemu -hda vm-1.img -kernel theimage -append console=ttyS0 -serial stdio -kernel-kqemu | tee qemu.log Here is the output with various Mandriva kernels (last one is vanilla 2.6.16 rc4). The failure is different each time but always occurs in the same area (cache init). Running it several times with the same kernel will give the same error. ===== Linux version 2.6.12-12mdk (apatard@n1.mandriva.com) (gcc version 4.0.1 (4.0.1-5mdk for Mandriva Linux release 2006.0)) #1 Fri Sep 9 18:15:22 CEST 2005 BIOS-provided physical RAM map: BIOS-e820: 0000000000000000 - 000000000009fc00 (usable) BIOS-e820: 0000000000100000 - 0000000010000000 (usable) 0MB HIGHMEM available. 256MB LOWMEM available. DMI not present. ACPI: Unable to locate RSDP Allocating PCI resources starting at 10000000 (gap: 10000000:f0000000) Built 1 zonelists Local APIC disabled by BIOS -- you can enable it with "lapic" Initializing CPU#0 Kernel command line: console=ttyS0 PID hash table entries: 2048 (order: 11, 32768 bytes) Detected 407.111 MHz processor. Using tsc for high-res timesource Console: colour VGA+ 80x25 Dentry cache hash table entries: 65536 (order: 6, 262144 bytes) Inode-cache hash table entries: 32768 (order: 5, 131072 bytes) Memory: 255420k/262144k available (2348k kernel code, 6232k reserved, 717k data, 268k init, 0k highmem, 0k BadRAM) Checking if this processor honours the WP bit even in supervisor mode... Ok. Kernel panic - not syncing: pgtable_cache_init(): Cannot create pgd cache <4>Losing too many ticks! TSC cannot be used as a timesource. Possible reasons for this are: You're running with Speedstep, You don't have DMA enabled for your hard disk (see hdparm), Incorrect TSC synchronization on an SMP system (see dmesg). Falling back to a sane timesource now. ===== Linux version 2.6.12-13mdk-i686-up-4GB (apatard@n1.mandriva.com) (gcc version 4.0.2 (4.0.2-1mdk for Mandriva Linux release 2006.1)) #1 Mon Nov 21 18:31:00 CET 2005 BIOS-provided physical RAM map: BIOS-e820: 0000000000000000 - 000000000009fc00 (usable) BIOS-e820: 0000000000100000 - 0000000010000000 (usable) 0MB HIGHMEM available. 256MB LOWMEM available. DMI not present. ACPI: Unable to locate RSDP Allocating PCI resources starting at 10000000 (gap: 10000000:f0000000) Built 1 zonelists Local APIC disabled by BIOS -- you can enable it with "lapic" Initializing CPU#0 Kernel command line: console=ttyS0 PID hash table entries: 2048 (order: 11, 32768 bytes) Detected 433.098 MHz processor. Using tsc for high-res timesource Console: colour VGA+ 80x25 Dentry cache hash table entries: 65536 (order: 6, 262144 bytes) Inode-cache hash table entries: 32768 (order: 5, 131072 bytes) Memory: 255432k/262144k available (2335k kernel code, 6220k reserved, 714k data, 264k init, 0k highmem, 0k BadRAM) Checking if this processor honours the WP bit even in supervisor mode... Ok. Kernel panic - not syncing: kmem_cache_create(): failed to create slab `anon_vma' <4>Losing too many ticks! TSC cannot be used as a timesource. Possible reasons for this are: You're running with Speedstep, You don't have DMA enabled for your hard disk (see hdparm), Incorrect TSC synchronization on an SMP system (see dmesg). Falling back to a sane timesource now. ===== Linux version 2.6.14-1mdk-i686-up-4GB (sbellabes@n3.mandriva.com) (gcc version 4.0.2 (4.0.2-1mdk for Mandriva Linux release 2006.1)) #1 Wed Mar 8 20:09:39 CET 2006 BIOS-provided physical RAM map: BIOS-e820: 0000000000000000 - 000000000009fc00 (usable) BIOS-e820: 0000000000100000 - 0000000010000000 (usable) 0MB HIGHMEM available. 256MB LOWMEM available. DMI not present. ACPI: Unable to locate RSDP Allocating PCI resources starting at 20000000 (gap: 10000000:f0000000) Built 1 zonelists Local APIC disabled by BIOS -- you can enable it with "lapic" Initializing CPU#0 Kernel command line: console=ttyS0 PID hash table entries: 2048 (order: 11, 32768 bytes) Detected 372.477 MHz processor. Using tsc for high-res timesource Console: colour VGA+ 80x25 Dentry cache hash table entries: 65536 (order: 6, 262144 bytes) Inode-cache hash table entries: 32768 (order: 5, 131072 bytes) Memory: 254792k/262144k available (2305k kernel code, 6208k reserved, 713k data, 244k init, 0k highmem, 0k BadRAM) Checking if this processor honours the WP bit even in supervisor mode... Ok. Kernel panic - not syncing: kmem_cache_create(): failed to create slab `size-32' ===== Linux version 2.6.16-rc4.11mdk (lcapitulino@n1.mandriva.com) (gcc version 4.0.3 (4.0.3-0.20060215.1mdk for Mandriva Linux release 2006.1)) #1 Sat Feb 18 23:35:38 CET 2006 BIOS-provided physical RAM map: BIOS-e820: 0000000000000000 - 000000000009fc00 (usable) BIOS-e820: 0000000000100000 - 0000000010000000 (usable) 0MB HIGHMEM available. 256MB LOWMEM available. DMI not present or invalid. ACPI: Unable to locate RSDP Allocating PCI resources starting at 20000000 (gap: 10000000:f0000000) Built 1 zonelists Kernel command line: console=ttyS0 Local APIC disabled by BIOS -- you can enable it with "lapic" Enabling fast FPU save and restore... done. Enabling unmasked SIMD FPU exception support... done. Initializing CPU#0 CPU 0 irqstacks, hard=c0386000 soft=c0387000 PID hash table entries: 2048 (order: 11, 32768 bytes) Detected 429.499 MHz processor. Using tsc for high-res timesource Console: colour VGA+ 80x25 Dentry cache hash table entries: 65536 (order: 6, 262144 bytes) Inode-cache hash table entries: 32768 (order: 5, 131072 bytes) Memory: 256228k/262144k available (1585k kernel code, 5448k reserved, 775k data, 196k init, 0k highmem) Checking if this processor honours the WP bit even in supervisor mode... Ok. ------------[ cut here ]------------ kernel BUG at mm/slab.c:1998! invalid opcode: 0000 [#1] Modules linked in: CPU: 0 EIP: 0060:[<c01468b4>] Not tainted VLI EFLAGS: 00010002 (2.6.16-rc4.11mdk #1) EIP is at check_irq_off+0xa/0x14 eax: 00000046 ebx: c127f120 ecx: c0147da2 edx: 00000000 esi: 000000d0 edi: 00000246 ebp: c034ff70 esp: c034ff70 ds: 007b es: 007b ss: 0068 Process swapper (pid: 0, threadinfo=c034f000 task=c02d9200) Stack: <0>c034ff88 c0147949 c0147da2 00000008 00000004 00000008 c034ff98 c01479ab 00000004 c127c140 c034ffc0 c0147da2 c034ffcc c0289f25 c036018e 00000000 22222222 00000008 c127c140 c127e5fc c034ffd4 c0148071 00000000 c127c140 Call Trace: [<c0103efb>] show_stack_log_lvl+0xaa/0xb5 [<c010401c>] show_registers+0x116/0x17c [<c01042d6>] die+0x129/0x1a8 [<c028a72d>] do_trap+0x7c/0x96 [<c0104685>] do_invalid_op+0x89/0x93 [<c0103a4f>] error_code+0x4f/0x60 [<c0147949>] __kmalloc_track_caller+0x54/0x99 [<c01479ab>] alloc_arraycache+0x1d/0x38 [<c0147da2>] do_tune_cpucache+0x1d/0x18a [<c0148071>] enable_cpucache+0x46/0x65 [<c036019d>] kmem_cache_init+0x25e/0x28f [<c03502bf>] start_kernel+0x10a/0x258 [<c0100199>] 0xc0100199 Code: c0 e8 1f 09 fd ff 46 58 43 5a 39 fe 7c e9 68 f5 d2 2b c0 e8 0d 09 fd ff 5e 8d 65 f4 5b 5e 5f 5d c3 55 89 e5 9c 58 f6 c4 02 74 08 <0f> 0b ce 07 ad 53 2a c0 5d c3 55 89 e5 9c 58 f6 c4 02 75 08 0f <0>Kernel panic - not syncing: Attempted to kill the idle task! ===== ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] kernel-kqemu and linux 2006-03-20 23:39 ` Fabrice Bellard 2006-03-21 6:13 ` Brad Campbell @ 2006-03-21 7:48 ` Kevin F. Quinn 1 sibling, 0 replies; 6+ messages in thread From: Kevin F. Quinn @ 2006-03-21 7:48 UTC (permalink / raw) To: qemu-devel [-- Attachment #1: Type: text/plain, Size: 4077 bytes --] Sorry, still fails at the same place. It recognises the APIC: ... Found and enabled local APIC! mapped APIC to ffffd000 (fee00000) ... I noticed that before the 'kernel BUG' message I got a warning that scrolled off the screen; so I halted qemu and captured it piece by piece: ... hda: cache flushes not supported hda:Badness in blk_remove_plug at block/ll_rw_blk.c:1436 xx blk_remove_plug+0x69/0x70 xx ide_do_request+0x3c2/0x3f0 xx do_ide_request+0x24/0x30 xx generic_unplug_device+0x10/0x20 xx block_sync_page+0x3a/0x50 ... xx kernel_thread_helper+0x5/0xc hda1 hda2 hda3 ------------[ cut here ]------------ kernel BUG at mm/swap.c:215! ... then as before (I can transcribe the whole trace if you want). The warning is the following code: int blk_remove_plug(request_queue_t *q) { WARN_ON(!irqs_disabled()) "Badness in" comes from the WARN_ON macro. So it appears that linux expects the irqs to have been disabled, which they are in the normal emulation but not in the virtualised kernel mode. Without -kernel-kqemu I don't get the warning (or the BUG): ... hda: cache flushes not supported hda1 hda2 hda3 hdc: ATAPI 4X CD-ROM drive, 512kB Cache and it boots up & works fine. Kev. On Tue, 21 Mar 2006 00:39:15 +0100 Fabrice Bellard <fabrice@bellard.org> wrote: > Try the following patch: > > diff -u -w -r1.39 helper2.c > --- helper2.c 4 Dec 2005 18:46:06 -0000 1.39 > +++ helper2.c 20 Mar 2006 23:38:51 -0000 > @@ -110,6 +110,7 @@ > env->pat = 0x0007040600070406ULL; > env->cpuid_ext_features = 0; > env->cpuid_features |= CPUID_FXSR | CPUID_MMX | CPUID_SSE | > CPUID_SSE2 > | CPUID_PAE | CPUID_SEP; > + env->cpuid_features |= CPUID_APIC; /* TEST */ > env->cpuid_xlevel = 0; > { > const char *model_id = "QEMU Virtual CPU version " > QEMU_VERSION; > > If it works then APIC usage will become the default on i386... > > Fabrice. > > Kevin F. Quinn wrote: > > Hi. > > > > I'm successfully running Windows 2000 guest on qemu (linux host) > > with kernel-kqemu, and the speed is excellent. However I can't get > > linux to run as a guest (still linux host); no matter what kernel > > or kernel config I create, it always BUGs at the same point: > > > > hda: hda1 hda2 hda3 > > ------------[ cut here ]------------ > > kernel BUG at mm/swap.c:215! > > invalid operand: 0000 [#1] > > Modules linked in: > > CPU: 0 > > EIP: 0060:[<c0141981>] Not tainted VLI > > EFLAGS: 00010256 (2.6.15-gentoo-r1) > > EIP is at release_pages+0x131/0x140 > > eax: 00000000 ebx: c12f98e0 ecx: c0458c94 edx: c12f98e0 > > esi: 00000000 edi: 00000000 ebp: 00000001 esp: d7fc1da8 > > ds: 007b es: 007b ss: 0068 > > Process swapper (pid: 1, threadinfo=d7fc0000 task=d7fe4a10) > > Stack: 00000000 00000000 00000000 c136eca8 d7fc1e30 00000040 > > 0000000e c12fb160 > > c0458bc0 00000001 c04f2ac0 c0141bca c04f2ac8 00000001 > > 00000000 d7fc1e28 > > 00000001 d7fc1e28 00000001 00000001 ffffffff c01419b5 > > d7fc1e30 00000001 > > Call TRace: > > [<c0141bca>] __pagevec_lru_add_active+0xaa/0xc0 > > [<c01419b5>] __pagevec_release+0x25/0x30 > > [<c0142119>] invalidate_mapping_pages+0xf9/0x100 > > [<c014213e>] invalidate_inode_pages+0x1e/0x30 > > [<c015d658>] kill_bdev+0x19/0x40 > > [<c0232db9>] add_disk+0x49/0x60 > > ... (during ide probe) > > > > > > If kernel-kqemu works with linux 2.6 for anyone, could you email > > a .config that works?) > > > > Thanks, > > > > > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > Qemu-devel mailing list > > Qemu-devel@nongnu.org > > http://lists.nongnu.org/mailman/listinfo/qemu-devel > > > > _______________________________________________ > Qemu-devel mailing list > Qemu-devel@nongnu.org > http://lists.nongnu.org/mailman/listinfo/qemu-devel -- Kevin F. Quinn [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 191 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2006-03-21 17:10 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2006-03-17 8:25 [Qemu-devel] kernel-kqemu and linux Kevin F. Quinn 2006-03-20 23:39 ` Fabrice Bellard 2006-03-21 6:13 ` Brad Campbell 2006-03-21 11:13 ` Brad Campbell 2006-03-21 17:10 ` Pascal Terjan 2006-03-21 7:48 ` Kevin F. Quinn
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).