]> git.baikalelectronics.ru Git - kernel.git/commit
s390/kvm: simplify set_guest_storage_key
authorMartin Schwidefsky <schwidefsky@de.ibm.com>
Wed, 24 Feb 2016 09:18:50 +0000 (10:18 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Wed, 2 Mar 2016 12:44:22 +0000 (06:44 -0600)
commit9a3bbfa1a60e1ca9912c8a3d9d7d7916af5d6d48
treedfcbb07c4a35414bb7cd9d8faa08ab3c5ba6e991
parent3e03b8e05d159beefc632b723f65f39974cbd129
s390/kvm: simplify set_guest_storage_key

Git commit 3a2c8c5b047a8e290cd9fd28ff0af736598e4e09
"KVM: s390/mm: try a cow on read only pages for key ops"
added a fixup_user_fault to set_guest_storage_key force a copy on
write if the page is mapped read-only. This is supposed to fix the
problem of differing storage keys for shared mappings, e.g. the
empty_zero_page.
But if the storage key is set before the pte is mapped the storage
key update is done on the pgste. A later fault will happily map the
shared page with the key from the pgste.

Eventually git commit c212e9f5d546639e5a074f11c82608648ac91738
"s390/mm: prevent and break zero page mappings in case of storage keys"
fixed this problem for the empty_zero_page. The commit makes sure that
guests enabled for storage keys will not use the empty_zero_page at all.

As the call to fixup_user_fault in set_guest_storage_key depends on the
order of the storage key operation vs. the fault that maps the pte
it does not really fix anything. Just remove it.

Reviewed-by: Dominik Dingel <dingel@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/mm/pgtable.c