Received: from eggs.gnu.org ([2001:4830:134:3::10]:56037) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1btyOI-0007lt-CS for qemu-devel@nongnu.org; Tue, 11 Oct 2016 10:50:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1btyOD-0001dh-Ds for qemu-devel@nongnu.org; Tue, 11 Oct 2016 10:50:49 -0400 Received: from mail-qk0-x242.google.com ([2607:f8b0:400d:c09::242]:34415) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1btyOD-0001dX-8a for qemu-devel@nongnu.org; Tue, 11 Oct 2016 10:50:45 -0400 Received: by mail-qk0-x242.google.com with SMTP id n189so1600659qke.1 for ; Tue, 11 Oct 2016 07:50:45 -0700 (PDT) Sender: Richard Henderson References: <1475316333-9776-1-git-send-email-atar4qemu@gmail.com> <1475316333-9776-2-git-send-email-atar4qemu@gmail.com> From: Richard Henderson Message-ID: Date: Tue, 11 Oct 2016 09:50:41 -0500 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 01/29] target-sparc: don't trap on MMU-fault if MMU is disabled List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Artyom Tarasenko Cc: Mark Cave-Ayland , qemu-devel On 10/11/2016 09:00 AM, Artyom Tarasenko wrote: > On Mon, Oct 10, 2016 at 11:14 PM, Richard Henderson wrote: >> On 10/01/2016 05:05 AM, Artyom Tarasenko wrote: >>> >>> if (is_exec) { >>> - helper_raise_exception(env, TT_CODE_ACCESS); >>> + if (env->lsu & (IMMU_E)) { >>> + helper_raise_exception(env, TT_CODE_ACCESS); >>> + } >>> } else { >>> - helper_raise_exception(env, TT_DATA_ACCESS); >>> + if (env->lsu & (DMMU_E)) { >>> + helper_raise_exception(env, TT_DATA_ACCESS); >>> + } >> >> >> The cpu really does no kind of machine check for a hypervisor write to >> 0x1122334455667788? > > A bare metal machine would raise Real Translation Exception. But since > we don't do real addresses... I was asking about an errant access from the hypervisor itself. I would have thought the guest running without an mmu would be running with real addresses, but the hypervisor itself would be running in physical addresses. But that said, we can't just let the access go completely unreported, surely. We can think as if we do real addresses, but with a 1-1 mapping to physical. So at least for !cpu_hypervisor_mode(env), a Real Translation Exception would seem to be totally justified. r~