[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 03/10] exec: Move tb_invalidate_phys_range() to 'exec/exec-all.h'
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 03/10] exec: Move tb_invalidate_phys_range() to 'exec/exec-all.h' |
Date: |
Thu, 7 May 2020 19:39:51 +0200 |
Move tb_invalidate_phys_range() to "exec/exec-all.h" with the
other TranslationBlock invalidate functions. Move all these
functions altogether. Check for the CONFIG_SOFTMMU definition
which is more explicit than CONFIG_USER_ONLY.
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
include/exec/exec-all.h | 14 ++++++++------
include/exec/ram_addr.h | 2 --
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h
index 350c4b451b..f1a9b8a576 100644
--- a/include/exec/exec-all.h
+++ b/include/exec/exec-all.h
@@ -454,12 +454,15 @@ static inline uint32_t curr_cflags(void)
}
/* TranslationBlock invalidate API */
-#if defined(CONFIG_USER_ONLY)
+#ifdef CONFIG_SOFTMMU
+void tb_invalidate_phys_addr(AddressSpace *as, hwaddr addr, MemTxAttrs attrs);
+void tb_invalidate_phys_range(ram_addr_t start, ram_addr_t end);
+void tb_flush_jmp_cache(CPUState *cpu, target_ulong addr);
+#else
void tb_invalidate_phys_addr(target_ulong addr);
void tb_invalidate_phys_range(target_ulong start, target_ulong end);
-#else
-void tb_invalidate_phys_addr(AddressSpace *as, hwaddr addr, MemTxAttrs attrs);
-#endif
+#endif /* CONFIG_SOFTMMU */
+
void tb_flush(CPUState *cpu);
void tb_phys_invalidate(TranslationBlock *tb, tb_page_addr_t page_addr);
TranslationBlock *tb_htable_lookup(CPUState *cpu, target_ulong pc,
@@ -583,7 +586,6 @@ void tlb_reset_dirty(CPUState *cpu, ram_addr_t start1,
ram_addr_t length);
void tlb_set_dirty(CPUState *cpu, target_ulong vaddr);
/* exec.c */
-void tb_flush_jmp_cache(CPUState *cpu, target_ulong addr);
MemoryRegionSection *
address_space_translate_for_iotlb(CPUState *cpu, int asidx, hwaddr addr,
@@ -591,7 +593,7 @@ address_space_translate_for_iotlb(CPUState *cpu, int asidx,
hwaddr addr,
MemTxAttrs attrs, int *prot);
hwaddr memory_region_section_get_iotlb(CPUState *cpu,
MemoryRegionSection *section);
-#endif
+#endif /* CONFIG_USER_ONLY */
/* vl.c */
extern int singlestep;
diff --git a/include/exec/ram_addr.h b/include/exec/ram_addr.h
index 7b5c24e928..06096e8c6a 100644
--- a/include/exec/ram_addr.h
+++ b/include/exec/ram_addr.h
@@ -147,8 +147,6 @@ static inline void qemu_ram_block_writeback(RAMBlock *block)
#define DIRTY_CLIENTS_ALL ((1 << DIRTY_MEMORY_NUM) - 1)
#define DIRTY_CLIENTS_NOCODE (DIRTY_CLIENTS_ALL & ~(1 << DIRTY_MEMORY_CODE))
-void tb_invalidate_phys_range(ram_addr_t start, ram_addr_t end);
-
static inline bool cpu_physical_memory_get_dirty(ram_addr_t start,
ram_addr_t length,
unsigned client)
--
2.21.3
- [PATCH 00/10] exec: Shear 'exec/ram_addr.h' and make NVMe device target-agnostic, Philippe Mathieu-Daudé, 2020/05/07
- [PATCH 01/10] exec: Rename qemu_ram_writeback() as qemu_ram_msync(), Philippe Mathieu-Daudé, 2020/05/07
- [PATCH 02/10] exec/ramblock: Add missing 'qemu/rcu.h' include, Philippe Mathieu-Daudé, 2020/05/07
- [PATCH 03/10] exec: Move tb_invalidate_phys_range() to 'exec/exec-all.h',
Philippe Mathieu-Daudé <=
- [PATCH 04/10] exec/memory-internal: Check CONFIG_SOFTMMU instead of CONFIG_USER_ONLY, Philippe Mathieu-Daudé, 2020/05/07
- [PATCH 05/10] exec: Move qemu_minrampagesize/qemu_maxrampagesize to 'qemu-common.h', Philippe Mathieu-Daudé, 2020/05/07
- [PATCH 06/10] exec: Move ramblock_recv_bitmap_offset() to migration/ram.c, Philippe Mathieu-Daudé, 2020/05/07
- [PATCH 07/10] exec: Move all RAMBlock functions to 'exec/ramblock.h', Philippe Mathieu-Daudé, 2020/05/07