From: Leon Alrae <leon.alrae@imgtec.com>
To: Paolo Bonzini <pbonzini@redhat.com>,
James Hogan <james.hogan@imgtec.com>, vt <vt@sangfor.com.cn>,
qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [Question]Support of China loogson processor
Date: Thu, 16 Apr 2015 16:05:03 +0100 [thread overview]
Message-ID: <552FCF9F.4020500@imgtec.com> (raw)
In-Reply-To: <552FA4B9.4070204@redhat.com>
On 16/04/2015 13:02, Paolo Bonzini wrote:
>
>
> On 16/04/2015 13:07, Leon Alrae wrote:
>> Since I also haven't had a chance to test Loongson emulation, I thought
>> I'd give it a try (TCG only, Loongson-2E cpu and fulong2e machine).
>>
>> Good news is that I'm able to get to the login prompt using ancient QEMU
>> v1.0, kernel 2.6.33 (with additional patch from
>> https://lists.gnu.org/archive/html/qemu-devel/2010-06/msg02566.html) and
>> some old debian image I had handy. However, in any newer version
>> starting from v1.1.0 of QEMU something goes horribly wrong and it just
>> segfaults somewhere inside hw/bonito.c quite early during kernel
>> booting.
>
> Where exactly? If it's related to the memory API conversion, it may be
> easy to fix. I can look at a backtrace (or you can just put the Debian
> image somewhere I can grab it).
Bisect points at: 5312bd8b3152f8d4fcf9389ba54e32b09f4b4093
Crash occurs during the first access, below there is backtrace from
working and not working case:
Bad:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffefe27700 (LWP 10929)]
0x00005555557a2278 in bonito_readl (opaque=0x5555564fb690, addr=24, size=4) at qemu/hw/bonito.c:299
299 return s->regs[saddr];
(gdb) bt
#0 0x00005555557a2278 in bonito_readl (opaque=0x5555564fb690, addr=24, size=4) at qemu/hw/bonito.c:299
#1 0x00005555557d6e03 in memory_region_read_accessor (opaque=0x5555564fbb60, addr=24, value=0x7fffefe265d0, size=4, shift=0, mask=4294967295) at qemu/memory.c:314
#2 0x00005555557d6fa9 in access_with_adjusted_size (addr=24, value=0x7fffefe265d0, size=4, access_size_min=1, access_size_max=4, access=0x5555557d6daa <memory_region_read_accessor>, opaque=0x5555564fbb60) at qemu/memory.c:359
#3 0x00005555557d9796 in memory_region_dispatch_read1 (mr=0x5555564fbb60, addr=24, size=4) at qemu/memory.c:860
#4 0x00005555557d9886 in memory_region_dispatch_read (mr=0x5555564fbb60, addr=24, size=4) at qemu/memory.c:892
#5 0x00005555557dc306 in io_mem_read (io_index=6, addr=24, size=4) at qemu/memory.c:1492
#6 0x00005555557aed0d in subpage_read (opaque=0x5555564ed790, addr=24, len=4) at qemu/exec.c:3351
#7 0x00005555557d6e03 in memory_region_read_accessor (opaque=0x5555564ed790, addr=280, value=0x7fffefe267d0, size=4, shift=0, mask=4294967295) at qemu/memory.c:314
#8 0x00005555557d6fa9 in access_with_adjusted_size (addr=280, value=0x7fffefe267d0, size=4, access_size_min=1, access_size_max=4, access=0x5555557d6daa <memory_region_read_accessor>, opaque=0x5555564ed790) at qemu/memory.c:359
#9 0x00005555557d9796 in memory_region_dispatch_read1 (mr=0x5555564ed790, addr=280, size=4) at qemu/memory.c:860
#10 0x00005555557d9886 in memory_region_dispatch_read (mr=0x5555564ed790, addr=280, size=4) at qemu/memory.c:892
#11 0x00005555557dc306 in io_mem_read (io_index=7, addr=280, size=4) at qemu/memory.c:1492
#12 0x00005555557f523e in io_readl (physaddr=280, addr=18446744072633712920, retaddr=0x4023335e) at qemu/softmmu_template.h:78
#13 0x00005555557f5335 in __ldl_mmu (addr=18446744072633712920, mmu_idx=0) at qemu/softmmu_template.h:114
Good:
Breakpoint 1, bonito_readl (opaque=0x55555646e450, addr=280, size=4) at qemu/hw/bonito.c:288
288 {
(gdb) bt
#0 bonito_readl (opaque=0x55555646e450, addr=280, size=4) at qemu/hw/bonito.c:288
#1 0x00005555557d6b83 in memory_region_read_accessor (opaque=0x55555646e920, addr=280, value=0x7fffefe265d0, size=4, shift=0, mask=4294967295) at qemu/memory.c:314
#2 0x00005555557d6d29 in access_with_adjusted_size (addr=280, value=0x7fffefe265d0, size=4, access_size_min=1, access_size_max=4, access=0x5555557d6b2a <memory_region_read_accessor>, opaque=0x55555646e920) at qemu/memory.c:359
#3 0x00005555557d9516 in memory_region_dispatch_read1 (mr=0x55555646e920, addr=280, size=4) at qemu/memory.c:860
#4 0x00005555557d9606 in memory_region_dispatch_read (mr=0x55555646e920, addr=280, size=4) at qemu/memory.c:892
#5 0x00005555557dc086 in io_mem_read (io_index=6, addr=280, size=4) at qemu/memory.c:1492
#6 0x00005555557aeba5 in subpage_read (opaque=0x555556543730, addr=280, len=4) at qemu/exec.c:3343
#7 0x00005555557d6b83 in memory_region_read_accessor (opaque=0x555556543730, addr=280, value=0x7fffefe267d0, size=4, shift=0, mask=4294967295) at qemu/memory.c:314
#8 0x00005555557d6d29 in access_with_adjusted_size (addr=280, value=0x7fffefe267d0, size=4, access_size_min=1, access_size_max=4, access=0x5555557d6b2a <memory_region_read_accessor>, opaque=0x555556543730) at qemu/memory.c:359
#9 0x00005555557d9516 in memory_region_dispatch_read1 (mr=0x555556543730, addr=280, size=4) at qemu/memory.c:860
#10 0x00005555557d9606 in memory_region_dispatch_read (mr=0x555556543730, addr=280, size=4) at qemu/memory.c:892
#11 0x00005555557dc086 in io_mem_read (io_index=7, addr=280, size=4) at qemu/memory.c:1492
#12 0x00005555557f4fbe in io_readl (physaddr=280, addr=18446744072633712920, retaddr=0x40232bde) at qemu/softmmu_template.h:78
#13 0x00005555557f50b5 in __ldl_mmu (addr=18446744072633712920, mmu_idx=0) at qemu/softmmu_template.h:114
next prev parent reply other threads:[~2015-04-16 15:05 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-13 11:29 [Qemu-devel] [Question]Support of China loogson processor vt
2015-04-15 1:08 ` Rob Landley
2015-04-15 3:53 ` vt
2015-04-15 9:19 ` Andreas Färber
2015-04-15 9:35 ` James Hogan
2015-04-16 11:07 ` Leon Alrae
2015-04-16 12:02 ` Paolo Bonzini
2015-04-16 15:05 ` Leon Alrae [this message]
2015-04-16 15:17 ` Paolo Bonzini
2015-04-16 19:25 ` Leon Alrae
2015-04-16 19:40 ` Paolo Bonzini
2015-04-16 22:00 ` Peter Maydell
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=552FCF9F.4020500@imgtec.com \
--to=leon.alrae@imgtec.com \
--cc=james.hogan@imgtec.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=vt@sangfor.com.cn \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.