@@ -2117,7 +2117,8 @@ Errors:
====== ============================================================
ENOENT no such register
- EINVAL invalid register ID, or no such register
+ EINVAL invalid register ID, or no such register or used with VMs in
+ protected virtualization mode on s390
EPERM (arm64) register access not allowed before vcpu finalization
====== ============================================================
@@ -2552,7 +2553,8 @@ Errors include:
======== ============================================================
ENOENT no such register
- EINVAL invalid register ID, or no such register
+ EINVAL invalid register ID, or no such register or used with VMs in
+ protected virtualization mode on s390
EPERM (arm64) register access not allowed before vcpu finalization
======== ============================================================
@@ -4674,6 +4674,9 @@ long kvm_arch_vcpu_ioctl(struct file *filp,
case KVM_SET_ONE_REG:
case KVM_GET_ONE_REG: {
struct kvm_one_reg reg;
+ r = -EINVAL;
+ if (kvm_s390_pv_cpu_is_protected(vcpu))
+ break;
r = -EFAULT;
if (copy_from_user(®, argp, sizeof(reg)))
break;