qemu-devel
[Top][All Lists]
Advanced

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

Re: accel/tcg/translator.c question about translator_access


From: Richard Henderson
Subject: Re: accel/tcg/translator.c question about translator_access
Date: Tue, 31 Jan 2023 19:45:33 -1000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2

On 1/31/23 17:06, Sid Manning wrote:
There is an assert in translator_access that I hit while running on a version of QEMU integrated into a Virtual Platform.

Since this function can return null anyway I tried the following experiment:
...
-            assert(phys_page != -1);
+            if(phys_page == -1) {
+                return NULL;
+            }
...
which avoided the issue and the test ran to completion.  What is this assert 
trying to catch?


One half of the instruction in ram and the other half of the instruction in 
mmio.

If the entire instruction is in mmio, then we correctly translate, but do not cache the result (since the io can produce different results on every access). But if we have started caching the result, because we start in ram, then we will incorrectly cache the mmio access.

This really should never happen.  How did it occur?


r~



reply via email to

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