qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC PATCH] disable execution of SWP/SWPB


From: Peter Maydell
Subject: Re: [Qemu-devel] [RFC PATCH] disable execution of SWP/SWPB
Date: Tue, 17 Apr 2012 11:19:37 +0100

On 17 April 2012 10:53, Alexey Starikovskiy <address@hidden> wrote:
> I was wondering how to implement disabling of SWP/SWPB execution if
> they are not enabled in SCTLR.SW bit.
> One way to do this is to intercept writes to SCTLR, do tb_flush and
> make SWP [un]defined for any following translations depending on the
> c1_sys state during the translation.

This is the right way to do this. The standard use case is that this
SCTLR bit will never be touched by anybody and will retain its reset
value. The less common case is that the OS will set it once on startup.
Changing the value more often than that is basically vanishingly
unlikely, and so trying to dynamically emit code that looks at the
SCTLR is needless complication and slows down the case where you
actually are using SWP.

-- PMM



reply via email to

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