summaryrefslogtreecommitdiffstats
path: root/arch/s390/include/asm/gmap.h
diff options
context:
space:
mode:
authorDavid Hildenbrand <dahi@linux.vnet.ibm.com>2016-03-08 12:23:38 +0100
committerChristian Borntraeger <borntraeger@de.ibm.com>2016-06-20 09:54:27 +0200
commit998f637cc4b9ef3fa32b196294a3136ee05271a2 (patch)
tree4877cf772f2b98f258578bb048ba6ed52ee77c2b /arch/s390/include/asm/gmap.h
parents390/mm: shadow pages with real guest requested protection (diff)
downloadlinux-998f637cc4b9ef3fa32b196294a3136ee05271a2.tar.xz
linux-998f637cc4b9ef3fa32b196294a3136ee05271a2.zip
s390/mm: avoid races on region/segment/page table shadowing
We have to unlock sg->guest_table_lock in order to call gmap_protect_rmap(). If we sleep just before that call, another VCPU might pick up that shadowed page table (while it is not protected yet) and use it. In order to avoid these races, we have to introduce a third state - "origin set but still invalid" for an entry. This way, we can avoid another thread already using the entry before the table is fully protected. As soon as everything is set up, we can clear the invalid bit - if we had no race with the unshadowing code. Suggested-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Diffstat (limited to 'arch/s390/include/asm/gmap.h')
0 files changed, 0 insertions, 0 deletions