]> xenbits.xensource.com Git - qemu-xen.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:32:50 +0000 (17:32 +0000)
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>
Thu, 11 Feb 2016 17:32:50 +0000 (17:32 +0000)
This reverts commit 9a5a7327425fb18a210728f397df4fbc577019c7.
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 e739bed778896af7e33e72bc22c36e6191510c5f..cf120496f7e4467351e9ea425882432ace3866e0 100644 (file)
--- a/exec.c
+++ b/exec.c
@@ -342,7 +342,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;