Skip to content

Commit 0cc18dc

Browse files
author
CKI KWF Bot
committed
Merge: Refresh s390x KVM subsystem up to kernel 6.17-rc7 and fix postcopy migration problem
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-10/-/merge_requests/1477 JIRA: https://issues.redhat.com/browse/RHEL-113440 JIRA: https://issues.redhat.com/browse/RHEL-42486 Refresh the zKVM subsystem to the latest upstream kernel and fix one important bug with postcopy migration. Signed-off-by: Thomas Huth <thuth@redhat.com> Approved-by: Eder Zulian <ezulian@redhat.com> Approved-by: Rafael Aquini <raquini@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: CKI GitLab Kmaint Pipeline Bot <26919896-cki-kmaint-pipeline-bot@users.noreply.gitlab.com>
2 parents 7d4eed2 + e1ac4f8 commit 0cc18dc

Some content is hidden

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

45 files changed

+1336
-921
lines changed

MAINTAINERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12626,12 +12626,14 @@ S: Supported
1262612626
T: git git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux.git
1262712627
F: Documentation/virt/kvm/s390*
1262812628
F: arch/s390/include/asm/gmap.h
12629+
F: arch/s390/include/asm/gmap_helpers.h
1262912630
F: arch/s390/include/asm/kvm*
1263012631
F: arch/s390/include/uapi/asm/kvm*
1263112632
F: arch/s390/include/uapi/asm/uvdevice.h
1263212633
F: arch/s390/kernel/uv.c
1263312634
F: arch/s390/kvm/
1263412635
F: arch/s390/mm/gmap.c
12636+
F: arch/s390/mm/gmap_helpers.c
1263512637
F: drivers/s390/char/uvdevice.c
1263612638
F: tools/testing/selftests/drivers/s390x/uvdevice/
1263712639
F: tools/testing/selftests/kvm/*/s390/

arch/s390/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ config S390
6464
imply IMA_SECURE_AND_OR_TRUSTED_BOOT
6565
select ALTERNATE_USER_ADDRESS_SPACE
6666
select ARCH_32BIT_USTAT_F_TINODE
67-
select ARCH_BINFMT_ELF_STATE
6867
select ARCH_CORRECT_STACKTRACE_ON_KRETPROBE
6968
select ARCH_ENABLE_MEMORY_HOTPLUG if SPARSEMEM
7069
select ARCH_ENABLE_MEMORY_HOTREMOVE

arch/s390/include/asm/elf.h

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,6 @@ enum {
158158
#define ELF_DATA ELFDATA2MSB
159159
#define ELF_ARCH EM_S390
160160

161-
/* s390 specific phdr types */
162-
#define PT_S390_PGSTE 0x70000000
163-
164161
/*
165162
* ELF register definitions..
166163
*/
@@ -191,35 +188,6 @@ typedef s390_compat_regs compat_elf_gregset_t;
191188
&& (x)->e_ident[EI_CLASS] == ELF_CLASS)
192189
#define compat_start_thread start_thread31
193190

194-
struct arch_elf_state {
195-
int rc;
196-
};
197-
198-
#define INIT_ARCH_ELF_STATE { .rc = 0 }
199-
200-
#define arch_check_elf(ehdr, interp, interp_ehdr, state) (0)
201-
#ifdef CONFIG_PGSTE
202-
#define arch_elf_pt_proc(ehdr, phdr, elf, interp, state) \
203-
({ \
204-
struct arch_elf_state *_state = state; \
205-
if ((phdr)->p_type == PT_S390_PGSTE && \
206-
!page_table_allocate_pgste && \
207-
!test_thread_flag(TIF_PGSTE) && \
208-
!current->mm->context.alloc_pgste) { \
209-
set_thread_flag(TIF_PGSTE); \
210-
set_pt_regs_flag(task_pt_regs(current), \
211-
PIF_EXECVE_PGSTE_RESTART); \
212-
_state->rc = -EAGAIN; \
213-
} \
214-
_state->rc; \
215-
})
216-
#else
217-
#define arch_elf_pt_proc(ehdr, phdr, elf, interp, state) \
218-
({ \
219-
(state)->rc; \
220-
})
221-
#endif
222-
223191
/* For SVR4/S390 the function pointer to be registered with `atexit` is
224192
passed in R14. */
225193
#define ELF_PLAT_INIT(_r, load_addr) \

arch/s390/include/asm/entry-common.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,14 @@ static inline void arch_exit_to_user_mode_prepare(struct pt_regs *regs,
5959

6060
#define arch_exit_to_user_mode_prepare arch_exit_to_user_mode_prepare
6161

62+
static __always_inline bool arch_in_rcu_eqs(void)
63+
{
64+
if (IS_ENABLED(CONFIG_KVM))
65+
return current->flags & PF_VCPU;
66+
67+
return false;
68+
}
69+
70+
#define arch_in_rcu_eqs arch_in_rcu_eqs
71+
6272
#endif

arch/s390/include/asm/gmap.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ int gmap_map_segment(struct gmap *gmap, unsigned long from,
110110
int gmap_unmap_segment(struct gmap *gmap, unsigned long to, unsigned long len);
111111
unsigned long __gmap_translate(struct gmap *, unsigned long gaddr);
112112
int __gmap_link(struct gmap *gmap, unsigned long gaddr, unsigned long vmaddr);
113-
void gmap_discard(struct gmap *, unsigned long from, unsigned long to);
114113
void __gmap_zap(struct gmap *, unsigned long gaddr);
115114
void gmap_unlink(struct mm_struct *, unsigned long *table, unsigned long vmaddr);
116115

@@ -134,7 +133,6 @@ int gmap_protect_one(struct gmap *gmap, unsigned long gaddr, int prot, unsigned
134133

135134
void gmap_sync_dirty_log_pmd(struct gmap *gmap, unsigned long dirty_bitmap[4],
136135
unsigned long gaddr, unsigned long vmaddr);
137-
int s390_disable_cow_sharing(void);
138136
int s390_replace_asce(struct gmap *gmap);
139137
void s390_uv_destroy_pfns(unsigned long count, unsigned long *pfns);
140138
int __s390_uv_destroy_range(struct mm_struct *mm, unsigned long start,
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/* SPDX-License-Identifier: GPL-2.0 */
2+
/*
3+
* Helper functions for KVM guest address space mapping code
4+
*
5+
* Copyright IBM Corp. 2025
6+
*/
7+
8+
#ifndef _ASM_S390_GMAP_HELPERS_H
9+
#define _ASM_S390_GMAP_HELPERS_H
10+
11+
void gmap_helper_zap_one_page(struct mm_struct *mm, unsigned long vmaddr);
12+
void gmap_helper_discard(struct mm_struct *mm, unsigned long vmaddr, unsigned long end);
13+
int gmap_helper_disable_cow_sharing(void);
14+
15+
#endif /* _ASM_S390_GMAP_HELPERS_H */

0 commit comments

Comments
 (0)