s390x/kvm: enable/reset cmma via vm attributes
authorDominik Dingel <dingel@linux.vnet.ibm.com>
Fri, 11 Apr 2014 11:47:40 +0000 (13:47 +0200)
committerCornelia Huck <cornelia.huck@de.ibm.com>
Tue, 10 Jun 2014 07:50:27 +0000 (09:50 +0200)
commit4cb88c3c378ae8c86c0ba53619caf6924f72239c
tree9a1c2b712ab288b337c25daaec48e627961bcb6b
parent08da527fd07cf01dc29ca60a144fbdd60b0fb7c0
s390x/kvm: enable/reset cmma via vm attributes

Exploit the new api for userspace-controlled cmma. If supported, enable
cmma during kvm initialization and register a reset handler for cmma,
which is also called directly from the load IPL code.

The reset functionality is needed to reset the cmma state of the guest
pages, e.g. if a system reset is triggered via qemu monitor; otherwise
this could result in data corruption.

A guest triggered reboot may now lead to multiple cmma resets; this is
OK, however, as this is slowpath anyway and the simplest way to achieve
the intended effects.

Signed-off-by: Dominik Dingel <dingel@linux.vnet.ibm.com>
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
target-s390x/cpu.h
target-s390x/kvm.c
target-s390x/misc_helper.c
trace-events