]> asedeno.scripts.mit.edu Git - linux.git/commit
KVM: s390: vsie: optimize gmap prefix mapping
authorDavid Hildenbrand <dahi@linux.vnet.ibm.com>
Fri, 22 Apr 2016 11:50:09 +0000 (13:50 +0200)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Tue, 21 Jun 2016 07:43:34 +0000 (09:43 +0200)
commit06d68a6c85d95515533663ff002d06753fd772aa
tree588925752b42047736081a90f6f3cb9ca9df36d3
parenta3508fbe9dc6dd3bece0c7bf889cc085a011738c
KVM: s390: vsie: optimize gmap prefix mapping

In order to not always map the prefix, we have to take care of certain
aspects that implicitly unmap the prefix:
- Changes to the prefix address
- Changes to MSO, because the HVA of the prefix is changed
- Changes of the gmap shadow (e.g. unshadowed, asce or edat changes)

By properly handling these cases, we can stop remapping the prefix when
there is no reason to do so.

This also allows us now to not acquire any gmap shadow locks when
rerunning the vsie and still having a valid gmap shadow.

Please note, to detect changing gmap shadows, we have to keep the reference
of the gmap shadow. The address of a gmap shadow does otherwise not
reliably indicate if the gmap shadow has changed (the memory chunk
could get reused).

Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
arch/s390/kvm/vsie.c