]> 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:31:46 +0000 (17:31 +0000)
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>
Thu, 11 Feb 2016 17:31:46 +0000 (17:31 +0000)
This reverts commit 22585843887ce20a106c23162dc5845d64c42edd.
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 98d97d32b83b9aa7fc68cc03e4d1f7358124d17e..0a4a0c5af663865df12adb5026a7cd864f350416 100644 (file)
--- a/exec.c
+++ b/exec.c
@@ -375,7 +375,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;