Skip to content

Commit e392ea4

Browse files
committed
Merge tag 's390-6.7-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
Pull s390 updates from Vasily Gorbik: - Get rid of private VM_FAULT flags - Add word-at-a-time implementation - Add DCACHE_WORD_ACCESS support - Cleanup control register handling - Disallow CPU hotplug of CPU 0 to simplify its handling complexity, following a similar restriction in x86 - Optimize pai crypto map allocation - Update the list of crypto express EP11 coprocessor operation modes - Fixes and improvements for secure guests AP pass-through - Several fixes to address incorrect page marking for address translation with the "cmma no-dat" feature, preventing potential incorrect guest TLB flushes - Fix early IPI handling - Several virtual vs physical address confusion fixes - Various small fixes and improvements all over the code * tag 's390-6.7-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (74 commits) s390/cio: replace deprecated strncpy with strscpy s390/sclp: replace deprecated strncpy with strtomem s390/cio: fix virtual vs physical address confusion s390/cio: export CMG value as decimal s390: delete the unused store_prefix() function s390/cmma: fix handling of swapper_pg_dir and invalid_pg_dir s390/cmma: fix detection of DAT pages s390/sclp: handle default case in sclp memory notifier s390/pai_crypto: remove per-cpu variable assignement in event initialization s390/pai: initialize event count once at initialization s390/pai_crypto: use PERF_ATTACH_TASK define for per task detection s390/mm: add missing arch_set_page_dat() call to gmap allocations s390/mm: add missing arch_set_page_dat() call to vmem_crst_alloc() s390/cmma: fix initial kernel address space page table walk s390/diag: add missing virt_to_phys() translation to diag224() s390/mm,fault: move VM_FAULT_ERROR handling to do_exception() s390/mm,fault: remove VM_FAULT_BADMAP and VM_FAULT_BADACCESS s390/mm,fault: remove VM_FAULT_SIGNAL s390/mm,fault: remove VM_FAULT_BADCONTEXT s390/mm,fault: simplify kfence fault handling ...
2 parents 707df29 + 991a211 commit e392ea4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+1111
-847
lines changed

arch/s390/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ config S390
131131
select ARCH_WANT_OPTIMIZE_HUGETLB_VMEMMAP
132132
select BUILDTIME_TABLE_SORT
133133
select CLONE_BACKWARDS2
134+
select DCACHE_WORD_ACCESS if !KMSAN
134135
select DMA_OPS if PCI
135136
select DYNAMIC_FTRACE if FUNCTION_TRACER
136137
select FUNCTION_ALIGNMENT_8B if CC_IS_GCC

arch/s390/boot/startup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ static void detect_facilities(void)
4949
{
5050
if (test_facility(8)) {
5151
machine.has_edat1 = 1;
52-
__ctl_set_bit(0, 23);
52+
local_ctl_set_bit(0, CR0_EDAT_BIT);
5353
}
5454
if (test_facility(78))
5555
machine.has_edat2 = 1;

arch/s390/boot/vmem.c

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@
55
#include <asm/pgalloc.h>
66
#include <asm/facility.h>
77
#include <asm/sections.h>
8+
#include <asm/ctlreg.h>
89
#include <asm/physmem_info.h>
910
#include <asm/maccess.h>
1011
#include <asm/abs_lowcore.h>
1112
#include "decompressor.h"
1213
#include "boot.h"
1314

14-
unsigned long __bootdata_preserved(s390_invalid_asce);
15+
struct ctlreg __bootdata_preserved(s390_invalid_asce);
1516

1617
#ifdef CONFIG_PROC_FS
1718
atomic_long_t __bootdata_preserved(direct_pages_count[PG_DIRECT_MAP_MAX]);
@@ -166,8 +167,6 @@ static bool kasan_pmd_populate_zero_shadow(pmd_t *pmd, unsigned long addr,
166167

167168
static bool kasan_pte_populate_zero_shadow(pte_t *pte, enum populate_mode mode)
168169
{
169-
pte_t entry;
170-
171170
if (mode == POPULATE_KASAN_ZERO_SHADOW) {
172171
set_pte(pte, pte_z);
173172
return true;
@@ -426,7 +425,7 @@ void setup_vmem(unsigned long asce_limit)
426425
asce_type = _REGION3_ENTRY_EMPTY;
427426
asce_bits = _ASCE_TYPE_REGION3 | _ASCE_TABLE_LENGTH;
428427
}
429-
s390_invalid_asce = invalid_pg_dir | _ASCE_TYPE_REGION3 | _ASCE_TABLE_LENGTH;
428+
s390_invalid_asce.val = invalid_pg_dir | _ASCE_TYPE_REGION3 | _ASCE_TABLE_LENGTH;
430429

431430
crst_table_init((unsigned long *)swapper_pg_dir, asce_type);
432431
crst_table_init((unsigned long *)invalid_pg_dir, _REGION3_ENTRY_EMPTY);
@@ -447,12 +446,12 @@ void setup_vmem(unsigned long asce_limit)
447446

448447
kasan_populate_shadow();
449448

450-
S390_lowcore.kernel_asce = swapper_pg_dir | asce_bits;
449+
S390_lowcore.kernel_asce.val = swapper_pg_dir | asce_bits;
451450
S390_lowcore.user_asce = s390_invalid_asce;
452451

453-
__ctl_load(S390_lowcore.kernel_asce, 1, 1);
454-
__ctl_load(S390_lowcore.user_asce, 7, 7);
455-
__ctl_load(S390_lowcore.kernel_asce, 13, 13);
452+
local_ctl_load(1, &S390_lowcore.kernel_asce);
453+
local_ctl_load(7, &S390_lowcore.user_asce);
454+
local_ctl_load(13, &S390_lowcore.kernel_asce);
456455

457-
init_mm.context.asce = S390_lowcore.kernel_asce;
456+
init_mm.context.asce = S390_lowcore.kernel_asce.val;
458457
}

arch/s390/include/asm/asm-extable.h

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#define EX_TYPE_UA_LOAD_MEM 4
1414
#define EX_TYPE_UA_LOAD_REG 5
1515
#define EX_TYPE_UA_LOAD_REGPAIR 6
16+
#define EX_TYPE_ZEROPAD 7
1617

1718
#define EX_DATA_REG_ERR_SHIFT 0
1819
#define EX_DATA_REG_ERR GENMASK(3, 0)
@@ -23,16 +24,7 @@
2324
#define EX_DATA_LEN_SHIFT 8
2425
#define EX_DATA_LEN GENMASK(11, 8)
2526

26-
#define __EX_TABLE(_section, _fault, _target, _type) \
27-
stringify_in_c(.section _section,"a";) \
28-
stringify_in_c(.balign 4;) \
29-
stringify_in_c(.long (_fault) - .;) \
30-
stringify_in_c(.long (_target) - .;) \
31-
stringify_in_c(.short (_type);) \
32-
stringify_in_c(.short 0;) \
33-
stringify_in_c(.previous)
34-
35-
#define __EX_TABLE_UA(_section, _fault, _target, _type, _regerr, _regaddr, _len)\
27+
#define __EX_TABLE(_section, _fault, _target, _type, _regerr, _regaddr, _len) \
3628
stringify_in_c(.section _section,"a";) \
3729
stringify_in_c(.balign 4;) \
3830
stringify_in_c(.long (_fault) - .;) \
@@ -72,21 +64,24 @@
7264
stringify_in_c(.previous)
7365

7466
#define EX_TABLE(_fault, _target) \
75-
__EX_TABLE(__ex_table, _fault, _target, EX_TYPE_FIXUP)
67+
__EX_TABLE(__ex_table, _fault, _target, EX_TYPE_FIXUP, __stringify(%%r0), __stringify(%%r0), 0)
7668

7769
#define EX_TABLE_AMODE31(_fault, _target) \
78-
__EX_TABLE(.amode31.ex_table, _fault, _target, EX_TYPE_FIXUP)
70+
__EX_TABLE(.amode31.ex_table, _fault, _target, EX_TYPE_FIXUP, __stringify(%%r0), __stringify(%%r0), 0)
7971

8072
#define EX_TABLE_UA_STORE(_fault, _target, _regerr) \
81-
__EX_TABLE_UA(__ex_table, _fault, _target, EX_TYPE_UA_STORE, _regerr, _regerr, 0)
73+
__EX_TABLE(__ex_table, _fault, _target, EX_TYPE_UA_STORE, _regerr, _regerr, 0)
8274

8375
#define EX_TABLE_UA_LOAD_MEM(_fault, _target, _regerr, _regmem, _len) \
84-
__EX_TABLE_UA(__ex_table, _fault, _target, EX_TYPE_UA_LOAD_MEM, _regerr, _regmem, _len)
76+
__EX_TABLE(__ex_table, _fault, _target, EX_TYPE_UA_LOAD_MEM, _regerr, _regmem, _len)
8577

8678
#define EX_TABLE_UA_LOAD_REG(_fault, _target, _regerr, _regzero) \
87-
__EX_TABLE_UA(__ex_table, _fault, _target, EX_TYPE_UA_LOAD_REG, _regerr, _regzero, 0)
79+
__EX_TABLE(__ex_table, _fault, _target, EX_TYPE_UA_LOAD_REG, _regerr, _regzero, 0)
8880

8981
#define EX_TABLE_UA_LOAD_REGPAIR(_fault, _target, _regerr, _regzero) \
90-
__EX_TABLE_UA(__ex_table, _fault, _target, EX_TYPE_UA_LOAD_REGPAIR, _regerr, _regzero, 0)
82+
__EX_TABLE(__ex_table, _fault, _target, EX_TYPE_UA_LOAD_REGPAIR, _regerr, _regzero, 0)
83+
84+
#define EX_TABLE_ZEROPAD(_fault, _target, _regdata, _regaddr) \
85+
__EX_TABLE(__ex_table, _fault, _target, EX_TYPE_ZEROPAD, _regdata, _regaddr, 0)
9186

9287
#endif /* __ASM_EXTABLE_H */

arch/s390/include/asm/ctl_reg.h

Lines changed: 0 additions & 146 deletions
This file was deleted.

0 commit comments

Comments
 (0)