[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v1 12/15] cputlb: Change tlb_set_dirty() arg to cpu
From: |
Peter Crosthwaite |
Subject: |
[Qemu-devel] [PATCH v1 12/15] cputlb: Change tlb_set_dirty() arg to cpu |
Date: |
Thu, 10 Sep 2015 22:39:42 -0700 |
Change tlb_set_dirty() to accept a CPU instead of an env pointer. This
allows for removal of another CPUArchState usage from prototypes that
need to be QOMified.
Signed-off-by: Peter Crosthwaite <address@hidden>
---
cputlb.c | 3 ++-
exec.c | 3 +--
include/exec/cputlb.h | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/cputlb.c b/cputlb.c
index 5ccd545..6264e49 100644
--- a/cputlb.c
+++ b/cputlb.c
@@ -293,8 +293,9 @@ static inline void tlb_set_dirty1(CPUTLBEntry *tlb_entry,
target_ulong vaddr)
/* update the TLB corresponding to virtual page vaddr
so that it is no longer dirty */
-void tlb_set_dirty(CPUArchState *env, target_ulong vaddr)
+void tlb_set_dirty(CPUState *cpu, target_ulong vaddr)
{
+ CPUArchState *env = cpu->env_ptr;
int i;
int mmu_idx;
diff --git a/exec.c b/exec.c
index e3568c3..567854e 100644
--- a/exec.c
+++ b/exec.c
@@ -1903,8 +1903,7 @@ static void notdirty_mem_write(void *opaque, hwaddr
ram_addr,
/* we remove the notdirty callback only if the code has been
flushed */
if (!cpu_physical_memory_is_clean(ram_addr)) {
- CPUArchState *env = current_cpu->env_ptr;
- tlb_set_dirty(env, current_cpu->mem_io_vaddr);
+ tlb_set_dirty(current_cpu, current_cpu->mem_io_vaddr);
}
}
diff --git a/include/exec/cputlb.h b/include/exec/cputlb.h
index c3aaa30..7ad5c9a 100644
--- a/include/exec/cputlb.h
+++ b/include/exec/cputlb.h
@@ -26,7 +26,7 @@ void tlb_unprotect_code(ram_addr_t ram_addr);
void tlb_reset_dirty_range(CPUTLBEntry *tlb_entry, uintptr_t start,
uintptr_t length);
void tlb_reset_dirty(CPUState *cpu, ram_addr_t start1, ram_addr_t length);
-void tlb_set_dirty(CPUArchState *env, target_ulong vaddr);
+void tlb_set_dirty(CPUState *cpu, target_ulong vaddr);
extern int tlb_flush_count;
/* exec.c */
--
1.9.1
- [Qemu-devel] [PATCH v1 03/15] translate-all: Move tcg_handle_interrupt() to -common, (continued)
- [Qemu-devel] [PATCH v1 03/15] translate-all: Move tcg_handle_interrupt() to -common, Peter Crosthwaite, 2015/09/11
- [Qemu-devel] [PATCH v1 04/15] tcg: split tcg_op_defs to -common, Peter Crosthwaite, 2015/09/11
- [Qemu-devel] [PATCH v1 06/15] translate: move real_host_page setting to -common, Peter Crosthwaite, 2015/09/11
- [Qemu-devel] [PATCH v1 05/15] tcg: Move tcg_tb_ptr to -common, Peter Crosthwaite, 2015/09/11
- [Qemu-devel] [PATCH v1 07/15] cpus: Listify cpu_list() function, Peter Crosthwaite, 2015/09/11
- [Qemu-devel] [PATCH v1 08/15] translate-common: Listify tcg_enabled(), Peter Crosthwaite, 2015/09/11
- [Qemu-devel] [PATCH v1 10/15] exec-all: Move cpu_can_do_io() to qom/cpu.h, Peter Crosthwaite, 2015/09/11
- [Qemu-devel] [PATCH v1 11/15] cputlb: move CPU_LOOP() for tlb_reset() to exec.c, Peter Crosthwaite, 2015/09/11
- [Qemu-devel] [PATCH v1 12/15] cputlb: Change tlb_set_dirty() arg to cpu,
Peter Crosthwaite <=
- [Qemu-devel] [PATCH v1 09/15] core: Convert tcg_enabled() uses to any/all variants, Peter Crosthwaite, 2015/09/11
- [Qemu-devel] [PATCH v1 13/15] include/exec: Move cputlb exec.c defs out, Peter Crosthwaite, 2015/09/11
- [Qemu-devel] [PATCH v1 14/15] cpu-common: Define tb_page_addr_t for everyone, Peter Crosthwaite, 2015/09/11
- [Qemu-devel] [PATCH v1 15/15] monitor: uninclude cpu_ldst, Peter Crosthwaite, 2015/09/11
- Re: [Qemu-devel] [PATCH v1 00/15] Multi-Arch Phase 1, Paolo Bonzini, 2015/09/11