qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Blue Swirl" <blauwirbel@gmail.com>
To: Paul Brook <paul@codesourcery.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] sparc32 boot mode flag fix
Date: Tue, 6 Nov 2007 22:51:06 +0200	[thread overview]
Message-ID: <f43fc5580711061251l763d73bbl8380279557fd781f@mail.gmail.com> (raw)
In-Reply-To: <200711062039.12196.paul@codesourcery.com>

On 11/6/07, Paul Brook <paul@codesourcery.com> wrote:
> > > This patch also removes the MMU flags from being saved in the
> > > translation block code as a result of an off line discussion with Paul
> > > Brook.
> >
> > I'd like to hear the reasoning behind that. The TBs generated while in
> > boot mode and MMU disabled may contain translations generated from
> > virtual to physical mappings that do not exist when the mode is
> > changed. Boot mode and MMU disable are not used after boot and these
> > bits don't affect translation, so those bits may be less important and
> > not worth the few bits in TB flags.
>
> It think you're confusing the TB cache with the TLB. Each TB is already
> indexed by both physical and virtual address (explicitly in tb_find_slow, and
> implicitly in tb_find_fast because a tlb flush clears env->tb_jmp_cache).
>
> IIUC enabling/disabling boot mode is no different to and other VM change. If
> the virtual->physical mapping happens to be the same then it's perfectly ok
> to reuse the TB.

Not in this case: in boot mode, physical and virtual address 0
generates TBs from PROM code. When control transfers to OS in normal
MMU mode, virtual and physical address 0 generates TBs from code in
RAM.

> The TLB is already flushed whenever the MMU mode is changes. There is no need
> to invalidate the TB.

The TB is valid, but only when the boot mode bit is the same as
recorded in the TB flags.

  reply	other threads:[~2007-11-06 20:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-06  2:45 [Qemu-devel] [PATCH] sparc32 boot mode flag fix Robert Reif
2007-11-06 19:31 ` Blue Swirl
2007-11-06 20:39   ` Paul Brook
2007-11-06 20:51     ` Blue Swirl [this message]
2007-11-06 21:08       ` Paul Brook
2007-11-07 15:40         ` Blue Swirl
2007-11-06 23:36   ` Robert Reif

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=f43fc5580711061251l763d73bbl8380279557fd781f@mail.gmail.com \
    --to=blauwirbel@gmail.com \
    --cc=paul@codesourcery.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).