From patchwork Thu Sep 5 17:17:34 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 272917 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id E6F942C00E4 for ; Fri, 6 Sep 2013 03:19:32 +1000 (EST) Received: from localhost ([::1]:32927 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHdDP-0003bP-19 for incoming@patchwork.ozlabs.org; Thu, 05 Sep 2013 13:19:31 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51452) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHdBs-0001Wz-1J for qemu-devel@nongnu.org; Thu, 05 Sep 2013 13:18:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VHdBm-00013z-Gb for qemu-devel@nongnu.org; Thu, 05 Sep 2013 13:17:55 -0400 Received: from mail-ee0-x22f.google.com ([2a00:1450:4013:c00::22f]:54218) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHdBm-00012n-9x; Thu, 05 Sep 2013 13:17:50 -0400 Received: by mail-ee0-f47.google.com with SMTP id d49so1064000eek.34 for ; Thu, 05 Sep 2013 10:17:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=IUCNc8bRhmZ/JKrM8rqZw1xolOoZx+M6sHYN6tevb8g=; b=K83ujRTvGOg/Jucacg8yuRGBvU7iyXtoBYrlyDuI8/cfQz/uaAZ5iPm/GGxcvkTlSu HMW9gBAZFhkpl9xsc53rztnWCSmgWZyfZaIW9EnKhOUO2H/Tz8I1vK/DVc1lfzcoNGRQ yii6VF13B8T7mzPDN9kvXFOb0r8/jRujDpgsPKbA6zL6IQhhtt/f2iGD5NTAlbjCSRrk UD+Z1GjDgCd95w7uuoUigy6wbnU0XfYKX+QofXV8Inbr0lfu4KDsWE14gn01rKUGKh+Z cTQ3a2cvap/W8UcSoVgOBgbxUNb2vwuIRoSFHEkTvsJfqu5oGC17aNZb4cP9HaxpsLMh ApEA== X-Received: by 10.15.36.9 with SMTP id h9mr15062425eev.30.1378401469414; Thu, 05 Sep 2013 10:17:49 -0700 (PDT) Received: from playground.lan (net-37-117-144-28.cust.dsl.vodafone.it. [37.117.144.28]) by mx.google.com with ESMTPSA id x47sm50345071eea.16.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 05 Sep 2013 10:17:48 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Thu, 5 Sep 2013 19:17:34 +0200 Message-Id: <1378401455-583-5-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1378401455-583-1-git-send-email-pbonzini@redhat.com> References: <1378401455-583-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4013:c00::22f Cc: Jan Kiszka , qemu-stable@nongnu.org, anthony@codemonkey.ws Subject: [Qemu-devel] [PULL 4/5] Revert "memory: Return -1 again on reads from unsigned regions" X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Jan Kiszka This reverts commit 9b8c69243585a32d14b9bb9fcd52c37b0b5a1b71. The commit was wrong: We only return -1 on invalid accesses, not on valid but unbacked ones. This broke various corner cases. Cc: qemu-stable@nongnu.org Signed-off-by: Jan Kiszka Signed-off-by: Paolo Bonzini --- memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/memory.c b/memory.c index 886f838..5a10fd0 100644 --- a/memory.c +++ b/memory.c @@ -872,7 +872,7 @@ static uint64_t unassigned_mem_read(void *opaque, hwaddr addr, if (current_cpu != NULL) { cpu_unassigned_access(current_cpu, addr, false, false, 0, size); } - return -1ULL; + return 0; } static void unassigned_mem_write(void *opaque, hwaddr addr,