> spin_lock_init(&kvm->arch.start_stop_lock); > diff --git a/arch/s390/kvm/priv.c b/arch/s390/kvm/priv.c > index 76a2380..d9bd147 100644 > --- a/arch/s390/kvm/priv.c > +++ b/arch/s390/kvm/priv.c > @@ -208,19 +208,23 @@ int kvm_s390_skey_check_enable(struct kvm_vcpu *vcpu) > struct kvm_s390_sie_block *sie_block = vcpu->arch.sie_block; > > trace_kvm_s390_skey_related_inst(vcpu); > - if (!(sie_block->ictl & (ICTL_ISKE | ICTL_SSKE | ICTL_RRBE)) && > + /* Already enabled? */ > + if (vcpu->kvm->arch.use_skf && > + !(sie_block->ictl & (ICTL_ISKE | ICTL_SSKE | ICTL_RRBE)) && > !kvm_s390_test_cpuflags(vcpu, CPUSTAT_KSS)) > return rc; Wonder if it is nicer to simply remember for each CPU if this function has already been called. This way we can avoid calling s390_enable_skey() in all configurations. -- Thanks, David / dhildenb