Skip to contentSkip to conversation

Question: cpu_physical_memory_map() and atomic test and set bit pattern

Qemu-devel Andrey Smetanin 1 participant 1 message Aug 3, 2015

lore
Share & tools
lore
#0 lore raw

Hello, QEMU Developers!

cpu_physical_memory_map() calls directly addess_space_map() which has comment "Use only for reads OR writes - not for read-modify-write operations."

Why there is such restriction (only read or write access) in addess_space_map()/cpu_physical_memory_map() ? How to transparently atomically test and set bit of guest memory inside QEMU host?
Is there any API for that pattern ? Or may I use cpu_physical_memory_map with is_write = 1 for that safely ?

Thanks,
Andrey