Lines Matching refs:mop
2477 struct kvm_s390_mem_op *mop) in kvm_s390_guest_mem_op() argument
2479 void __user *uaddr = (void __user *)mop->buf; in kvm_s390_guest_mem_op()
2485 if (mop->flags & ~supported_flags || mop->ar >= NUM_ACRS || !mop->size) in kvm_s390_guest_mem_op()
2488 if (mop->size > MEM_OP_MAX_SIZE) in kvm_s390_guest_mem_op()
2491 if (!(mop->flags & KVM_S390_MEMOP_F_CHECK_ONLY)) { in kvm_s390_guest_mem_op()
2492 tmpbuf = vmalloc(mop->size); in kvm_s390_guest_mem_op()
2499 switch (mop->op) { in kvm_s390_guest_mem_op()
2501 if (mop->flags & KVM_S390_MEMOP_F_CHECK_ONLY) { in kvm_s390_guest_mem_op()
2502 r = check_gva_range(vcpu, mop->gaddr, mop->ar, mop->size, false); in kvm_s390_guest_mem_op()
2505 r = read_guest(vcpu, mop->gaddr, mop->ar, tmpbuf, mop->size); in kvm_s390_guest_mem_op()
2507 if (copy_to_user(uaddr, tmpbuf, mop->size)) in kvm_s390_guest_mem_op()
2512 if (mop->flags & KVM_S390_MEMOP_F_CHECK_ONLY) { in kvm_s390_guest_mem_op()
2513 r = check_gva_range(vcpu, mop->gaddr, mop->ar, mop->size, true); in kvm_s390_guest_mem_op()
2516 if (copy_from_user(tmpbuf, uaddr, mop->size)) { in kvm_s390_guest_mem_op()
2520 r = write_guest(vcpu, mop->gaddr, mop->ar, tmpbuf, mop->size); in kvm_s390_guest_mem_op()
2528 if (r > 0 && (mop->flags & KVM_S390_MEMOP_F_INJECT_EXCEPTION) != 0) in kvm_s390_guest_mem_op()