Lines Matching refs:ret

227     int ret = -ENOMEM;  in update_domain_cpu_policy()  local
235 if ( (ret = x86_cpuid_copy_from_buffer( in update_domain_cpu_policy()
238 (ret = x86_msr_copy_from_buffer( in update_domain_cpu_policy()
246 ret = x86_cpu_policies_are_compatible(sys, &new, &err); in update_domain_cpu_policy()
247 if ( ret ) in update_domain_cpu_policy()
268 if ( ret ) in update_domain_cpu_policy()
275 return ret; in update_domain_cpu_policy()
333 long ret = 0; in arch_do_domctl() local
341 ret = paging_domctl(d, &domctl->u.shadow_op, u_domctl, 0); in arch_do_domctl()
342 if ( ret == -ERESTART ) in arch_do_domctl()
355 ret = -EINVAL; in arch_do_domctl()
358 ret = -EPERM; in arch_do_domctl()
360 ret = ioports_permit_access(d, fp, fp + np - 1); in arch_do_domctl()
362 ret = ioports_deny_access(d, fp, fp + np - 1); in arch_do_domctl()
363 if ( !ret ) in arch_do_domctl()
379 ret = -E2BIG; in arch_do_domctl()
391 ret = -EFAULT; in arch_do_domctl()
435 ret = -EFAULT; in arch_do_domctl()
452 ret = -EFAULT; in arch_do_domctl()
475 ret = -EPERM; in arch_do_domctl()
479 ret = -EINVAL; in arch_do_domctl()
495 ret = -EINVAL; in arch_do_domctl()
500 ret = -ENOMEM; in arch_do_domctl()
504 ret = -EFAULT; in arch_do_domctl()
509 ret = hvm_load(d, &c); in arch_do_domctl()
521 ret = -EINVAL; in arch_do_domctl()
532 ret = 0; in arch_do_domctl()
537 ret = -ENOSPC; in arch_do_domctl()
542 ret = -ENOMEM; in arch_do_domctl()
547 ret = hvm_save(d, &c); in arch_do_domctl()
552 ret = -EFAULT; in arch_do_domctl()
561 ret = -EINVAL; in arch_do_domctl()
566 ret = hvm_save_one(d, domctl->u.hvmcontext_partial.type, in arch_do_domctl()
571 if ( !ret ) in arch_do_domctl()
577 ret = -EOPNOTSUPP; in arch_do_domctl()
582 ret = 0; in arch_do_domctl()
584 ret = switch_compat(d); in arch_do_domctl()
586 ret = -EINVAL; in arch_do_domctl()
594 ret = -EOPNOTSUPP; in arch_do_domctl()
609 ret = -ESRCH; in arch_do_domctl()
617 ret = 0; in arch_do_domctl()
623 ret = -EINVAL; in arch_do_domctl()
626 ret = 0; in arch_do_domctl()
632 ret = -EINVAL; in arch_do_domctl()
635 ret = 0; in arch_do_domctl()
641 ret = -ENOSYS; in arch_do_domctl()
651 ret = -EINVAL; in arch_do_domctl()
655 ret = xsm_bind_pt_irq(XSM_HOOK, d, bind); in arch_do_domctl()
656 if ( ret ) in arch_do_domctl()
660 ret = -EPERM; in arch_do_domctl()
664 ret = -ESRCH; in arch_do_domctl()
668 ret = pt_irq_create_bind(d, bind); in arch_do_domctl()
671 if ( ret < 0 ) in arch_do_domctl()
673 ret, d->domain_id); in arch_do_domctl()
682 ret = -EINVAL; in arch_do_domctl()
686 ret = -EPERM; in arch_do_domctl()
690 ret = xsm_unbind_pt_irq(XSM_HOOK, d, bind); in arch_do_domctl()
691 if ( ret ) in arch_do_domctl()
697 ret = pt_irq_destroy_bind(d, bind); in arch_do_domctl()
700 if ( ret < 0 ) in arch_do_domctl()
702 ret, d->domain_id); in arch_do_domctl()
716 ret = -EOPNOTSUPP; in arch_do_domctl()
723 ret = -EINVAL; in arch_do_domctl()
733 ret = -EPERM; in arch_do_domctl()
737 ret = xsm_ioport_mapping(XSM_HOOK, d, fmp, fmp + np - 1, add); in arch_do_domctl()
738 if ( ret ) in arch_do_domctl()
760 ret = -ENOMEM; in arch_do_domctl()
762 if ( !found && !ret ) in arch_do_domctl()
769 if ( !ret ) in arch_do_domctl()
770 ret = ioports_permit_access(d, fmp, fmp + np - 1); in arch_do_domctl()
771 if ( ret && !found && g2m_ioport ) in arch_do_domctl()
789 ret = ioports_deny_access(d, fmp, fmp + np - 1); in arch_do_domctl()
790 if ( ret && is_hardware_domain(currd) ) in arch_do_domctl()
793 ret, d->domain_id, fmp, fmp + np - 1); in arch_do_domctl()
795 if ( !ret ) in arch_do_domctl()
806 ret = -ESRCH; in arch_do_domctl()
849 ret = 0; in arch_do_domctl()
857 ret = -EINVAL; in arch_do_domctl()
889 ret = vcpu_set_vmce(v, evc); in arch_do_domctl()
898 ret = -EINVAL; in arch_do_domctl()
913 ret = -EINVAL; in arch_do_domctl()
917 ret = tsc_set_info(d, domctl->u.tsc_info.tsc_mode, in arch_do_domctl()
930 ret = -EINVAL; in arch_do_domctl()
935 ret = -EINVAL; in arch_do_domctl()
940 ret = hvm_debug_op(v, domctl->u.debug_op.op); in arch_do_domctl()
948 ret = gdbsx_guest_mem_io(domctl->domain, &domctl->u.gdbsx_guest_memio); in arch_do_domctl()
949 if ( !ret ) in arch_do_domctl()
957 ret = -EBUSY; in arch_do_domctl()
960 ret = -EINVAL; in arch_do_domctl()
964 ret = vcpu_pause_by_systemcontroller(v); in arch_do_domctl()
972 ret = -EBUSY; in arch_do_domctl()
975 ret = -EINVAL; in arch_do_domctl()
979 ret = vcpu_unpause_by_systemcontroller(v); in arch_do_domctl()
980 if ( ret == -EINVAL ) in arch_do_domctl()
1022 ret = -ESRCH; in arch_do_domctl()
1027 ret = -EINVAL; in arch_do_domctl()
1035 ret = 0; in arch_do_domctl()
1055 ret = -EINVAL; in arch_do_domctl()
1057 if ( !ret && copy_to_guest_offset(evc->buffer, offset, in arch_do_domctl()
1060 ret = -EFAULT; in arch_do_domctl()
1063 if ( !ret && copy_to_guest_offset(evc->buffer, offset, in arch_do_domctl()
1066 ret = -EFAULT; in arch_do_domctl()
1071 if ( !ret && size > PV_XSAVE_HDR_SIZE ) in arch_do_domctl()
1078 ret = -ENOMEM; in arch_do_domctl()
1087 ret = -EFAULT; in arch_do_domctl()
1094 if ( !ret ) in arch_do_domctl()
1103 ret = -EINVAL; in arch_do_domctl()
1111 ret = -ENOMEM; in arch_do_domctl()
1117 ret = -EFAULT; in arch_do_domctl()
1129 ret = validate_xstate(d, _xcr0, _xcr0_accum, in arch_do_domctl()
1133 ret = 0; in arch_do_domctl()
1134 if ( ret ) in arch_do_domctl()
1143 ret = -EINVAL; /* Can't be legitimate data. */ in arch_do_domctl()
1145 ret = -EOPNOTSUPP; /* Don't support compressed data. */ in arch_do_domctl()
1147 ret = -EINVAL; /* Not legitimate data. */ in arch_do_domctl()
1178 ret = mem_sharing_domctl(d, &domctl->u.mem_sharing_op); in arch_do_domctl()
1185 ret = -EPERM; in arch_do_domctl()
1204 ret = -EINVAL; in arch_do_domctl()
1206 ret = p2m_change_type_one(d, pfn, pt, p2m_ram_broken); in arch_do_domctl()
1229 ret = -ESRCH; in arch_do_domctl()
1234 ret = -EINVAL; in arch_do_domctl()
1245 ret = 0; copyback = true; in arch_do_domctl()
1275 ret = -ENXIO; in arch_do_domctl()
1282 if ( i < vmsrs->msr_count && !ret ) in arch_do_domctl()
1287 ret = -EFAULT; in arch_do_domctl()
1294 if ( i > vmsrs->msr_count && !ret ) in arch_do_domctl()
1295 ret = -ENOBUFS; in arch_do_domctl()
1301 ret = -EINVAL; in arch_do_domctl()
1309 ret = -EFAULT; in arch_do_domctl()
1313 ret = -EINVAL; in arch_do_domctl()
1334 ret = 0; in arch_do_domctl()
1347 ret = -ENODEV; in arch_do_domctl()
1354 ret = psr_alloc_rmid(d); in arch_do_domctl()
1361 ret = -ENOENT; in arch_do_domctl()
1370 ret = -ENOSYS; in arch_do_domctl()
1379 ret = psr_set_val(d, domctl->u.psr_alloc.target, in arch_do_domctl()
1385 ret = psr_set_val(d, domctl->u.psr_alloc.target, in arch_do_domctl()
1391 ret = psr_set_val(d, domctl->u.psr_alloc.target, in arch_do_domctl()
1397 ret = psr_set_val(d, domctl->u.psr_alloc.target, in arch_do_domctl()
1403 ret = psr_set_val(d, domctl->u.psr_alloc.target, in arch_do_domctl()
1419 ret = domctl_psr_get_val(d, domctl, PSR_TYPE_L3_CBM, copyback); in arch_do_domctl()
1423 ret = domctl_psr_get_val(d, domctl, PSR_TYPE_L3_CODE, copyback); in arch_do_domctl()
1427 ret = domctl_psr_get_val(d, domctl, PSR_TYPE_L3_DATA, copyback); in arch_do_domctl()
1431 ret = domctl_psr_get_val(d, domctl, PSR_TYPE_L2_CBM, copyback); in arch_do_domctl()
1435 ret = domctl_psr_get_val(d, domctl, PSR_TYPE_MBA_THRTL, copyback); in arch_do_domctl()
1441 ret = -EOPNOTSUPP; in arch_do_domctl()
1456 else if ( (ret = x86_cpuid_copy_to_buffer( in arch_do_domctl()
1465 else if ( (ret = x86_msr_copy_to_buffer( in arch_do_domctl()
1477 ret = -EINVAL; in arch_do_domctl()
1484 ret = -EEXIST; /* No changing once the domain is running. */ in arch_do_domctl()
1487 ret = update_domain_cpu_policy(d, &domctl->u.cpu_policy); in arch_do_domctl()
1488 if ( ret ) /* Copy domctl->u.cpu_policy.err_* to guest. */ in arch_do_domctl()
1496 ret = iommu_do_domctl(domctl, d, u_domctl); in arch_do_domctl()
1501 ret = -EFAULT; in arch_do_domctl()
1503 return ret; in arch_do_domctl()