diff options
Diffstat (limited to 'arch/s390/include')
-rw-r--r-- | arch/s390/include/asm/kvm_host.h | 3 | ||||
-rw-r--r-- | arch/s390/include/asm/pgtable.h | 12 | ||||
-rw-r--r-- | arch/s390/include/asm/setup.h | 3 | ||||
-rw-r--r-- | arch/s390/include/asm/timex.h | 2 | ||||
-rw-r--r-- | arch/s390/include/asm/unistd.h | 4 |
5 files changed, 18 insertions, 6 deletions
diff --git a/arch/s390/include/asm/kvm_host.h b/arch/s390/include/asm/kvm_host.h index 24e18473d92..b0c235cb6ad 100644 --- a/arch/s390/include/asm/kvm_host.h +++ b/arch/s390/include/asm/kvm_host.h | |||
@@ -47,7 +47,7 @@ struct sca_block { | |||
47 | #define KVM_HPAGE_MASK(x) (~(KVM_HPAGE_SIZE(x) - 1)) | 47 | #define KVM_HPAGE_MASK(x) (~(KVM_HPAGE_SIZE(x) - 1)) |
48 | #define KVM_PAGES_PER_HPAGE(x) (KVM_HPAGE_SIZE(x) / PAGE_SIZE) | 48 | #define KVM_PAGES_PER_HPAGE(x) (KVM_HPAGE_SIZE(x) / PAGE_SIZE) |
49 | 49 | ||
50 | #define CPUSTAT_HOST 0x80000000 | 50 | #define CPUSTAT_STOPPED 0x80000000 |
51 | #define CPUSTAT_WAIT 0x10000000 | 51 | #define CPUSTAT_WAIT 0x10000000 |
52 | #define CPUSTAT_ECALL_PEND 0x08000000 | 52 | #define CPUSTAT_ECALL_PEND 0x08000000 |
53 | #define CPUSTAT_STOP_INT 0x04000000 | 53 | #define CPUSTAT_STOP_INT 0x04000000 |
@@ -139,6 +139,7 @@ struct kvm_vcpu_stat { | |||
139 | u32 instruction_stfl; | 139 | u32 instruction_stfl; |
140 | u32 instruction_tprot; | 140 | u32 instruction_tprot; |
141 | u32 instruction_sigp_sense; | 141 | u32 instruction_sigp_sense; |
142 | u32 instruction_sigp_sense_running; | ||
142 | u32 instruction_sigp_external_call; | 143 | u32 instruction_sigp_external_call; |
143 | u32 instruction_sigp_emergency; | 144 | u32 instruction_sigp_emergency; |
144 | u32 instruction_sigp_stop; | 145 | u32 instruction_sigp_stop; |
diff --git a/arch/s390/include/asm/pgtable.h b/arch/s390/include/asm/pgtable.h index 34ede0ea85a..524d23b8610 100644 --- a/arch/s390/include/asm/pgtable.h +++ b/arch/s390/include/asm/pgtable.h | |||
@@ -593,6 +593,8 @@ static inline pgste_t pgste_update_all(pte_t *ptep, pgste_t pgste) | |||
593 | unsigned long address, bits; | 593 | unsigned long address, bits; |
594 | unsigned char skey; | 594 | unsigned char skey; |
595 | 595 | ||
596 | if (!pte_present(*ptep)) | ||
597 | return pgste; | ||
596 | address = pte_val(*ptep) & PAGE_MASK; | 598 | address = pte_val(*ptep) & PAGE_MASK; |
597 | skey = page_get_storage_key(address); | 599 | skey = page_get_storage_key(address); |
598 | bits = skey & (_PAGE_CHANGED | _PAGE_REFERENCED); | 600 | bits = skey & (_PAGE_CHANGED | _PAGE_REFERENCED); |
@@ -625,6 +627,8 @@ static inline pgste_t pgste_update_young(pte_t *ptep, pgste_t pgste) | |||
625 | #ifdef CONFIG_PGSTE | 627 | #ifdef CONFIG_PGSTE |
626 | int young; | 628 | int young; |
627 | 629 | ||
630 | if (!pte_present(*ptep)) | ||
631 | return pgste; | ||
628 | young = page_reset_referenced(pte_val(*ptep) & PAGE_MASK); | 632 | young = page_reset_referenced(pte_val(*ptep) & PAGE_MASK); |
629 | /* Transfer page referenced bit to pte software bit (host view) */ | 633 | /* Transfer page referenced bit to pte software bit (host view) */ |
630 | if (young || (pgste_val(pgste) & RCP_HR_BIT)) | 634 | if (young || (pgste_val(pgste) & RCP_HR_BIT)) |
@@ -638,13 +642,15 @@ static inline pgste_t pgste_update_young(pte_t *ptep, pgste_t pgste) | |||
638 | 642 | ||
639 | } | 643 | } |
640 | 644 | ||
641 | static inline void pgste_set_pte(pte_t *ptep, pgste_t pgste) | 645 | static inline void pgste_set_pte(pte_t *ptep, pgste_t pgste, pte_t entry) |
642 | { | 646 | { |
643 | #ifdef CONFIG_PGSTE | 647 | #ifdef CONFIG_PGSTE |
644 | unsigned long address; | 648 | unsigned long address; |
645 | unsigned long okey, nkey; | 649 | unsigned long okey, nkey; |
646 | 650 | ||
647 | address = pte_val(*ptep) & PAGE_MASK; | 651 | if (!pte_present(entry)) |
652 | return; | ||
653 | address = pte_val(entry) & PAGE_MASK; | ||
648 | okey = nkey = page_get_storage_key(address); | 654 | okey = nkey = page_get_storage_key(address); |
649 | nkey &= ~(_PAGE_ACC_BITS | _PAGE_FP_BIT); | 655 | nkey &= ~(_PAGE_ACC_BITS | _PAGE_FP_BIT); |
650 | /* Set page access key and fetch protection bit from pgste */ | 656 | /* Set page access key and fetch protection bit from pgste */ |
@@ -712,7 +718,7 @@ static inline void set_pte_at(struct mm_struct *mm, unsigned long addr, | |||
712 | 718 | ||
713 | if (mm_has_pgste(mm)) { | 719 | if (mm_has_pgste(mm)) { |
714 | pgste = pgste_get_lock(ptep); | 720 | pgste = pgste_get_lock(ptep); |
715 | pgste_set_pte(ptep, pgste); | 721 | pgste_set_pte(ptep, pgste, entry); |
716 | *ptep = entry; | 722 | *ptep = entry; |
717 | pgste_set_unlock(ptep, pgste); | 723 | pgste_set_unlock(ptep, pgste); |
718 | } else | 724 | } else |
diff --git a/arch/s390/include/asm/setup.h b/arch/s390/include/asm/setup.h index 5a099714df0..097183c7040 100644 --- a/arch/s390/include/asm/setup.h +++ b/arch/s390/include/asm/setup.h | |||
@@ -82,6 +82,7 @@ extern unsigned int user_mode; | |||
82 | #define MACHINE_FLAG_LPAR (1UL << 12) | 82 | #define MACHINE_FLAG_LPAR (1UL << 12) |
83 | #define MACHINE_FLAG_SPP (1UL << 13) | 83 | #define MACHINE_FLAG_SPP (1UL << 13) |
84 | #define MACHINE_FLAG_TOPOLOGY (1UL << 14) | 84 | #define MACHINE_FLAG_TOPOLOGY (1UL << 14) |
85 | #define MACHINE_FLAG_STCKF (1UL << 15) | ||
85 | 86 | ||
86 | #define MACHINE_IS_VM (S390_lowcore.machine_flags & MACHINE_FLAG_VM) | 87 | #define MACHINE_IS_VM (S390_lowcore.machine_flags & MACHINE_FLAG_VM) |
87 | #define MACHINE_IS_KVM (S390_lowcore.machine_flags & MACHINE_FLAG_KVM) | 88 | #define MACHINE_IS_KVM (S390_lowcore.machine_flags & MACHINE_FLAG_KVM) |
@@ -100,6 +101,7 @@ extern unsigned int user_mode; | |||
100 | #define MACHINE_HAS_PFMF (0) | 101 | #define MACHINE_HAS_PFMF (0) |
101 | #define MACHINE_HAS_SPP (0) | 102 | #define MACHINE_HAS_SPP (0) |
102 | #define MACHINE_HAS_TOPOLOGY (0) | 103 | #define MACHINE_HAS_TOPOLOGY (0) |
104 | #define MACHINE_HAS_STCKF (0) | ||
103 | #else /* __s390x__ */ | 105 | #else /* __s390x__ */ |
104 | #define MACHINE_HAS_IEEE (1) | 106 | #define MACHINE_HAS_IEEE (1) |
105 | #define MACHINE_HAS_CSP (1) | 107 | #define MACHINE_HAS_CSP (1) |
@@ -111,6 +113,7 @@ extern unsigned int user_mode; | |||
111 | #define MACHINE_HAS_PFMF (S390_lowcore.machine_flags & MACHINE_FLAG_PFMF) | 113 | #define MACHINE_HAS_PFMF (S390_lowcore.machine_flags & MACHINE_FLAG_PFMF) |
112 | #define MACHINE_HAS_SPP (S390_lowcore.machine_flags & MACHINE_FLAG_SPP) | 114 | #define MACHINE_HAS_SPP (S390_lowcore.machine_flags & MACHINE_FLAG_SPP) |
113 | #define MACHINE_HAS_TOPOLOGY (S390_lowcore.machine_flags & MACHINE_FLAG_TOPOLOGY) | 115 | #define MACHINE_HAS_TOPOLOGY (S390_lowcore.machine_flags & MACHINE_FLAG_TOPOLOGY) |
116 | #define MACHINE_HAS_STCKF (S390_lowcore.machine_flags & MACHINE_FLAG_STCKF) | ||
114 | #endif /* __s390x__ */ | 117 | #endif /* __s390x__ */ |
115 | 118 | ||
116 | #define ZFCPDUMP_HSA_SIZE (32UL<<20) | 119 | #define ZFCPDUMP_HSA_SIZE (32UL<<20) |
diff --git a/arch/s390/include/asm/timex.h b/arch/s390/include/asm/timex.h index d610bef9c5e..c447a27a7fd 100644 --- a/arch/s390/include/asm/timex.h +++ b/arch/s390/include/asm/timex.h | |||
@@ -90,7 +90,7 @@ static inline unsigned long long get_clock_fast(void) | |||
90 | { | 90 | { |
91 | unsigned long long clk; | 91 | unsigned long long clk; |
92 | 92 | ||
93 | if (test_facility(25)) | 93 | if (MACHINE_HAS_STCKF) |
94 | asm volatile(".insn s,0xb27c0000,%0" : "=Q" (clk) : : "cc"); | 94 | asm volatile(".insn s,0xb27c0000,%0" : "=Q" (clk) : : "cc"); |
95 | else | 95 | else |
96 | clk = get_clock(); | 96 | clk = get_clock(); |
diff --git a/arch/s390/include/asm/unistd.h b/arch/s390/include/asm/unistd.h index 404bdb9671b..58de4c91c33 100644 --- a/arch/s390/include/asm/unistd.h +++ b/arch/s390/include/asm/unistd.h | |||
@@ -277,7 +277,9 @@ | |||
277 | #define __NR_clock_adjtime 337 | 277 | #define __NR_clock_adjtime 337 |
278 | #define __NR_syncfs 338 | 278 | #define __NR_syncfs 338 |
279 | #define __NR_setns 339 | 279 | #define __NR_setns 339 |
280 | #define NR_syscalls 340 | 280 | #define __NR_process_vm_readv 340 |
281 | #define __NR_process_vm_writev 341 | ||
282 | #define NR_syscalls 342 | ||
281 | 283 | ||
282 | /* | 284 | /* |
283 | * There are some system calls that are not present on 64 bit, some | 285 | * There are some system calls that are not present on 64 bit, some |