diff options
author | Janosch Frank <frankja@linux.ibm.com> | 2018-08-30 17:14:18 +0300 |
---|---|---|
committer | Christian Borntraeger <borntraeger@de.ibm.com> | 2018-09-04 12:40:26 +0300 |
commit | df88f3181f10565c6e3a89eb6f0f9e6afaaf15f1 (patch) | |
tree | 5ecdb676fe4a0bc80ffca99703385a239b107c75 /arch/s390/include/asm/mmu.h | |
parent | 204c97245612b6c255edf4e21e24d417c4a0c008 (diff) | |
download | linux-df88f3181f10565c6e3a89eb6f0f9e6afaaf15f1.tar.xz |
KVM: s390: Properly lock mm context allow_gmap_hpage_1m setting
We have to do down_write on the mm semaphore to set a bitfield in the
mm context.
Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
Fixes: a4499382 ("KVM: s390: Add huge page enablement control")
Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Diffstat (limited to 'arch/s390/include/asm/mmu.h')
-rw-r--r-- | arch/s390/include/asm/mmu.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/s390/include/asm/mmu.h b/arch/s390/include/asm/mmu.h index f31a15044c24..a8418e1379eb 100644 --- a/arch/s390/include/asm/mmu.h +++ b/arch/s390/include/asm/mmu.h @@ -16,7 +16,13 @@ typedef struct { unsigned long asce; unsigned long asce_limit; unsigned long vdso_base; - /* The mmu context allocates 4K page tables. */ + /* + * The following bitfields need a down_write on the mm + * semaphore when they are written to. As they are only + * written once, they can be read without a lock. + * + * The mmu context allocates 4K page tables. + */ unsigned int alloc_pgste:1; /* The mmu context uses extended page tables. */ unsigned int has_pgste:1; |