qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v1 01/30] target-sparc: ignore MMU-faults if MMU


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH v1 01/30] target-sparc: ignore MMU-faults if MMU is disabled in hypervisor mode
Date: Fri, 4 Nov 2016 15:19:28 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0

On 11/04/2016 02:50 PM, Artyom Tarasenko wrote:
+    if (is_exec) { /* XXX has_hypervisor */
+        if (env->lsu & (IMMU_E)) {
+            cpu_raise_exception_ra(env, TT_CODE_ACCESS, GETPC());
+        } else if (cpu_has_hypervisor(env) && !(env->hpstate & HS_PRIV)) {
+            cpu_raise_exception_ra(env, TT_INSN_REAL_TRANSLATION_MISS, 
GETPC());
+        }
+    } else {
+        if (env->lsu & (DMMU_E)) {
+            cpu_raise_exception_ra(env, TT_DATA_ACCESS, GETPC());
+        } else if (cpu_has_hypervisor(env) && !(env->hpstate & HS_PRIV)) {
+            cpu_raise_exception_ra(env, TT_DATA_REAL_TRANSLATION_MISS, 
GETPC());
+        }
+    }

And if the hypervisor itself has a bug and references bad memory? Or does the hypervisor *have* to do such things in order to probe for device on startup, and should therefore not trap.

I'm actually assuming this is the case based on the fact that you wrote this patch in the first place. But if so, we need a comment here.


r~



reply via email to

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