qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Fabien Chouteau <chouteau@adacore.com>
To: Scott Wood <scottwood@freescale.com>
Cc: Alexander Graf <agraf@suse.de>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 3/4] ppc: booke206: use MAV=2.0 TSIZE definition, fix 4G pages
Date: Tue, 15 May 2012 18:50:58 +0200	[thread overview]
Message-ID: <4FB28972.10800@adacore.com> (raw)
In-Reply-To: <4FB27612.3040705@freescale.com>

On 05/15/2012 05:28 PM, Scott Wood wrote:
> On 05/09/2012 05:54 AM, Fabien Chouteau wrote:
>> On 05/07/2012 06:28 PM, Alexander Graf wrote:
>>> Hi Fabien,
>>>
>>> Could you please elaborate a bit on the case that broke for you with these? The patches shouldn't change any guest facing behavior :o.
>>>
>>>
>>
>> My bad,
>>
>> The problem comes from my initialization of tlb entries at board reset.
>> I use MAS1_TSIZE_SHIFT:
>>
>>     size = 0x1 << MAS1_TSIZE_SHIFT; /* 4 KBytes */
>>
>> but since the definition as changed, the value is incorrect. It should
>> be:
>>
>>     size = 0x10 << MAS1_TSIZE_SHIFT; /* 4 KBytes */
> 
> You should be using booke206_bytes_to_tsize(), or perhaps create some
> #defines for the various tsizes.
> 

Do you mean booke206_page_size_to_tlb()?

BTW, this function is defined locally twice and with different
implementations.

hw/ppce500_mpc8544ds.c:176:static inline target_phys_addr_t booke206_page_size_to_tlb(uint64_t size)
hw/ppce500_mpc8544ds.c-177-{
hw/ppce500_mpc8544ds.c-178-    return ffs(size >> 10) - 1;
hw/ppce500_mpc8544ds.c-179-}
--
hw/ppce500_spin.c:71:static inline target_phys_addr_t booke206_page_size_to_tlb(uint64_t size)
hw/ppce500_spin.c-72-{
hw/ppce500_spin.c-73-    return (ffs(size >> 10) - 1) >> 1;
hw/ppce500_spin.c-74-}

-- 
Fabien Chouteau

  reply	other threads:[~2012-05-15 16:51 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-07 23:43 [Qemu-devel] [PATCH v2 0/4] ppc: booke206: KVM MMU API and info tlb Scott Wood
2011-07-07 23:44 ` [Qemu-devel] [PATCH 1/4] kvm: ppc: Update KVM headers for MMU API Scott Wood
2011-07-07 23:44 ` [Qemu-devel] [PATCH v2 2/4] kvm: ppc: booke206: use " Scott Wood
2011-07-07 23:44 ` [Qemu-devel] [PATCH 3/4] ppc: booke206: use MAV=2.0 TSIZE definition, fix 4G pages Scott Wood
2012-05-07 15:47   ` Fabien Chouteau
2012-05-07 16:28     ` Alexander Graf
2012-05-07 16:45       ` Andreas Färber
2012-05-09 10:54       ` Fabien Chouteau
2012-05-15 15:28         ` Scott Wood
2012-05-15 16:50           ` Fabien Chouteau [this message]
2012-05-15 19:44             ` Scott Wood
2011-07-07 23:44 ` [Qemu-devel] [PATCH v2 4/4] ppc: booke206: add "info tlb" support Scott Wood

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=4FB28972.10800@adacore.com \
    --to=chouteau@adacore.com \
    --cc=agraf@suse.de \
    --cc=qemu-devel@nongnu.org \
    --cc=scottwood@freescale.com \
    /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).