Skip to content

Commit 4d4cee9

Browse files
davidhildenbrandborntraeger
authored andcommitted
KVM: s390: vsie: Fix delivery of addressing exceptions
Whenever we get an -EFAULT, we failed to read in guest 2 physical address space. Such addressing exceptions are reported via a program intercept to the nested hypervisor. We faked the intercept, we have to return to guest 2. Instead, right now we would be returning -EFAULT from the intercept handler, eventually crashing the VM. the correct thing to do is to return 1 as rc == 1 is the internal representation of "we have to go back into g2". Addressing exceptions can only happen if the g2->g3 page tables reference invalid g2 addresses (say, either a table or the final page is not accessible - so something that basically never happens in sane environments. Identified by manual code inspection. Fixes: a3508fb ("KVM: s390: vsie: initial support for nested virtualization") Cc: <[email protected]> # v4.8+ Signed-off-by: David Hildenbrand <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Claudio Imbrenda <[email protected]> Reviewed-by: Christian Borntraeger <[email protected]> [[email protected]: fix patch description] Signed-off-by: Christian Borntraeger <[email protected]>
1 parent a1d032a commit 4d4cee9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

arch/s390/kvm/vsie.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1202,6 +1202,7 @@ static int vsie_run(struct kvm_vcpu *vcpu, struct vsie_page *vsie_page)
12021202
scb_s->iprcc = PGM_ADDRESSING;
12031203
scb_s->pgmilc = 4;
12041204
scb_s->gpsw.addr = __rewind_psw(scb_s->gpsw, 4);
1205+
rc = 1;
12051206
}
12061207
return rc;
12071208
}

0 commit comments

Comments
 (0)