]> xenbits.xensource.com Git - qemu-upstream-4.6-testing.git/commitdiff
Revert "exec: fix a glitch in checking dma r/w access"
authorStefano Stabellini <stefano.stabellini@eu.citrix.com>
Thu, 11 Feb 2016 17:20:16 +0000 (17:20 +0000)
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>
Thu, 11 Feb 2016 17:30:05 +0000 (17:30 +0000)
This reverts commit 47f168e2da96473ede608a17aa757c11bc90fc5f.
The patch should not have been committed, see:
http://marc.info/?l=qemu-devel&m=145373225020873.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
exec.c

diff --git a/exec.c b/exec.c
index 581b57c62d987c3fb7573db134d53a972ebb652d..46fe70ed49f85d0638061aa5b09f1f9d521b0bd3 100644 (file)
--- a/exec.c
+++ b/exec.c
@@ -347,7 +347,7 @@ address_space_translate_internal(AddressSpaceDispatch *d, hwaddr addr, hwaddr *x
 static inline bool memory_access_is_direct(MemoryRegion *mr, bool is_write)
 {
     if (memory_region_is_ram(mr)) {
-        return (is_write && !mr->readonly);
+        return !(is_write && mr->readonly);
     }
     if (memory_region_is_romd(mr)) {
         return !is_write;