Re: [PATCH v3 2/7] introduce UFFD-WP low-level interface helpers

2020-11-25 Thread Andrey Gruzdev
On 25.11.2020 21:43, Dr. David Alan Gilbert wrote: * Andrey Gruzdev (andrey.gruz...@virtuozzo.com) wrote: On 24.11.2020 20:57, Dr. David Alan Gilbert wrote: * Andrey Gruzdev (andrey.gruz...@virtuozzo.com) wrote: Implemented support for the whole RAM block memory protection/un-protection.

Re: [PATCH v3 2/7] introduce UFFD-WP low-level interface helpers

2020-11-25 Thread Dr. David Alan Gilbert
* Andrey Gruzdev (andrey.gruz...@virtuozzo.com) wrote: > On 24.11.2020 20:57, Dr. David Alan Gilbert wrote: > > * Andrey Gruzdev (andrey.gruz...@virtuozzo.com) wrote: > > > Implemented support for the whole RAM block memory > > > protection/un-protection. Introduced higher level > > >

Re: [PATCH v3 2/7] introduce UFFD-WP low-level interface helpers

2020-11-25 Thread Andrey Gruzdev
On 24.11.2020 20:57, Dr. David Alan Gilbert wrote: * Andrey Gruzdev (andrey.gruz...@virtuozzo.com) wrote: Implemented support for the whole RAM block memory protection/un-protection. Introduced higher level ram_write_tracking_start() and ram_write_tracking_stop() to start/stop tracking guest

Re: [PATCH v3 2/7] introduce UFFD-WP low-level interface helpers

2020-11-24 Thread Dr. David Alan Gilbert
* Andrey Gruzdev (andrey.gruz...@virtuozzo.com) wrote: > Implemented support for the whole RAM block memory > protection/un-protection. Introduced higher level > ram_write_tracking_start() and ram_write_tracking_stop() > to start/stop tracking guest memory writes. > > Signed-off-by: Andrey

Re: [PATCH v3 2/7] introduce UFFD-WP low-level interface helpers

2020-11-20 Thread Andrey Gruzdev
On 20.11.2020 18:01, Peter Xu wrote: On Fri, Nov 20, 2020 at 02:04:46PM +0300, Andrey Gruzdev wrote: +RAMBLOCK_FOREACH_NOT_IGNORED(bs) { +/* Nothing to do with read-only and MMIO-writable regions */ +if (bs->mr->readonly || bs->mr->rom_device) { +continue; +

Re: [PATCH v3 2/7] introduce UFFD-WP low-level interface helpers

2020-11-20 Thread Peter Xu
On Fri, Nov 20, 2020 at 02:04:46PM +0300, Andrey Gruzdev wrote: > > > +RAMBLOCK_FOREACH_NOT_IGNORED(bs) { > > > +/* Nothing to do with read-only and MMIO-writable regions */ > > > +if (bs->mr->readonly || bs->mr->rom_device) { > > > +continue; > > > +} > > >

Re: [PATCH v3 2/7] introduce UFFD-WP low-level interface helpers

2020-11-20 Thread Andrey Gruzdev
On 19.11.2020 21:39, Peter Xu wrote: On Thu, Nov 19, 2020 at 03:59:35PM +0300, Andrey Gruzdev via wrote: +/** + * uffd_register_memory: register memory range with UFFD + * + * Returns 0 in case of success, negative value on error + * + * @uffd: UFFD file descriptor + * @start: starting virtual

Re: [PATCH v3 2/7] introduce UFFD-WP low-level interface helpers

2020-11-19 Thread Peter Xu
On Thu, Nov 19, 2020 at 03:59:35PM +0300, Andrey Gruzdev via wrote: > +/** > + * uffd_register_memory: register memory range with UFFD > + * > + * Returns 0 in case of success, negative value on error > + * > + * @uffd: UFFD file descriptor > + * @start: starting virtual address of memory range >

[PATCH v3 2/7] introduce UFFD-WP low-level interface helpers

2020-11-19 Thread Andrey Gruzdev via
Implemented support for the whole RAM block memory protection/un-protection. Introduced higher level ram_write_tracking_start() and ram_write_tracking_stop() to start/stop tracking guest memory writes. Signed-off-by: Andrey Gruzdev --- include/exec/memory.h | 7 ++ migration/ram.c | 267