qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [BUG?] Problem when emulate mips target on mips host


From: Aurelien Jarno
Subject: [Qemu-devel] Re: [BUG?] Problem when emulate mips target on mips host
Date: Thu, 15 Jul 2010 17:00:11 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

On Thu, Jul 15, 2010 at 10:35:46PM +0800, chen huacai wrote:
> Hi, Aurelien,
>     Can qemu emulate mips target on mips host currently? When I
> emulate a malta (or fuloong) machine on my fuloong box, qemu crashes
> after booting kernel, before the init process. Crash messages may be
> "illegal instruction", "segment fault" or "bus error". On x86 hosts
> everything is OK.
> 
> Command line I used:
> qemu-system-mips64el  -kernel ../vmlinux-2.6.26-1-4kc-malta -append
> "root=/dev/hda1 console=ttyS0" -hda debian_lenny_mipsel_small.qcow2
> -nographic
> 
> Crash messages:
> [    0.000000] Initializing cgroup subsys cpu
> [    0.000000] Linux version 2.6.26-1-4kc-malta (Debian 2.6.26-13)
> (address@hidden) (gcc version 4.1.3 20080704 (prerelease) (Debian
> 4.1.2-24)) #1 Sat Jan 10 21:03:55 UTC 2009
> [    0.000000]
> [    0.000000] LINUX started...
> [    0.000000] console [early0] enabled
> [    0.000000] CPU revision is: 000182a0 (MIPS 20Kc)
> [    0.000000] FPU revision is: 00000000
> [    0.000000] registering PCI controller with io_map_base unset
> [    0.000000] Determined physical RAM map:
> [    0.000000]  memory: 00001000 @ 00000000 (reserved)
> [    0.000000]  memory: 000ef000 @ 00001000 (ROM data)
> [    0.000000]  memory: 00484000 @ 000f0000 (reserved)
> [    0.000000]  memory: 07a8c000 @ 00574000 (usable)
> [    0.000000] Wasting 44672 bytes for tracking 1396 unused pages
> [    0.000000] Initrd not found or empty - disabling initrd
> [    0.000000] Zone PFN ranges:
> [    0.000000]   DMA             0 ->     4096
> [    0.000000]   Normal       4096 ->    32768
> [    0.000000] Movable zone start PFN for each node
> [    0.000000] early_node_map[1] active PFN ranges
> [    0.000000]     0:        0 ->    32768
> [    0.000000] Built 1 zonelists in Zone order, mobility grouping on.
> Total pages: 32512
> [    0.000000] Kernel command line: root=/dev/hda1 console=ttyS0
> [    0.000000] Primary instruction cache 32kB, VIVT, 4-way, linesize 32 bytes.
> [    0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases,
> linesize 32 bytes
> [    0.000000] Enable cache parity protection for MIPS 20KC/25KF CPUs.
> [    0.000000] PID hash table entries: 512 (order: 9, 2048 bytes)
> [    0.000000] CPU frequency 100.01 MHz
> [17179569.256000] Console: colour dummy device 80x25
> [17179569.276000] Dentry cache hash table entries: 16384 (order: 4, 65536 
> bytes)
> [17179569.288000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
> [17179569.484000] Memory: 124308k/125488k available (3321k kernel
> code, 1132k reserved, 820k data, 180k init, 0k highmem)
> [17179569.656000] Security Framework initialized
> [17179569.696000] SELinux:  Disabled at boot.
> [17179569.704000] Capability LSM initialized
> [17179569.720000] Mount-cache hash table entries: 512
> [17179569.932000] Initializing cgroup subsys ns
> [17179569.936000] Initializing cgroup subsys cpuacct
> [17179569.940000] Initializing cgroup subsys devices
> [17179570.364000] net_namespace: 652 bytes
> [17179570.436000] NET: Registered protocol family 16
> [17179571.148000] SCSI subsystem initialized
> [17179571.256000] usbcore: registered new interface driver usbfs
> [17179571.292000] usbcore: registered new interface driver hub
> [17179571.320000] usbcore: registered new device driver usb
> [17179571.468000] pci 0000:00:0a.3: quirk: region 1100-110f claimed by PIIX4 
> SMB
> [17179571.964000] NET: Registered protocol family 2
> [17179572.072000] IP route cache hash table entries: 1024 (order: 0, 4096 
> bytes)
> [17179572.168000] TCP established hash table entries: 4096 (order: 3,
> 32768 bytes)
> [17179572.176000] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
> [17179572.184000] TCP: Hash tables configured (established 4096 bind 4096)
> [17179572.192000] TCP reno registered
> [17179572.248000] NET: Registered protocol family 1
> [17179572.544000] audit: initializing netlink socket (disabled)
> [17179572.560000] type=2000 audit(1279117410.368:1): initialized
> [17179572.648000] VFS: Disk quotas dquot_6.5.1
> [17179572.656000] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
> [17179572.752000] msgmni has been set to 242
> [17179572.808000] Block layer SCSI generic (bsg) driver version 0.4
> loaded (major 254)
> [17179572.816000] io scheduler noop registered
> [17179572.816000] io scheduler anticipatory registered
> [17179572.824000] io scheduler deadline registered
> [17179572.824000] io scheduler cfq registered (default)
> [17179573.856000] Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports,
> IRQ sharing enabled
> [17179574.044000] serial8250.2: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
> [17179574.072000] console handover: boot [early0] -> real [ttyS0]
> [17179574.112000] serial8250.2: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
> [17179574.148000] serial8250.2: ttyS2 at MMIO 0x1f000900 (irq = 18) is a 
> 16550A
> [17179574.732000] brd: module loaded
> [17179574.740000] pcnet32.c:v1.35 21.Apr.2008 address@hidden
> [17179574.748000] PCI: Enabling device 0000:00:0b.0 (0000 -> 0003)
> [17179574.772000] pcnet32: PCnet/PCI II 79C970A at 0x1020,
> 52:54:00:12:34:56 assigned IRQ 10.
> [17179574.860000] eth0: registered as PCnet/PCI II 79C970A
> [17179574.892000] pcnet32: 1 cards_found.
> [17179574.900000] Uniform Multi-Platform E-IDE driver
> [17179574.908000] ide: Assuming 33MHz system bus speed for PIO modes;
> override with idebus=xx
> [17179574.956000] PIIX4: IDE controller (0x8086:0x7111 rev 0x00) at
> PCI slot 0000:00:0a.1
> [17179574.956000] PCI: Enabling device 0000:00:0a.1 (0000 -> 0001)
> [17179574.964000] PIIX4: not 100% native mode: will probe irqs later
> [17179574.996000]     ide0: BM-DMA at 0x1040-0x1047
> [17179575.004000]     ide1: BM-DMA at 0x1048-0x104f
> [17179575.328000] hda: QEMU HARDDISK, ATA DISK drive
> [17179576.112000] hda: UDMA/33 mode selected
> [17179576.912000] hdc: QEMU DVD-ROM, ATAPI CD/DVD-ROM drive
> [17179577.648000] hdc: UDMA/33 mode selected
> [17179577.664000] ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
> [17179577.688000] ide1 at 0x170-0x177,0x376 on irq 15
> [17179577.872000] ide_generic: please use "probe_mask=0x3f" module
> parameter for probing all legacy ISA IDE ports
> [17179577.880000] ide_generic: I/O resource 0x1F0-0x1F7 not free.
> [17179577.888000] ide_generic: I/O resource 0x170-0x177 not free.
> [17179577.928000] hda: max request size: 512KiB
> [17179577.936000] hda: 20971520 sectors (10737 MB) w/256KiB Cache,
> CHS=16383/255/63
> [17179578.012000] hda: cache flushes supported
> [17179578.052000]  hda: hda1 hda2 < hda5 >
> [17179579.068000] USB Universal Host Controller Interface driver v3.0
> [17179579.084000] PCI: Enabling device 0000:00:0a.2 (0000 -> 0001)
> [17179579.092000] uhci_hcd 0000:00:0a.2: UHCI Host Controller
> [17179579.164000] uhci_hcd 0000:00:0a.2: new USB bus registered,
> assigned bus number 1
> [17179579.188000] uhci_hcd 0000:00:0a.2: irq 11, io base 0x00001000
> [17179579.404000] usb usb1: configuration #1 chosen from 1 choice
> [17179579.452000] hub 1-0:1.0: USB hub found
> [17179579.468000] hub 1-0:1.0: 2 ports detected
> [17179579.712000] usb usb1: New USB device found, idVendor=1d6b, 
> idProduct=0001
> [17179579.712000] usb usb1: New USB device strings: Mfr=3, Product=2,
> SerialNumber=1
> [17179579.720000] usb usb1: Product: UHCI Host Controller
> [17179579.720000] usb usb1: Manufacturer: Linux 2.6.26-1-4kc-malta uhci_hcd
> [17179579.728000] usb usb1: SerialNumber: 0000:00:0a.2
> [17179579.848000] serio: i8042 KBD port at 0x60,0x64 irq 1
> [17179579.864000] serio: i8042 AUX port at 0x60,0x64 irq 12
> [17179579.968000] mice: PS/2 mouse device common for all mice
> [17179580.128000] TCP cubic registered
> [17179580.128000] NET: Registered protocol family 17
> [17179580.224000] input: AT Raw Set 2 keyboard as /class/input/input0
> [17179580.264000] RPC: Registered udp transport module.
> [17179580.264000] RPC: Registered tcp transport module.
> [17179580.376000] registered taskstats version 1
> [17179580.816000] kjournald starting.  Commit interval 5 seconds
> [17179580.848000] EXT3-fs: mounted filesystem with ordered data mode.
> [17179580.880000] VFS: Mounted root (ext3 filesystem) readonly.
> [17179580.936000] Freeing prom memory: 956k freed
> [17179581.392000] Freeing unused kernel memory: 180k freed
> Illegal instruction
> 

This is a known issue affecting the hosts at different levels. The
problem is due to the cacheflush syscall not always flushing the
instruction cache.

On my machine is it is quite rare (I am able to boot a Debian image
without problem), but it is known to be really problematic on loongson
based CPU.

We haven't been able to trace down the problem enough to find the root
of the problem.

Note also that versions before 0.12.4 were affected by another bug
causing similar issues.

-- 
Aurelien Jarno                          GPG: 1024D/F1BCDB73
address@hidden                 http://www.aurel32.net



reply via email to

[Prev in Thread] Current Thread [Next in Thread]