From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH 4/4] xen/public: arm: rework the macro set_xen_guest_handle_raw Date: Tue, 3 Nov 2015 15:25:24 +0000 Message-ID: <5638D1E4.4010208@citrix.com> References: <1446228813-2593-1-git-send-email-julien.grall@citrix.com> <1446228813-2593-5-git-send-email-julien.grall@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZtdU7-0003Ri-Du for xen-devel@lists.xenproject.org; Tue, 03 Nov 2015 15:26:55 +0000 In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Stefano Stabellini Cc: Keir Fraser , ian.campbell@citrix.com, Tim Deegan , Ian Jackson , Jan Beulich , xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org On 03/11/15 14:18, Stefano Stabellini wrote: >> +#define set_xen_guest_handle_raw(hnd, val) \ >> + do { \ >> + /* Check if the handle is 64-bit (i.e 8-byte) */ \ >> + (void) sizeof(struct { int : -!!(sizeof (hnd) != 8); }); \ >> + /* Check if the type of val is compatible with the handle */ \ >> + (void) sizeof((val) != (hnd).p); \ >> + (hnd).q = (uint64_t)(uintptr_t)(val); \ >> } while ( 0 ) >> #define set_xen_guest_handle(hnd, val) set_xen_guest_handle_raw(hnd, val) > > will get_xen_guest_handle, which access (hnd).p, have undefined behaviour? get_xen_guest_handle has been removed in staging. Regards, -- Julien Grall