qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v3] Undefine SWP instruction unless SCTLR.SW bit


From: Alexey Starikovskiy
Subject: Re: [Qemu-devel] [PATCH v3] Undefine SWP instruction unless SCTLR.SW bit is set
Date: Tue, 17 Apr 2012 17:11:20 +0400

> Adding this brace is incorrectly changing behaviour.
> (I agree that it's pretty obscure and halfway to being an
> outright bug. It all goes away with the cp15 rework anyway.)
Should I add tb_flush() without braces too or set second if() only to
avoid changing the bogus behavior?
>> +            /* This may enable/disable SWP instruction, so do TB flush too 
>> */
>> +                tb_flush(env);
>> +            }
> This is not the reason. You can perfectly well run user-mode with
> a specific -cpu option. The reason for this ifdef is that the
> Linux kernel has SWP emulation code, so SWP has to work either
> because we force the implementation here to work, or by making
> it take an UNDEF exception and then implementing it inside
> linux-user/main.c. Doing the former is slightly simpler.
Linux kernel _might_ have emulation for SWP depending on config.
So, what should I do? Change comment?



reply via email to

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