KVM: s390: Disable dirty log retrieval for UCONTROL guests
authorJanosch Frank <frankja@linux.vnet.ibm.com>
Thu, 2 Feb 2017 15:39:31 +0000 (16:39 +0100)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Mon, 6 Feb 2017 10:20:12 +0000 (11:20 +0100)
commite1e8a9624f7ba8ead4f056ff558ed070e86fa747
treeacd01ff17218b3328b1f390ddc87caca6f1dfbb1
parenta8c39dd77cb9fad0d0e5c5e6581851bdcbc1e6f6
KVM: s390: Disable dirty log retrieval for UCONTROL guests

User controlled KVM guests do not support the dirty log, as they have
no single gmap that we can check for changes.

As they have no single gmap, kvm->arch.gmap is NULL and all further
referencing to it for dirty checking will result in a NULL
dereference.

Let's return -EINVAL if a caller tries to sync dirty logs for a
UCONTROL guest.

Fixes: 15f36eb ("KVM: s390: Add proper dirty bitmap support to S390 kvm.")
Cc: <stable@vger.kernel.org> # 3.16+
Signed-off-by: Janosch Frank <frankja@linux.vnet.ibm.com>
Reported-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
arch/s390/kvm/kvm-s390.c