From: "Jan Beulich" Subject: Re: [PATCH v2 13/21] xen/dts: Add hypercalls to retrieve device node information Date: Wed, 06 Aug 2014 16:47:04 +0100 Message-ID: <53E26A180200007800029D5D@mail.emea.novell.com> References: <1406818852-31856-1-git-send-email-julien.grall@linaro.org> <1406818852-31856-14-git-send-email-julien.grall@linaro.org> <53DB70FD020000780002850B@mail.emea.novell.com> <53E2471C.6020109@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XF3Qh-0007P8-Ac for xen-devel@lists.xenproject.org; Wed, 06 Aug 2014 15:47:07 +0000 In-Reply-To: <53E2471C.6020109@linaro.org> 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: Julien Grall Cc: Ian Jackson , tim@xen.org, stefano.stabellini@citrix.com, ian.campbell@citrix.com, xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org >>> On 06.08.14 at 17:17, wrote: > On 08/01/2014 09:50 AM, Jan Beulich wrote: >>>>> On 31.07.14 at 17:00, wrote: >>> --- a/xen/include/public/domctl.h >>> +++ b/xen/include/public/domctl.h >>> @@ -946,6 +946,44 @@ typedef struct xen_domctl_vcpu_msrs xen_domctl_vcpu_msrs_t; >>> DEFINE_XEN_GUEST_HANDLE(xen_domctl_vcpu_msrs_t); >>> #endif >>> >>> +/* Device Tree: Retrieve informations about a device node */ >>> +struct xen_domctl_dtdev_op { >>> + /* IN */ >>> + uint32_t plen; /* Length of the path */ >>> + XEN_GUEST_HANDLE(char) path; /* Path to the device tree node */ >> >> XEN_GUEST_HANDLE_64? > > Right. I never know when I should use XEN_GUEST_HANDLE_64 or > XEN_GUEST_HANDLE. The former is for interfaces without compat mode translation, i.e. mainly domctl and sysctl (other toolstack only ones may use them too). > FYI, it's exactly the same on ARM. > >> And padding between the two above >> members, or fields re-ordered? > > I can reorder the field. > [...] >>> + } irq; >>> + struct { >>> + xen_pfn_t mfn; >>> + xen_pfn_t nr_mfn; >>> + } mmio; >>> + struct { >>> + uint32_t len; /* IN: Size of buffer. OUT: Size copied > */ >>> + XEN_GUEST_HANDLE_64(char) compat; >> >> Padding again? > > I will invert the 2 fields. The re-ordering won't help unless there's another field following which fills the then trailing padding space. Jan