x86/mem_sharing: make fork_reset more configurable
authorTamas K Lengyel <tamas.lengyel@intel.com>
Thu, 28 Apr 2022 14:15:33 +0000 (16:15 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 28 Apr 2022 14:15:33 +0000 (16:15 +0200)
commitd711a8e5279d830d2e4f0f55246ed0c6e4a6bbed
tree6486a89d3b07bb71dfdfc0bf178b824dae70c716
parent54a71fe63b98c81cae4ff81bd0bd154840c3b44f
x86/mem_sharing: make fork_reset more configurable

Alow specify distinct parts of the fork VM to be reset. This is useful when a
fuzzing operation involves mapping in only a handful of pages that are known
ahead of time. Throwing these pages away just to be re-copied immediately is
expensive, thus allowing to specify partial resets can speed things up.

Also allow resetting to be initiated from vm_event responses as an
optiomization.

Signed-off-by: Tamas K Lengyel <tamas.lengyel@intel.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
xen/arch/x86/include/asm/mem_sharing.h
xen/arch/x86/mm/mem_sharing.c
xen/common/vm_event.c
xen/include/public/memory.h
xen/include/public/vm_event.h