Laurent Vivier wrote: > This patch enhances the "-drive ,cache=off" mode with IDE drive emulation > by removing the buffer used in the IDE emulation. > --- > block.c | 10 +++ > block.h | 2 > block_int.h | 1 > cpu-all.h | 1 > exec.c | 19 ++++++ > hw/ide.c | 176 > +++++++++++++++++++++++++++++++++++++++++++++++++++++++++--- > vl.c | 1 > 7 files changed, 204 insertions(+), 6 deletions(-) > [...]
Unfortunately it is more complicated to write to the CPU memory. In particular, specific action should be done when translated code is present. A consistent API must include something like cpu_page_lock() / unlock(). Look at cpu_physical_memory_rw() to see the various issues which must be handled. Moreover, it would be better to add bus specific APIs (at least for PCI), but I can accept a CPU memory API for now. Fabrice.