KVM: s390: Clear storage keys
page_table_reset_pgste() already does a complete page table walk to reset the pgste. Enhance it to initialize the storage keys to PAGE_DEFAULT_KEY if requested by the caller. This will be used for lazy storage key handling. Also provide an empty stub for !CONFIG_PGSTE Lets adopt the current code (diag 308) to not clear the keys. Signed-off-by: Dominik Dingel <dingel@linux.vnet.ibm.com> Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
This commit is contained in:

committed by
Christian Borntraeger

parent
65eef33550
commit
d4cb11340b
@@ -169,15 +169,15 @@ static int __diag_ipl_functions(struct kvm_vcpu *vcpu)
|
||||
switch (subcode) {
|
||||
case 0:
|
||||
case 1:
|
||||
page_table_reset_pgste(current->mm, 0, TASK_SIZE);
|
||||
page_table_reset_pgste(current->mm, 0, TASK_SIZE, false);
|
||||
return -EOPNOTSUPP;
|
||||
case 3:
|
||||
vcpu->run->s390_reset_flags = KVM_S390_RESET_CLEAR;
|
||||
page_table_reset_pgste(current->mm, 0, TASK_SIZE);
|
||||
page_table_reset_pgste(current->mm, 0, TASK_SIZE, false);
|
||||
break;
|
||||
case 4:
|
||||
vcpu->run->s390_reset_flags = 0;
|
||||
page_table_reset_pgste(current->mm, 0, TASK_SIZE);
|
||||
page_table_reset_pgste(current->mm, 0, TASK_SIZE, false);
|
||||
break;
|
||||
default:
|
||||
return -EOPNOTSUPP;
|
||||
|
Reference in New Issue
Block a user