qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Self-modifying code with REP-prefix on TCG


From: Richard Henderson
Subject: Re: [Qemu-devel] Self-modifying code with REP-prefix on TCG
Date: Tue, 19 Nov 2013 17:18:40 +1000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0

On 11/19/2013 05:47 AM, Clemens Kolbitsch wrote:
> Getting around this is not trivial, so if it's a new issue, does anyone have 
> an
> idea how to approach it most meaningfully? I was thinking about detecting this
> very specific case and marking the TB for re-translation only after the TB is
> exited, but this is not very clean and also somewhat prone to errors.
> 

I don't believe there are any good solutions for this.

See what's enabled by TARGET_HAS_PRECISE_SMC wrt flushing and re-generating TBs
for other bits of self-modifying code.  Which are strictly at odds with the
desire here to continue executing the same REP.

I have a feeling even your example isn't robust even on real HW, in that if any
kind of interrupt occurs, the REP will terminate and (if overwritten) fail to
restart.  Even with CLI, system management interrupts can still occur.


r~



reply via email to

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