On 17.04.19 20:29, Christian Borntraeger wrote: > Instead of adding a new machine option to disable/enable the keywrapping > options of pckmo (like for AES and DEA) we can now use the CPU model to > decide. > > Signed-off-by: Christian Borntraeger <borntraeger@xxxxxxxxxx> > Reviewed-by: Collin Walling <walling@xxxxxxxxxxxxx> > --- > v1->v2: - enable vsie > - also check if the host has the pckmo functions > arch/s390/include/asm/kvm_host.h | 1 + > arch/s390/kvm/kvm-s390.c | 7 +++++++ > arch/s390/kvm/vsie.c | 5 ++++- > 3 files changed, 12 insertions(+), 1 deletion(-) FWIW, I tested this variant successfully with some printk debugging to check if the settings are good. The only question is: does anybody cares about if ((vcpu->kvm->arch.model.subfuncs.pckmo[4] & kvm_s390_available_subfunc.pckmo[4] & 0xe0) || (vcpu->kvm->arch.model.subfuncs.pckmo[5] & kvm_s390_available_subfunc.pckmo[5] & 0xc0)) being too long? I find this more readable than if ((vcpu->kvm->arch.model.subfuncs.pckmo[4] & kvm_s390_available_subfunc.pckmo[4] & 0xe0) || (vcpu->kvm->arch.model.subfuncs.pckmo[5] & kvm_s390_available_subfunc.pckmo[5] & 0xc0)) Christian