qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: "mihai.caraman@freescale.com" <mihai.caraman@freescale.com>
Cc: "Bogdan.Vlad@freescale.com" <Bogdan.Vlad@freescale.com>,
	Alexander Graf <agraf@suse.de>,
	QEMU Developers <qemu-devel@nongnu.org>,
	"qemu-ppc@nongnu.org" <qemu-ppc@nongnu.org>,
	"Varun.Sethi@freescale.com" <Varun.Sethi@freescale.com>,
	Scott Wood <scottwood@freescale.com>,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] roms: Flush icache when writing roms to guest memory
Date: Wed, 11 Dec 2013 14:25:00 +0000	[thread overview]
Message-ID: <CAFEAcA_erqrb_sCf75QCnNX4u8vQHuh0LjJPLteDfgai9wo-kQ@mail.gmail.com> (raw)
In-Reply-To: <ea86231615cf4f21944f92456c995c7b@BY2PR03MB508.namprd03.prod.outlook.com>

On 11 December 2013 14:18, mihai.caraman@freescale.com
<mihai.caraman@freescale.com> wrote:
>> From: Peter Maydell [mailto:peter.maydell@linaro.org]
>> If the architecture spec says that a freshly reset physical CPU has
>> coherent icache and dcache, then resetting the vCPU should also
>> ensure the icache and dcache are coherent, so one way to solve
>> this would be just to make sure that vcpu reset did the right thing.
>
> This is not related to reset operation. Freescale e500 core family
> does not assure the coherency between data and instruction cache.
> This is an extract from reference manual:
>
> 'When a processor modifies any memory location that can contain an
> instruction, software must ensure that the instruction cache is made
> consistent with data memory and that the modifications are made visible
> to the instruction fetching mechanism. This must be done even if the
> cache is disabled or if the page is marked caching-inhibited.'
>
> So it's the loader duty to synchronize the instruction cache.

But these are (emulated) ROMs, not an emulated bootloader.
They ought to work like actual ROMs: QEMU as the emulator
of the system/devices provides the contents of physical address
space; KVM as the emulator of the CPU provides a CPU which
doesn't start up executing from rubbish in its icache. (This matches
how a real physical CPU executes its first instruction by really
going out to the ROM, not by looking at its cache.)

thanks
-- PMM

  reply	other threads:[~2013-12-11 14:25 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-11 13:23 [Qemu-devel] [PATCH] roms: Flush icache when writing roms to guest memory Alexander Graf
2013-12-11 13:27 ` Paolo Bonzini
2013-12-11 13:35   ` Alexander Graf
2013-12-11 14:03     ` Paolo Bonzini
2013-12-11 14:20       ` Alexander Graf
2013-12-11 14:07     ` Peter Maydell
2013-12-11 14:17       ` Alexander Graf
2013-12-11 14:27         ` mihai.caraman
2013-12-11 14:18       ` mihai.caraman
2013-12-11 14:25         ` Peter Maydell [this message]
2013-12-11 14:31           ` Alexander Graf
2013-12-11 14:58           ` mihai.caraman
2013-12-11 13:56 ` Peter Maydell
2013-12-13 19:18   ` Scott Wood
2013-12-14 10:58     ` Paolo Bonzini
2013-12-14 11:08       ` Peter Maydell

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=CAFEAcA_erqrb_sCf75QCnNX4u8vQHuh0LjJPLteDfgai9wo-kQ@mail.gmail.com \
    --to=peter.maydell@linaro.org \
    --cc=Bogdan.Vlad@freescale.com \
    --cc=Varun.Sethi@freescale.com \
    --cc=agraf@suse.de \
    --cc=mihai.caraman@freescale.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@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).