diff options
author | Janosch Frank <frankja@linux.vnet.ibm.com> | 2018-02-16 06:16:14 -0500 |
---|---|---|
committer | Christian Borntraeger <borntraeger@de.ibm.com> | 2018-03-09 04:44:17 -0500 |
commit | c9f0a2b87f9e95197c2f81920a82bcef6ad3db99 (patch) | |
tree | 53b2b9c906ee4b0e607cdb4aef867c114127351e /arch/s390/include | |
parent | c3b9e3e1ea1c1d1524b56b6734711db2a6fc2163 (diff) |
KVM: s390: Refactor host cmma and pfmfi interpretation controls
use_cmma in kvm_arch means that the KVM hypervisor is allowed to use
cmma, whereas use_cmma in the mm context means cmm has been used before.
Let's rename the context one to uses_cmm, as the vm does use
collaborative memory management but the host uses the cmm assist
(interpretation facility).
Also let's introduce use_pfmfi, so we can remove the pfmfi disablement
when we activate cmma and rather not activate it in the first place.
Signed-off-by: Janosch Frank <frankja@linux.vnet.ibm.com>
Message-Id: <1518779775-256056-2-git-send-email-frankja@linux.vnet.ibm.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Diffstat (limited to 'arch/s390/include')
-rw-r--r-- | arch/s390/include/asm/kvm_host.h | 1 | ||||
-rw-r--r-- | arch/s390/include/asm/mmu.h | 4 | ||||
-rw-r--r-- | arch/s390/include/asm/mmu_context.h | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/arch/s390/include/asm/kvm_host.h b/arch/s390/include/asm/kvm_host.h index afb0f08b8021..27918b15a8ba 100644 --- a/arch/s390/include/asm/kvm_host.h +++ b/arch/s390/include/asm/kvm_host.h | |||
@@ -792,6 +792,7 @@ struct kvm_arch{ | |||
792 | int css_support; | 792 | int css_support; |
793 | int use_irqchip; | 793 | int use_irqchip; |
794 | int use_cmma; | 794 | int use_cmma; |
795 | int use_pfmfi; | ||
795 | int user_cpu_state_ctrl; | 796 | int user_cpu_state_ctrl; |
796 | int user_sigp; | 797 | int user_sigp; |
797 | int user_stsi; | 798 | int user_stsi; |
diff --git a/arch/s390/include/asm/mmu.h b/arch/s390/include/asm/mmu.h index db35c41a59d5..c639c95850e4 100644 --- a/arch/s390/include/asm/mmu.h +++ b/arch/s390/include/asm/mmu.h | |||
@@ -22,8 +22,8 @@ typedef struct { | |||
22 | unsigned int has_pgste:1; | 22 | unsigned int has_pgste:1; |
23 | /* The mmu context uses storage keys. */ | 23 | /* The mmu context uses storage keys. */ |
24 | unsigned int use_skey:1; | 24 | unsigned int use_skey:1; |
25 | /* The mmu context uses CMMA. */ | 25 | /* The mmu context uses CMM. */ |
26 | unsigned int use_cmma:1; | 26 | unsigned int uses_cmm:1; |
27 | } mm_context_t; | 27 | } mm_context_t; |
28 | 28 | ||
29 | #define INIT_MM_CONTEXT(name) \ | 29 | #define INIT_MM_CONTEXT(name) \ |
diff --git a/arch/s390/include/asm/mmu_context.h b/arch/s390/include/asm/mmu_context.h index 65154eaa3714..d3ebfa8f8a9f 100644 --- a/arch/s390/include/asm/mmu_context.h +++ b/arch/s390/include/asm/mmu_context.h | |||
@@ -31,7 +31,7 @@ static inline int init_new_context(struct task_struct *tsk, | |||
31 | (current->mm && current->mm->context.alloc_pgste); | 31 | (current->mm && current->mm->context.alloc_pgste); |
32 | mm->context.has_pgste = 0; | 32 | mm->context.has_pgste = 0; |
33 | mm->context.use_skey = 0; | 33 | mm->context.use_skey = 0; |
34 | mm->context.use_cmma = 0; | 34 | mm->context.uses_cmm = 0; |
35 | #endif | 35 | #endif |
36 | switch (mm->context.asce_limit) { | 36 | switch (mm->context.asce_limit) { |
37 | case _REGION2_SIZE: | 37 | case _REGION2_SIZE: |