From: "Jan Beulich" Subject: Re: [PATCH v2 11/19] xen: handle XENMEMF_get_vnumainfo in compat_memory_op Date: Tue, 09 Dec 2014 09:09:42 +0000 Message-ID: <5486CA66020000780004DFF4@mail.emea.novell.com> References: <1417448023-27311-1-git-send-email-wei.liu2@citrix.com> <1417448023-27311-12-git-send-email-wei.liu2@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1417448023-27311-12-git-send-email-wei.liu2@citrix.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Wei Liu Cc: ian.campbell@citrix.com, dario.faggioli@citrix.com, ian.jackson@eu.citrix.com, xen-devel@lists.xen.org, ufimtseva@gmail.com, boris.ostrovsky@oracle.com List-Id: xen-devel@lists.xenproject.org >>> On 01.12.14 at 16:33, wrote: > @@ -273,6 +276,33 @@ int compat_memory_op(unsigned int cmd, XEN_GUEST_HANDLE_PARAM(void) compat) > break; > } > > + case XENMEM_get_vnumainfo: > + { Hard tab. > + enum XLAT_vnuma_topology_info_vdistance vdistance = > + XLAT_vnuma_topology_info_vdistance_h; > + enum XLAT_vnuma_topology_info_vcpu_to_vnode vcpu_to_vnode = > + XLAT_vnuma_topology_info_vcpu_to_vnode_h; > + enum XLAT_vnuma_topology_info_vmemrange vmemrange = > + XLAT_vnuma_topology_info_vmemrange_h; > + > + if ( copy_from_guest(&cmp.vnuma, compat, 1) ) > + return -EFAULT; > + > +#define XLAT_vnuma_topology_info_HNDL_vdistance_h(_d_, _s_) \ > + guest_from_compat_handle((_d_)->vdistance.h, (_s_)->vdistance.h) > +#define XLAT_vnuma_topology_info_HNDL_vcpu_to_vnode_h(_d_, _s_) \ > + guest_from_compat_handle((_d_)->vcpu_to_vnode.h, (_s_)->vcpu_to_vnode.h) > +#define XLAT_vnuma_topology_info_HNDL_vmemrange_h(_d_, _s_) \ > + guest_from_compat_handle((_d_)->vmemrange.h, (_s_)->vmemrange.h) > + > + XLAT_vnuma_topology_info(nat.vnuma, &cmp.vnuma); > + > +#undef XLAT_vnuma_topology_info_HNDL_vdistance_h > +#undef XLAT_vnuma_topology_info_HNDL_vcpu_to_vnode_h > +#undef XLAT_vnuma_topology_info_HNDL_vmemrange_h > + break; > + } Again. With these two fixed and the subject adjusted to name the sub-op correctly, Reviewed-by: Jan Beulich Jan