From: Paul Brook <paul@codesourcery.com>
To: qemu-devel@nongnu.org
Cc: Blue Swirl <blauwirbel@gmail.com>
Subject: Re: [Qemu-devel] [PATCH, RFC] Disable implicit self-modifying code support for RISC CPUs
Date: Sat, 3 Nov 2007 23:30:24 +0000 [thread overview]
Message-ID: <200711032330.25578.paul@codesourcery.com> (raw)
In-Reply-To: <f43fc5580711031315q590b7ae6t534a9c6e5ef72770@mail.gmail.com>
> RISC CPUs don't support self-modifying code unless the affected area
> is flushed explicitly.
For experience with ARM cpus, I think this is only true for userspace.
Many CPUs only require explicit flushes when the icache is enabled. It's not
uncommon for bootloaders to leave the icache disabled and omit the cache
flushes.
The ARM cache flush instructions/syscalls are currently implemented as a
no-op, so nontrivial additional work would be required to disabled the qemu
SMC detections. IIRC there are also special cases where a system call
instruction guarantees some level of architectural consistency for backwards
compatibility.
On some cores it is only necessary to flush the pipeline, but it's also common
to know that e.g. a particular core has a 4-stage pipeline, so inserting 4
NOPs is sufficient to ensure consistency.
Paul
prev parent reply other threads:[~2007-11-03 23:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-03 20:15 [Qemu-devel] [PATCH, RFC] Disable implicit self-modifying code support for RISC CPUs Blue Swirl
2007-11-03 20:37 ` Thiemo Seufer
2007-11-03 22:13 ` Fabrice Bellard
2007-11-04 7:12 ` Blue Swirl
2007-11-04 7:36 ` J. Mayer
2007-11-04 7:49 ` Blue Swirl
2007-11-03 23:30 ` Paul Brook [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=200711032330.25578.paul@codesourcery.com \
--to=paul@codesourcery.com \
--cc=blauwirbel@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).