qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [Qemu-ppc] Determining interest in PPC e500spin, yield,


From: alarson
Subject: Re: [Qemu-devel] [Qemu-ppc] Determining interest in PPC e500spin, yield, and openpic patches
Date: Wed, 15 Jun 2016 13:12:37 -0700

David Gibson <address@hidden> wrote on 06/14/2016 11:17:57 
PM:
Aaron Larson <address@hidden>

AL> 1. There is a defect in ppce500_spin.c:spin_kick() that creates an
AL>    incorrectly sized TLB entry.  This was reported as bug
AL>    https://bugs.launchpad.net/qemu/+bug/1587535  I can provide a
AL>    patch if desired.

DG> Absolutely.

OK, I'll start with this one.   Let me know if there is anything you'd 
like me to do
with that bug report.

When e500 PPC is booted multi-core, the non-boot cores are started via
the spin table.  ppce500_spin.c:spin_kick() calls
mmubooke_create_initial_mapping() to allocate a 64MB TLB entry, but
the created TLB entry is only 256KB.

The root cause is that the function computing the size of the TLB
entry, namely booke206_page_size_to_tlb assumes MAS1.TSIZE as defined
by latter PPC cores, specifically n to the power of FOUR * 1KB. The
result is then used by mmubooke_create_initial_mapping using
MAS1_TSIZE_SHIFT, but MAS1_TSIZE_SHIFT is defined assuming TLB entries
are n to the power of TWO * 1KB. I.e., a difference of shift=7 or
shift=8.

Simply changing MAS1_TSIZE_SHIFT from 7 to 8 is not appropriate since
the macro is used elsewhere.

The following patch has a fix for that, and also raises a separate
issue that I'd be happy to resolve after getting some guidance.


Attachment: ppce500_spin-tlb.patch
Description: Binary data


reply via email to

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