Skip to content

Commit 3f5198c

Browse files
committed
Merge tag 'kvm-s390-master-6.8-1' of https://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD
pqap instruction missing cc fix vsie shadow creation race fix
2 parents 6613476 + 83303a4 commit 3f5198c

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

arch/s390/kvm/priv.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -676,8 +676,12 @@ static int handle_pqap(struct kvm_vcpu *vcpu)
676676
if (vcpu->kvm->arch.crypto.pqap_hook) {
677677
pqap_hook = *vcpu->kvm->arch.crypto.pqap_hook;
678678
ret = pqap_hook(vcpu);
679-
if (!ret && vcpu->run->s.regs.gprs[1] & 0x00ff0000)
680-
kvm_s390_set_psw_cc(vcpu, 3);
679+
if (!ret) {
680+
if (vcpu->run->s.regs.gprs[1] & 0x00ff0000)
681+
kvm_s390_set_psw_cc(vcpu, 3);
682+
else
683+
kvm_s390_set_psw_cc(vcpu, 0);
684+
}
681685
up_read(&vcpu->kvm->arch.crypto.pqap_hook_rwsem);
682686
return ret;
683687
}

arch/s390/kvm/vsie.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1235,7 +1235,6 @@ static int acquire_gmap_shadow(struct kvm_vcpu *vcpu,
12351235
gmap = gmap_shadow(vcpu->arch.gmap, asce, edat);
12361236
if (IS_ERR(gmap))
12371237
return PTR_ERR(gmap);
1238-
gmap->private = vcpu->kvm;
12391238
vcpu->kvm->stat.gmap_shadow_create++;
12401239
WRITE_ONCE(vsie_page->gmap, gmap);
12411240
return 0;

arch/s390/mm/gmap.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1691,6 +1691,7 @@ struct gmap *gmap_shadow(struct gmap *parent, unsigned long asce,
16911691
return ERR_PTR(-ENOMEM);
16921692
new->mm = parent->mm;
16931693
new->parent = gmap_get(parent);
1694+
new->private = parent->private;
16941695
new->orig_asce = asce;
16951696
new->edat_level = edat_level;
16961697
new->initialized = false;

0 commit comments

Comments
 (0)