diff options
| author | Peter Maydell | 2020-09-24 19:48:45 +0200 |
|---|---|---|
| committer | Peter Maydell | 2020-09-24 19:48:45 +0200 |
| commit | 8c1c07929feae876202ba26f07a540c5115c18cd (patch) | |
| tree | 20f6c8e2ac556bfb3c88a98c0d0cb2689de0263e /include/exec | |
| parent | Merge remote-tracking branch 'remotes/kraxel/tags/audio-20200923-pull-request... (diff) | |
| parent | qemu/atomic.h: rename atomic_ to qatomic_ (diff) | |
| download | qemu-8c1c07929feae876202ba26f07a540c5115c18cd.tar.gz qemu-8c1c07929feae876202ba26f07a540c5115c18cd.tar.xz qemu-8c1c07929feae876202ba26f07a540c5115c18cd.zip | |
Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging
Pull request
This includes the atomic_ -> qatomic_ rename that touches many files and is
prone to conflicts.
# gpg: Signature made Wed 23 Sep 2020 17:08:43 BST
# gpg: using RSA key 8695A8BFD3F97CDAAC35775A9CA4ABB381AB73C8
# gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" [full]
# gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>" [full]
# Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35 775A 9CA4 ABB3 81AB 73C8
* remotes/stefanha/tags/block-pull-request:
qemu/atomic.h: rename atomic_ to qatomic_
tests: add test-fdmon-epoll
fdmon-poll: reset npfd when upgrading to fdmon-epoll
gitmodules: add qemu.org vbootrom submodule
gitmodules: switch to qemu.org meson mirror
gitmodules: switch to qemu.org qboot mirror
docs/system: clarify deprecation schedule
virtio-crypto: don't modify elem->in/out_sg
virtio-blk: undo destructive iov_discard_*() operations
util/iov: add iov_discard_undo()
virtio: add vhost-user-fs-ccw device
libvhost-user: handle endianness as mandated by the spec
MAINTAINERS: add Stefan Hajnoczi as block/nvme.c maintainer
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include/exec')
| -rw-r--r-- | include/exec/cpu_ldst.h | 2 | ||||
| -rw-r--r-- | include/exec/exec-all.h | 6 | ||||
| -rw-r--r-- | include/exec/log.h | 6 | ||||
| -rw-r--r-- | include/exec/memory.h | 2 | ||||
| -rw-r--r-- | include/exec/ram_addr.h | 26 | ||||
| -rw-r--r-- | include/exec/ramlist.h | 2 | ||||
| -rw-r--r-- | include/exec/tb-lookup.h | 4 |
7 files changed, 25 insertions, 23 deletions
diff --git a/include/exec/cpu_ldst.h b/include/exec/cpu_ldst.h index c14a48f65e..30605edab9 100644 --- a/include/exec/cpu_ldst.h +++ b/include/exec/cpu_ldst.h @@ -299,7 +299,7 @@ static inline target_ulong tlb_addr_write(const CPUTLBEntry *entry) #if TCG_OVERSIZED_GUEST return entry->addr_write; #else - return atomic_read(&entry->addr_write); + return qatomic_read(&entry->addr_write); #endif } diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index 3cf88272df..1fe28d574f 100644 --- a/include/exec/exec-all.h +++ b/include/exec/exec-all.h @@ -89,7 +89,7 @@ void QEMU_NORETURN cpu_loop_exit_atomic(CPUState *cpu, uintptr_t pc); */ static inline bool cpu_loop_exit_requested(CPUState *cpu) { - return (int32_t)atomic_read(&cpu_neg(cpu)->icount_decr.u32) < 0; + return (int32_t)qatomic_read(&cpu_neg(cpu)->icount_decr.u32) < 0; } #if !defined(CONFIG_USER_ONLY) @@ -487,10 +487,10 @@ struct TranslationBlock { extern bool parallel_cpus; -/* Hide the atomic_read to make code a little easier on the eyes */ +/* Hide the qatomic_read to make code a little easier on the eyes */ static inline uint32_t tb_cflags(const TranslationBlock *tb) { - return atomic_read(&tb->cflags); + return qatomic_read(&tb->cflags); } /* current cflags for hashing/comparison */ diff --git a/include/exec/log.h b/include/exec/log.h index 3ed797c1c8..86871f403a 100644 --- a/include/exec/log.h +++ b/include/exec/log.h @@ -19,7 +19,7 @@ static inline void log_cpu_state(CPUState *cpu, int flags) if (qemu_log_enabled()) { rcu_read_lock(); - logfile = atomic_rcu_read(&qemu_logfile); + logfile = qatomic_rcu_read(&qemu_logfile); if (logfile) { cpu_dump_state(cpu, logfile->fd, flags); } @@ -49,7 +49,7 @@ static inline void log_target_disas(CPUState *cpu, target_ulong start, { QemuLogFile *logfile; rcu_read_lock(); - logfile = atomic_rcu_read(&qemu_logfile); + logfile = qatomic_rcu_read(&qemu_logfile); if (logfile) { target_disas(logfile->fd, cpu, start, len); } @@ -60,7 +60,7 @@ static inline void log_disas(void *code, unsigned long size, const char *note) { QemuLogFile *logfile; rcu_read_lock(); - logfile = atomic_rcu_read(&qemu_logfile); + logfile = qatomic_rcu_read(&qemu_logfile); if (logfile) { disas(logfile->fd, code, size, note); } diff --git a/include/exec/memory.h b/include/exec/memory.h index f1bb2a7df5..06b85e3a73 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -685,7 +685,7 @@ struct FlatView { static inline FlatView *address_space_to_flatview(AddressSpace *as) { - return atomic_rcu_read(&as->current_map); + return qatomic_rcu_read(&as->current_map); } diff --git a/include/exec/ram_addr.h b/include/exec/ram_addr.h index 3ef729a23c..c6d2ef1d07 100644 --- a/include/exec/ram_addr.h +++ b/include/exec/ram_addr.h @@ -164,7 +164,7 @@ static inline bool cpu_physical_memory_get_dirty(ram_addr_t start, page = start >> TARGET_PAGE_BITS; WITH_RCU_READ_LOCK_GUARD() { - blocks = atomic_rcu_read(&ram_list.dirty_memory[client]); + blocks = qatomic_rcu_read(&ram_list.dirty_memory[client]); idx = page / DIRTY_MEMORY_BLOCK_SIZE; offset = page % DIRTY_MEMORY_BLOCK_SIZE; @@ -205,7 +205,7 @@ static inline bool cpu_physical_memory_all_dirty(ram_addr_t start, RCU_READ_LOCK_GUARD(); - blocks = atomic_rcu_read(&ram_list.dirty_memory[client]); + blocks = qatomic_rcu_read(&ram_list.dirty_memory[client]); idx = page / DIRTY_MEMORY_BLOCK_SIZE; offset = page % DIRTY_MEMORY_BLOCK_SIZE; @@ -278,7 +278,7 @@ static inline void cpu_physical_memory_set_dirty_flag(ram_addr_t addr, RCU_READ_LOCK_GUARD(); - blocks = atomic_rcu_read(&ram_list.dirty_memory[client]); + blocks = qatomic_rcu_read(&ram_list.dirty_memory[client]); set_bit_atomic(offset, blocks->blocks[idx]); } @@ -301,7 +301,7 @@ static inline void cpu_physical_memory_set_dirty_range(ram_addr_t start, WITH_RCU_READ_LOCK_GUARD() { for (i = 0; i < DIRTY_MEMORY_NUM; i++) { - blocks[i] = atomic_rcu_read(&ram_list.dirty_memory[i]); + blocks[i] = qatomic_rcu_read(&ram_list.dirty_memory[i]); } idx = page / DIRTY_MEMORY_BLOCK_SIZE; @@ -361,23 +361,25 @@ static inline void cpu_physical_memory_set_dirty_lebitmap(unsigned long *bitmap, WITH_RCU_READ_LOCK_GUARD() { for (i = 0; i < DIRTY_MEMORY_NUM; i++) { - blocks[i] = atomic_rcu_read(&ram_list.dirty_memory[i])->blocks; + blocks[i] = + qatomic_rcu_read(&ram_list.dirty_memory[i])->blocks; } for (k = 0; k < nr; k++) { if (bitmap[k]) { unsigned long temp = leul_to_cpu(bitmap[k]); - atomic_or(&blocks[DIRTY_MEMORY_VGA][idx][offset], temp); + qatomic_or(&blocks[DIRTY_MEMORY_VGA][idx][offset], temp); if (global_dirty_log) { - atomic_or(&blocks[DIRTY_MEMORY_MIGRATION][idx][offset], - temp); + qatomic_or( + &blocks[DIRTY_MEMORY_MIGRATION][idx][offset], + temp); } if (tcg_enabled()) { - atomic_or(&blocks[DIRTY_MEMORY_CODE][idx][offset], - temp); + qatomic_or(&blocks[DIRTY_MEMORY_CODE][idx][offset], + temp); } } @@ -461,12 +463,12 @@ uint64_t cpu_physical_memory_sync_dirty_bitmap(RAMBlock *rb, DIRTY_MEMORY_BLOCK_SIZE); unsigned long page = BIT_WORD(start >> TARGET_PAGE_BITS); - src = atomic_rcu_read( + src = qatomic_rcu_read( &ram_list.dirty_memory[DIRTY_MEMORY_MIGRATION])->blocks; for (k = page; k < page + nr; k++) { if (src[idx][offset]) { - unsigned long bits = atomic_xchg(&src[idx][offset], 0); + unsigned long bits = qatomic_xchg(&src[idx][offset], 0); unsigned long new_dirty; new_dirty = ~dest[k]; dest[k] |= bits; diff --git a/include/exec/ramlist.h b/include/exec/ramlist.h index bc4faa1b00..26704aa3b0 100644 --- a/include/exec/ramlist.h +++ b/include/exec/ramlist.h @@ -19,7 +19,7 @@ typedef struct RAMBlockNotifier RAMBlockNotifier; * rcu_read_lock(); * * DirtyMemoryBlocks *blocks = - * atomic_rcu_read(&ram_list.dirty_memory[DIRTY_MEMORY_MIGRATION]); + * qatomic_rcu_read(&ram_list.dirty_memory[DIRTY_MEMORY_MIGRATION]); * * ram_addr_t idx = (addr >> TARGET_PAGE_BITS) / DIRTY_MEMORY_BLOCK_SIZE; * unsigned long *block = blocks.blocks[idx]; diff --git a/include/exec/tb-lookup.h b/include/exec/tb-lookup.h index 26921b6daf..9cf475bb03 100644 --- a/include/exec/tb-lookup.h +++ b/include/exec/tb-lookup.h @@ -27,7 +27,7 @@ tb_lookup__cpu_state(CPUState *cpu, target_ulong *pc, target_ulong *cs_base, cpu_get_tb_cpu_state(env, pc, cs_base, flags); hash = tb_jmp_cache_hash_func(*pc); - tb = atomic_rcu_read(&cpu->tb_jmp_cache[hash]); + tb = qatomic_rcu_read(&cpu->tb_jmp_cache[hash]); cf_mask &= ~CF_CLUSTER_MASK; cf_mask |= cpu->cluster_index << CF_CLUSTER_SHIFT; @@ -44,7 +44,7 @@ tb_lookup__cpu_state(CPUState *cpu, target_ulong *pc, target_ulong *cs_base, if (tb == NULL) { return NULL; } - atomic_set(&cpu->tb_jmp_cache[hash], tb); + qatomic_set(&cpu->tb_jmp_cache[hash], tb); return tb; } |
