x86/mem_access: Deprecate the HVM mem_access ops
PATCH v4 1/1 x86/mem_access: Deprecate the HVM mem_access ops
This patch does the following:
1. Deprecate the HVMOP_[sg]et_mem_access HVM ops.
2. Remove the enums and structs associated with the HVM ops.
Signed-off-by Aravindh Puthiyaparambil <[email protected]>
Cc Keir Fraser <[email protected]>
Cc Jan Beulich <[email protected]>
Cc Tim Deegan <[email protected]>
---
All other patches in the "Make mem_access APIs and hypercalls generic" series have been acked, so this is now being submitted separately. This needs to go in after other patches in the series have been applied.
Changes from version v3:
Remove the HVM ops completely from do_hvm_op() so that they are handled by the default case.
Changes from version v2:
This was part of "x86/mem_access: Make the mem_access ops generic" in the earlier versions of the series and is now a seperate patch.
xen/arch/x86/hvm/hvm.c +0 -77
@@ -4580,83 +4580,6 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)break ; } -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); -break ; - } -case HVMOP_pagetable_dying: {struct xen_hvm_pagetable_dying a;
xen/include/public/hvm/hvm_op.h +2 -40
51 lines not on this page · raw message
Signature · 1 line
1.8.3.2