From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57338) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WS6mV-000852-TB for qemu-devel@nongnu.org; Mon, 24 Mar 2014 11:27:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WS6mQ-0007iB-1e for qemu-devel@nongnu.org; Mon, 24 Mar 2014 11:27:19 -0400 Received: from mail-qc0-x22b.google.com ([2607:f8b0:400d:c01::22b]:64521) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WS6mP-0007i3-RU for qemu-devel@nongnu.org; Mon, 24 Mar 2014 11:27:13 -0400 Received: by mail-qc0-f171.google.com with SMTP id c9so6153733qcz.16 for ; Mon, 24 Mar 2014 08:27:12 -0700 (PDT) Sender: Richard Henderson Message-ID: <53304ECB.7000308@twiddle.net> Date: Mon, 24 Mar 2014 08:27:07 -0700 From: Richard Henderson MIME-Version: 1.0 References: <1394851732-25692-1-git-send-email-rth@twiddle.net> <1394851732-25692-2-git-send-email-rth@twiddle.net> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 01/26] tcg-aarch64: Properly detect SIGSEGV writes List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: QEMU Developers , "claudio.fontana" On 03/24/2014 05:41 AM, Peter Maydell wrote: > On 15 March 2014 02:48, Richard Henderson wrote: >> Since the kernel doesn't pass any info on the reason for the fault, >> disassemble the instruction to detect a store. > > Incidentally, I've been wondering if we could improve > handle_cpu_signal so that at least the "check if this > fault was because we write-protected a page when we > translated code out of it" part doesn't depend on the > CPU-specific signal handler setting is_write correctly. > I think most guests don't depend on getting exactly > correct fault information, but if we don't track our > own page protection correctly then even simple guest > binaries don't work. Indeed. I had wondered if just setting is_write=1 when we don't know wouldn't be a better solution that what we have now. > (Also, shouldn't we ideally speaking see if the SIGSEGV > was the result of attempting to execute from non-executable > memory?) Probably, but I'm not sure we know at this point. Although, honestly, the best fallback would be softmmu. Which we really ought to enable for both 64-on-32 and host > guest page size. Especially with the later we sometimes can't even *load* simple binaries. r~