]> git.baikalelectronics.ru Git - kernel.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)
commit3265223cab2187d9d8b96ac73df7182479c01ba2
tree588925752b42047736081a90f6f3cb9ca9df36d3
parent6177c3735c92a33294f1e54fea3c89828ae2cd32
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