[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v3 5/5] x86/mem_access: Deprecate the HVM mem_access ops
>>> On 16.04.14 at 02:25, <aravindp@xxxxxxxxx> wrote: > --- a/xen/arch/x86/hvm/hvm.c > +++ b/xen/arch/x86/hvm/hvm.c > @@ -4589,81 +4589,9 @@ long do_hvm_op(unsigned long op, > XEN_GUEST_HANDLE_PARAM(void) arg) > } > > case HVMOP_set_mem_access: > - { > - struct xen_hvm_set_mem_access a; > - struct domain *d; > - > - if ( copy_from_guest(&a, arg, 1) ) > - return -EFAULT; > - > - rc = rcu_lock_remote_domain_by_id(a.domid, &d); > - if ( rc != 0 ) > - return rc; > - > - rc = -EINVAL; > - if ( !is_hvm_domain(d) ) > - goto param_fail5; > - > - rc = xsm_hvm_param(XSM_TARGET, d, op); > - if ( rc ) > - goto param_fail5; > - > - rc = -EINVAL; > - if ( (a.first_pfn != ~0ull) && > - (a.nr < start_iter || > - ((a.first_pfn + a.nr - 1) < a.first_pfn) || > - ((a.first_pfn + a.nr - 1) > domain_get_maximum_gpfn(d))) ) > - goto param_fail5; > - > - rc = p2m_set_mem_access(d, a.first_pfn, a.nr, start_iter, > - HVMOP_op_mask, a.hvmmem_access); > - if ( rc > 0 ) > - { > - start_iter = rc; > - rc = -EAGAIN; > - } > - > - param_fail5: > - rcu_unlock_domain(d); > - break; > - } > - > case HVMOP_get_mem_access: > - { > - struct xen_hvm_get_mem_access a; > - struct domain *d; > - xenmem_access_t access; > - > - if ( copy_from_guest(&a, arg, 1) ) > - return -EFAULT; > - > - rc = rcu_lock_remote_domain_by_id(a.domid, &d); > - if ( rc != 0 ) > - return rc; > - > - rc = -EINVAL; > - if ( !is_hvm_domain(d) ) > - goto param_fail6; > - > - rc = xsm_hvm_param(XSM_TARGET, d, op); > - if ( rc ) > - goto param_fail6; > - > - rc = -EINVAL; > - if ( (a.pfn > domain_get_maximum_gpfn(d)) && a.pfn != ~0ull ) > - goto param_fail6; > - > - rc = p2m_get_mem_access(d, a.pfn, &access); > - if ( rc != 0 ) > - goto param_fail6; > - > - a.hvmmem_access = access; > - rc = __copy_to_guest(arg, &a, 1) ? -EFAULT : 0; > - > - param_fail6: > - rcu_unlock_domain(d); > + rc = -ENOSYS; > break; > - } I can't see why these need to remain here - just have them be handled by the default case (which at once gives you back your log message). Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |