Skip to content

Commit 696eb24

Browse files
committed
Merge tag 'kvm-s390-master-6.11-1' of https://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD
Fix invalid gisa designation value when gisa is not in use. Panic if (un)share fails to maintain security.
2 parents 747cfbf + cff59d8 commit 696eb24

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

arch/s390/include/asm/uv.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,10 @@ static inline int share(unsigned long addr, u16 cmd)
441441

442442
if (!uv_call(0, (u64)&uvcb))
443443
return 0;
444-
return -EINVAL;
444+
pr_err("%s UVC failed (rc: 0x%x, rrc: 0x%x), possible hypervisor bug.\n",
445+
uvcb.header.cmd == UVC_CMD_SET_SHARED_ACCESS ? "Share" : "Unshare",
446+
uvcb.header.rc, uvcb.header.rrc);
447+
panic("System security cannot be guaranteed unless the system panics now.\n");
445448
}
446449

447450
/*

arch/s390/kvm/kvm-s390.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,12 @@ static inline unsigned long kvm_s390_get_gfn_end(struct kvm_memslots *slots)
267267

268268
static inline u32 kvm_s390_get_gisa_desc(struct kvm *kvm)
269269
{
270-
u32 gd = virt_to_phys(kvm->arch.gisa_int.origin);
270+
u32 gd;
271+
272+
if (!kvm->arch.gisa_int.origin)
273+
return 0;
274+
275+
gd = virt_to_phys(kvm->arch.gisa_int.origin);
271276

272277
if (gd && sclp.has_gisaf)
273278
gd |= GISA_FORMAT1;

0 commit comments

Comments
 (0)