From: BALATON Zoltan <balaton@eik.bme.hu>
To: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Cc: Francois Revol <revol@free.fr>,
qemu-ppc@nongnu.org, qemu-devel@nongnu.org,
David Gibson <david@gibson.dropbear.id.au>
Subject: Re: [Qemu-devel] [Qemu-ppc] BookE MMU question
Date: Mon, 21 Aug 2017 00:57:50 +0200 (CEST) [thread overview]
Message-ID: <alpine.BSF.2.21.1708210054030.85934@zero.eik.bme.hu> (raw)
In-Reply-To: <24fb125a-de7e-ca18-8ca8-9ab7f2d113d1@ilande.co.uk>
On Sun, 20 Aug 2017, Mark Cave-Ayland wrote:
> On 20/08/17 22:59, BALATON Zoltan wrote:
>
>>> So I'd suggest adding debugging to alloc_tlb() to find out why TLB slot
>>> 0 is being chosen again for the 0x80000000 mapping even though
>>> free_tlb() hasn't been called for that entry.
>>
>> I've tried that but it only confirmed what I thought. This is the first
>> map_region call so nothing is allocated yet and it just picks the first
>> slot:
>>
>> [KRN] i = 2, allowable_pages[i].mask = 000fffff; tlb_info
>> ffffffff:ffffffff => 7fffffff:ffffffff
>>
>> (The numbers after tlb_info are bitmap[0]:bitmap[1] before and after the
>> alloc_tlb() call.) So this looks OK just does not work on QEMU and I
>> don't know why it works on real hardware (or if it works there at all
>> but I assume it does).
>
> I'm slightly confused here as I thought you'd said you changed the order
> of the mappings? But if its the first entry then I presume you mean
> we're back to this one, which is definitely the first mapping according
> to the source.
>
> ppcemb_tlb_check: TLB 0 address ff7fd648 PID 0 <=> ff7f7000 fffff000 03b
> mmubooke_check_tlb: TLB entry not found
>
> [KRN] map_region(007f7000, ff7f7000, 00009000, 081b):
> [KRN] TLB00: 007f7000 - 007f7fff : ff7f7000 - ff7f7fff:
Forget this, this was by mistake, we don't even reach this because the
mapping of 00800000 is already failing. That needs to be fixed first.
> In that case the working is as follows:
>
> - You request a region of size 0x9000
> - map_region() rounds this up to the next biggest size from
> allowable_pages() which is 64KB (0xffff) with
> allowable_pages.code == 0x30
> - The 0x30 code (which indicates the page size) is encoded into the
> first tlbwe instruction
>
> The first thing I'd check is to follow through QEMU's tlbwe and make
> sure that the 0x30 gets decoded correctly back to a TLB size of 0x10000
> as indicated by allowable_pages - at the moment it looks as if QEMU is
> interpreting the 0x30 as a page size of 0x1000 instead.
I've run out of time for now, I'll check this when the first problem is
solved and this will still be a problem by then.
Thanks,
BALATON Zoltan
prev parent reply other threads:[~2017-08-20 22:58 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-18 13:48 [Qemu-devel] BookE MMU question BALATON Zoltan
2017-08-19 22:56 ` KONRAD Frederic
2017-08-19 23:19 ` [Qemu-devel] [Qemu-ppc] " BALATON Zoltan
2017-08-20 7:20 ` Mark Cave-Ayland
2017-08-20 13:35 ` BALATON Zoltan
2017-08-20 15:16 ` Mark Cave-Ayland
2017-08-20 21:59 ` BALATON Zoltan
2017-08-20 22:48 ` Mark Cave-Ayland
2017-08-20 22:57 ` BALATON Zoltan [this message]
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=alpine.BSF.2.21.1708210054030.85934@zero.eik.bme.hu \
--to=balaton@eik.bme.hu \
--cc=david@gibson.dropbear.id.au \
--cc=mark.cave-ayland@ilande.co.uk \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=revol@free.fr \
/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 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).