qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2] e600 core for MPC86xx processors


From: Julio Guerra
Subject: Re: [Qemu-devel] [PATCH v2] e600 core for MPC86xx processors
Date: Mon, 24 Jun 2013 08:13:43 +0200

2013/6/24 Alexey Kardashevskiy <address@hidden>:
> On 06/21/2013 10:03 PM, Alexander Graf wrote:
>>
>> On 21.06.2013, at 14:01, Julio Guerra wrote:
>>
>>> 2013/6/21 Alexander Graf <address@hidden>:
>>>>
>>>> On 26.05.2013, at 19:41, Julio Guerra wrote:
>>>>
>>>>> MPC86xx processors are based on the e600 core, which is not the case
>>>>> in qemu where it is based on the 7400 processor.
>>>>>
>>>>> This patch creates the e600 core and instantiates the MPC86xx
>>>>> processors based on it. Therefore, adding the high BATs and the SPRG
>>>>> 4..7 registers, which are e600-specific [1].
>>>>>
>>>>> This allows to define the MPC8610 processor too and my program running
>>>>> on a real MPC8610 target is now able to run on qemu :)
>>>>>
>>>>> [1] http://cache.freescale.com/files/32bit/doc/ref_manual/E600CORERM.pdf
>>>>>
>>>>> Signed-off-by: Julio Guerra <address@hidden>
>>>>
>>>> Thanks, applied to ppc-next.
>>>>
>>>
>>> I just retested this patch and I noticed the `handle_mmu_fault`
>>> default value introduced by recent A. Farber patches on the CPU
>>> definitions is wrong with the selected memory model. Thus qemu
>>> complains about the MMU model.
>>>
>>> The following is missing in e600 CPU definition:
>>>> #if defined(CONFIG_SOFTMMU)
>>>>    ppc->handle_mmu_fault = ppc_hash32_handle_mmu_fault;
>>>> #endif
>>>
>>> Can you correct it or should I resend a patch (v3 or just the previous
>>> three lines) ?
>>
>> Just send a patch on top of the current one.
>
>
> I do not really understand what this patch actually does but it breaks my
> pseries/power7 setup. Please, help.
>
>
> Starting program: /home/aik/qemu-system-ppc64 -L qemu-ppc64-bios/ -trace
> events=qemu_trace_events -net nic,model=e1000,addr=0:0:0 -net
> user,hostfwd=tcp::5000-:22 -m 1024 -machine pseries -nographic -vga none
> -enable-kvm -kernel guest.vmlinux.n -initrd 1.cpio
> [Thread debugging using libthread_db enabled]
> Using host libthread_db library "/lib64/libthread_db.so.1".
> **
> ERROR:/home/alexey/pcipassthru/qemu-impreza/qom/object.c:152:type_get_parent:
> assertion failed: (type->parent_type != NULL)
>
> Breakpoint 4, 0x00000080c6eefb8c in .abort () from /lib64/libc.so.6
> Missing separate debuginfos, use: debuginfo-install SDL-1.2.15-8.fc19.ppc64
> bluez-libs-4.101-6.fc19.ppc64 boost-system-1.53.0-6.fc19.ppc64
> boost-thread-1.53.0-6.fc19.ppc64 brlapi-0.6.0-5.fc19.ppc64
> ceph-devel-0.56.4-1.fc19.ppc64 ceph-libs-0.56.4-1.fc19.ppc64
> cryptopp-5.6.2-2.fc19.ppc64 cyrus-sasl-lib-2.1.26-8.fc19.ppc64p7
> glib2-2.36.2-1.fc19.ppc64 glibc-2.17-4.fc19.ppc64p7
> glusterfs-3.4.0-0.5.beta2.fc19.ppc64
> glusterfs-api-3.4.0-0.5.beta2.fc19.ppc64 gmp-5.1.1-2.fc19.ppc64
> gnutls-3.1.11-1.fc19.ppc64 keyutils-libs-1.5.5-4.fc19.ppc64
> krb5-libs-1.11.2-10.fc19.ppc64 leveldb-1.9.0-1.fc19.ppc64
> libX11-1.5.99.902-1.fc19.ppc64 libXau-1.0.6-7.fc19.ppc64
> libcom_err-1.42.7-2.fc19.ppc64 libcurl-7.29.0-6.fc19.ppc64
> libfdt-1.3.0-6.fc19.ppc64 libgcc-4.8.0-8.fc19.ppc64
> libgcrypt-1.5.2-1.fc19.ppc64 libgpg-error-1.11-1.fc19.ppc64
> libidn-1.26-2.fc19.ppc64 libjpeg-turbo-1.2.90-2.fc19.ppc64
> libselinux-2.1.13-15.fc19.ppc64 libssh2-1.4.3-4.fc19.ppc64
> libstdc++-4.8.0-8.fc19.ppc64 libtasn1-3.3-1.fc19.ppc64
> libuuid-2.23.1-2.fc19.ppc64 libxcb-1.9-3.fc19.ppc64
> ncurses-libs-5.9-11.20130511.fc19.ppc64 nettle-2.6-2.fc19.ppc64
> nspr-4.9.6-1.fc19.ppc64 nss-3.14.3-13.0.fc19.ppc64
> nss-softokn-freebl-3.14.3-1.fc19.ppc64 nss-util-3.14.3-1.fc19.ppc64
> openldap-2.4.35-4.fc19.ppc64 openssl-libs-1.0.1e-4.fc19.ppc64p7
> p11-kit-0.18.3-1.fc19.ppc64 pcre-8.32-6.fc19.ppc64p7
> pixman-0.30.0-1.fc19.ppc64 snappy-1.1.0-1.fc19.ppc64 
> zlib-1.2.7-10.fc19.ppc64p7
> (gdb) up
> #1  0x00000080c742d54c in .g_assertion_message () from /lib64/libglib-2.0.so.0
> (gdb)
> #2  0x00000080c742d5f4 in .g_assertion_message_expr () from
> /lib64/libglib-2.0.so.0
> (gdb) bt
> #0  0x00000080c6eefb8c in .abort () from /lib64/libc.so.6
> #1  0x00000080c742d54c in .g_assertion_message () from /lib64/libglib-2.0.so.0
> #2  0x00000080c742d5f4 in .g_assertion_message_expr () from
> /lib64/libglib-2.0.so.0
> #3  0x0000000010260058 in type_get_parent (type=0x10f7b260)
>     at /home/alexey/pcipassthru/qemu-impreza/qom/object.c:152
> #4  0x0000000010260120 in type_class_get_size (ti=0x10f7b260)
>     at /home/alexey/pcipassthru/qemu-impreza/qom/object.c:170
> #5  0x00000000102603d8 in type_initialize (ti=0x10f7b260)
>     at /home/alexey/pcipassthru/qemu-impreza/qom/object.c:236
> #6  0x000000001026175c in object_class_foreach_tramp (key=0x10f7b3e0,
> value=0x10f7b260,
>     opaque=0x3fffffffe5e0) at
> /home/alexey/pcipassthru/qemu-impreza/qom/object.c:626
> #7  0x00000080c73e0ab0 in .g_hash_table_foreach () from 
> /lib64/libglib-2.0.so.0
> #8  0x000000001026188c in object_class_foreach (fn=
>     @0x10681290: 0x10261988 <object_class_get_list_tramp>,
>     implements_type=0x105c7188 "powerpc64-cpu", include_abstract=0x0,
> opaque=0x3fffffffe680)
>     at /home/alexey/pcipassthru/qemu-impreza/qom/object.c:647
> #9  0x0000000010261a3c in object_class_get_list (implements_type=0x105c7188
> "powerpc64-cpu",
>     include_abstract=0x0) at
> /home/alexey/pcipassthru/qemu-impreza/qom/object.c:679
> #10 0x0000000010459dec in ppc_cpu_class_by_pvr (pvr=0x3f0201)
>     at /home/alexey/pcipassthru/qemu-impreza/target-ppc/translate_init.c:7908
> #11 0x00000000103ca368 in kvm_ppc_register_host_cpu_type ()
>     at /home/alexey/pcipassthru/qemu-impreza/target-ppc/kvm.c:1781
> #12 0x00000000103c4fcc in kvm_arch_init (s=0x10fb8ab0)
>     at /home/alexey/pcipassthru/qemu-impreza/target-ppc/kvm.c:110
> #13 0x0000000010376138 in kvm_init () at
> /home/alexey/pcipassthru/qemu-impreza/kvm-all.c:1461
> #14 0x00000000102c1b08 in configure_accelerator ()
>     at /home/alexey/pcipassthru/qemu-impreza/vl.c:2673
> #15 0x00000000102c5e28 in main (argc=0x15, argv=0x3ffffffff218,
> envp=0x3ffffffff2c8)
>     at /home/alexey/pcipassthru/qemu-impreza/vl.c:4062
> (gdb) up
> #3  0x0000000010260058 in type_get_parent (type=0x10f7b260)
>     at /home/alexey/pcipassthru/qemu-impreza/qom/object.c:152
> 152             g_assert(type->parent_type != NULL);
> (gdb) p *type
> $5 = {name = 0x10f7b3e0 "MPC8641-powerpc64-cpu", class_size = 0x0,
> instance_size = 0x0,
>   class_init = @0x1069ac10: 0x103a287c
> <CPU_POWERPC_e600_POWERPC_SVR_8641_e600_cpu_class_init>,
>   class_base_init = 0x0, class_finalize = 0x0, class_data = 0x0,
> instance_init = 0x0,
>   instance_finalize = 0x0, abstract = 0x0, parent = 0x10f7b400
> "e600-family-powerpc64-cpu",
>   parent_type = 0x0, class = 0x0, num_interfaces = 0x0, interfaces = {{
>       typename = 0x0} <repeats 32 times>}}
> (gdb)
>
>

As Alexander said, this patch is broken and incomplete, it has not
been mainstreamed. A v3 will be re-submitted today, I'll let you know
so that you can test your setup again.

But to answer your question, MPC8641 board is - with this patch -
instantiated with an e600 CPU whose TLBs are hardware or software
reloadable. I don't know how it is handled in kvm mode, maybe it is
due to the missing `mmu_fault_handler` that will be present in v3.

--
Julio Guerra



reply via email to

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