[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 2/3] memory: make function memory_access_is_direct p
From: |
Efimov Vasily |
Subject: |
[Qemu-devel] [PATCH 2/3] memory: make function memory_access_is_direct public |
Date: |
Thu, 16 Jul 2015 11:35:03 +0300 |
Make function memory_access_is_direct public. It is required by PAM emulation.
Signed-off-by: Efimov Vasily <address@hidden>
---
exec.c | 12 ------------
include/exec/memory-internal.h | 12 ++++++++++++
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/exec.c b/exec.c
index 4e37ded..27064b8 100644
--- a/exec.c
+++ b/exec.c
@@ -372,18 +372,6 @@ address_space_translate_internal(AddressSpaceDispatch *d,
hwaddr addr, hwaddr *x
return section;
}
-static inline bool memory_access_is_direct(MemoryRegion *mr, bool is_write)
-{
- if (memory_region_is_ram(mr)) {
- return !(is_write && mr->readonly);
- }
- if (memory_region_is_romd(mr)) {
- return !is_write;
- }
-
- return false;
-}
-
/* Called from RCU critical section */
MemoryRegion *address_space_translate(AddressSpace *as, hwaddr addr,
hwaddr *xlat, hwaddr *plen,
diff --git a/include/exec/memory-internal.h b/include/exec/memory-internal.h
index 801da82..89975b6 100644
--- a/include/exec/memory-internal.h
+++ b/include/exec/memory-internal.h
@@ -34,5 +34,17 @@ bool memory_region_access_valid(MemoryRegion *mr, hwaddr
addr,
void invalidate_and_set_dirty(MemoryRegion *mr, hwaddr addr,
hwaddr length);
+static inline bool memory_access_is_direct(MemoryRegion *mr, bool is_write)
+{
+ if (memory_region_is_ram(mr)) {
+ return !(is_write && mr->readonly);
+ }
+ if (memory_region_is_romd(mr)) {
+ return !is_write;
+ }
+
+ return false;
+}
+
#endif
#endif
--
1.9.1
- [Qemu-devel] [PATCH 0/3] PAM emulation improvement, Efimov Vasily, 2015/07/16
- [Qemu-devel] [PATCH 1/3] memory: make function invalidate_and_set_dirty public, Efimov Vasily, 2015/07/16
- [Qemu-devel] [PATCH 2/3] memory: make function memory_access_is_direct public,
Efimov Vasily <=
- [Qemu-devel] [PATCH 3/3] PAM: make PAM emulation closer to documentation, Efimov Vasily, 2015/07/16
- Re: [Qemu-devel] [PATCH 3/3] PAM: make PAM emulation closer to documentation, Paolo Bonzini, 2015/07/16
- Re: [Qemu-devel] [PATCH 3/3] PAM: make PAM emulation closer to documentation, Ефимов Василий, 2015/07/16
- Re: [Qemu-devel] [PATCH 3/3] PAM: make PAM emulation closer to documentation, Paolo Bonzini, 2015/07/16
- Re: [Qemu-devel] [PATCH 3/3] PAM: make PAM emulation closer to documentation, Ефимов Василий, 2015/07/16
- Re: [Qemu-devel] [PATCH 3/3] PAM: make PAM emulation closer to documentation, Paolo Bonzini, 2015/07/16
- Re: [Qemu-devel] [PATCH 3/3] PAM: make PAM emulation closer to documentation, Ефимов Василий, 2015/07/17
- Re: [Qemu-devel] [PATCH 3/3] PAM: make PAM emulation closer to documentation, Paolo Bonzini, 2015/07/17