qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH, RFC] Disable implicit self-modifying code suppo


From: Paul Brook
Subject: Re: [Qemu-devel] [PATCH, RFC] Disable implicit self-modifying code support for RISC CPUs
Date: Sat, 3 Nov 2007 23:30:24 +0000
User-agent: KMail/1.9.7

> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]