kvm: Avoid COW if KVM MMU is asynchronous
authorJan Kiszka <jan.kiszka@web.de>
Sun, 26 Apr 2009 16:03:40 +0000 (18:03 +0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Fri, 1 May 2009 14:44:11 +0000 (09:44 -0500)
commite76307676d8593bdea9f3850b43a07d8c247d27f
treed761a5e3bf4b2c4075415c3f880e65baf33856d8
parentf25b46dde78367bf3b5768c738a7a6f9e22c60b0
kvm: Avoid COW if KVM MMU is asynchronous

Avi Kivity wrote:
> Suggest wrapping in a function and hiding it deep inside kvm-all.c.
>

Done in v2:

---------->

If the KVM MMU is asynchronous (kernel does not support MMU_NOTIFIER),
we have to avoid COW for the guest memory. Otherwise we risk serious
breakage when guest pages change there physical locations due to COW
after fork. Seen when forking smbd during runtime via -smb.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
exec.c
kvm-all.c
kvm.h