KVM: s390/mm: handle guest unpin events
authorClaudio Imbrenda <imbrenda@linux.ibm.com>
Fri, 31 Jan 2020 20:00:39 +0000 (15:00 -0500)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Thu, 27 Feb 2020 18:47:11 +0000 (19:47 +0100)
commit5322781008a9dce894146ef71a09f1770062389a
treee61f27aa71edd2fb8c4b76006e1f51d296ef064f
parentd274995ec273b82dbbccc5521ab2132217f64952
KVM: s390/mm: handle guest unpin events

The current code tries to first pin shared pages, if that fails (e.g.
because the page is not shared) it will export them. For shared pages
this means that we get a new intercept telling us that the guest is
unsharing that page. We will unpin the page at that point in time,
following the same rules as for making a page secure (i.e. waiting for
writeback, no elevated page references, etc.)

Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Acked-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
[borntraeger@de.ibm.com: patch merging, splitting, fixing]
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
arch/s390/kvm/intercept.c