All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@web.de>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel <qemu-devel@nongnu.org>, "Andreas Färber" <afaerber@suse.de>
Subject: [Qemu-devel] [PATCH 2/2] Revert "memory: Return -1 again on reads from unsigned regions"
Date: Sat, 03 Aug 2013 10:31:14 +0200	[thread overview]
Message-ID: <51FCBFD2.3030401@web.de> (raw)
In-Reply-To: <51FCBF4E.90605@web.de>

From: Jan Kiszka <jan.kiszka@siemens.com>

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.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 memory.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/memory.c b/memory.c
index ac6f3c6..7a0251d 100644
--- a/memory.c
+++ b/memory.c
@@ -873,7 +873,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,
-- 
1.7.3.4

       reply	other threads:[~2013-08-03  8:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <51FCBF4E.90605@web.de>
2013-08-03  8:31 ` Jan Kiszka [this message]
2013-08-08 15:23   ` [Qemu-devel] [PATCH 2/2] Revert "memory: Return -1 again on reads from unsigned regions" Peter Maydell
2013-08-08 15:27     ` Jan Kiszka
2013-08-08 16:46     ` Andreas Färber
2013-08-08 16:48       ` Peter Maydell
2013-08-08 16:55         ` Andreas Färber

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51FCBFD2.3030401@web.de \
    --to=jan.kiszka@web.de \
    --cc=afaerber@suse.de \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.