Re: [Qemu-devel] [PULL v2 6/7] exec: allow to get a pointer for some mmio memory region

2017-08-10 Thread KONRAD Frederic
On 08/10/2017 02:59 PM, Paolo Bonzini wrote: On 10/08/2017 14:56, Peter Maydell wrote: +qemu_mutex_lock_iothread(); + +/* Reset dirty so this doesn't happen later. */ +cpu_physical_memory_test_and_clear_dirty(offset, size, 1); + +if (section.mr != mr) { +/*

Re: [Qemu-devel] [PULL v2 6/7] exec: allow to get a pointer for some mmio memory region

2017-08-10 Thread Paolo Bonzini
On 10/08/2017 14:56, Peter Maydell wrote: >> +qemu_mutex_lock_iothread(); >> + >> +/* Reset dirty so this doesn't happen later. */ >> +cpu_physical_memory_test_and_clear_dirty(offset, size, 1); >> + >> +if (section.mr != mr) { >> +/* memory_region_find add a ref on

Re: [Qemu-devel] [PULL v2 6/7] exec: allow to get a pointer for some mmio memory region

2017-08-10 Thread Peter Maydell
On 27 June 2017 at 16:37, Edgar E. Iglesias wrote: > From: KONRAD Frederic > > This introduces a special callback which allows to run code from some MMIO > devices. > > SysBusDevice with a MemoryRegion which implements the request_ptr callback

[Qemu-devel] [PULL v2 6/7] exec: allow to get a pointer for some mmio memory region

2017-06-27 Thread Edgar E. Iglesias
From: KONRAD Frederic This introduces a special callback which allows to run code from some MMIO devices. SysBusDevice with a MemoryRegion which implements the request_ptr callback will be notified when the guest try to execute code from their offset. Then it will be