qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: "Alex Bennée" <alex.bennee@linaro.org>
Cc: Gautam Bhat <mindentropy@gmail.com>, qemu-devel@nongnu.org
Subject: Re: Resources on deeper understanding of Translation blocks
Date: Tue, 16 May 2023 16:34:43 +0100	[thread overview]
Message-ID: <CAFEAcA8HST4nG-ogs7TeVxQ7YtCikP8PjutDLLxc4dLC=CchpA@mail.gmail.com> (raw)
In-Reply-To: <87ttwcnvqk.fsf@linaro.org>

On Tue, 16 May 2023 at 16:27, Alex Bennée <alex.bennee@linaro.org> wrote:
> Gautam Bhat <mindentropy@gmail.com> writes:
> > 3. Do you have more information or a visual diagram of sorts for
> > TARGET_PAGE_* and PAGE_* and the relation between translation blocks
> > and pages? Also how
> > should one handle where architectures don't have any paging?
>
> All system emulation is handled by page size because that is the
> fundamental granularity of the softmmu TLB which looks up a translation
> from guest address to offset into the memory region. It is not directly
> related to if the guest is using paging to implement virtual memory.

Also, each target defines a TARGET_PAGE_BITS even if the
target architecture doesn't have the concept of paging.
This specifies the minimum granularity at which you can
change things like r/w protection on addresses, so if your
target architecture has an MPU that might affect what
you want to set it to. If yo uhave neither an MPU nor an MMU,
you could look at what granularity/spacing typical systems
have between devices and particularly between devices and RAM.
If you have no pressing reason to set it to something as
a result of thinking about all that, then 4K pages is
probably as good a value as any.

-- PMM


      reply	other threads:[~2023-05-16 15:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-14 17:54 Resources on deeper understanding of Translation blocks Gautam Bhat
2023-05-15 13:45 ` Alex Bennée
2023-05-16 13:43   ` Gautam Bhat
2023-05-16 14:56     ` Alex Bennée
2023-05-16 15:34       ` Peter Maydell [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='CAFEAcA8HST4nG-ogs7TeVxQ7YtCikP8PjutDLLxc4dLC=CchpA@mail.gmail.com' \
    --to=peter.maydell@linaro.org \
    --cc=alex.bennee@linaro.org \
    --cc=mindentropy@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /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).