Lines Matching refs:ksmo
61 struct kvm_s390_mem_op ksmo = { in ksmo_from_desc() local
71 ksmo.op = KVM_S390_MEMOP_LOGICAL_READ; in ksmo_from_desc()
73 ksmo.op = KVM_S390_MEMOP_LOGICAL_WRITE; in ksmo_from_desc()
77 ksmo.op = KVM_S390_MEMOP_SIDA_READ; in ksmo_from_desc()
79 ksmo.op = KVM_S390_MEMOP_SIDA_WRITE; in ksmo_from_desc()
83 ksmo.op = KVM_S390_MEMOP_ABSOLUTE_READ; in ksmo_from_desc()
85 ksmo.op = KVM_S390_MEMOP_ABSOLUTE_WRITE; in ksmo_from_desc()
87 ksmo.op = KVM_S390_MEMOP_ABSOLUTE_CMPXCHG; in ksmo_from_desc()
88 ksmo.old_addr = (uint64_t)desc->old; in ksmo_from_desc()
93 ksmo.op = -1; in ksmo_from_desc()
96 ksmo.flags |= KVM_S390_MEMOP_F_CHECK_ONLY; in ksmo_from_desc()
98 ksmo.flags |= KVM_S390_MEMOP_F_INJECT_EXCEPTION; in ksmo_from_desc()
100 ksmo.flags = desc->set_flags; in ksmo_from_desc()
102 ksmo.flags |= KVM_S390_MEMOP_F_SKEY_PROTECTION; in ksmo_from_desc()
103 ksmo.key = desc->key; in ksmo_from_desc()
106 ksmo.ar = desc->ar; in ksmo_from_desc()
108 ksmo.ar = 0; in ksmo_from_desc()
110 ksmo.sida_offset = desc->sida_offset; in ksmo_from_desc()
112 return ksmo; in ksmo_from_desc()
121 static void print_memop(struct kvm_vcpu *vcpu, const struct kvm_s390_mem_op *ksmo) in print_memop() argument
130 switch (ksmo->op) { in print_memop()
154 ksmo->gaddr, ksmo->size, ksmo->buf, ksmo->ar, ksmo->key, in print_memop()
155 ksmo->old_addr); in print_memop()
156 if (ksmo->flags & KVM_S390_MEMOP_F_CHECK_ONLY) in print_memop()
158 if (ksmo->flags & KVM_S390_MEMOP_F_INJECT_EXCEPTION) in print_memop()
160 if (ksmo->flags & KVM_S390_MEMOP_F_SKEY_PROTECTION) in print_memop()
165 static int err_memop_ioctl(struct test_info info, struct kvm_s390_mem_op *ksmo, in err_memop_ioctl() argument
171 return __vm_ioctl(info.vm, KVM_S390_MEM_OP, ksmo); in err_memop_ioctl()
173 return __vcpu_ioctl(vcpu, KVM_S390_MEM_OP, ksmo); in err_memop_ioctl()
176 static void memop_ioctl(struct test_info info, struct kvm_s390_mem_op *ksmo, in memop_ioctl() argument
181 r = err_memop_ioctl(info, ksmo, desc); in memop_ioctl()
182 if (ksmo->op == KVM_S390_MEMOP_ABSOLUTE_CMPXCHG) { in memop_ioctl()