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: Wed, 4 Nov 2015 16:59:02 +0000 Message-ID: <563A3956.8030308@citrix.com> References: <1446228813-2593-1-git-send-email-julien.grall@citrix.com> <1446228813-2593-5-git-send-email-julien.grall@citrix.com> <5638D1E4.4010208@citrix.com> <22074.12469.923941.837807@mariner.uk.xensource.com> <563A42E202000078000B1DC3@prv-mh.provo.novell.com> <22074.14145.634793.537784@mariner.uk.xensource.com> 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 1Zu1Qr-0001Ux-A5 for xen-devel@lists.xenproject.org; Wed, 04 Nov 2015 17:01:09 +0000 In-Reply-To: <22074.14145.634793.537784@mariner.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Jackson , Jan Beulich Cc: Tim Deegan , xen-devel@lists.xenproject.org, Keir Fraser , ian.campbell@citrix.com, Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On 04/11/15 16:50, Ian Jackson wrote: > Jan Beulich writes ("Re: [PATCH 4/4] xen/public: arm: rework the macro set_xen_guest_handle_raw"): >> All quite interesting, but pretty moot with there not being any >> get_xen_guest_handle() anymore. > > If we don't provide a get_xen_guest_handle, a kernel developer will be > sorely tempted to make one. > > If they do and they write it in the obvious way, then the compiler > could `deduce' that the top part of the uint64_t store was dead, and > eliminate it. The developers could also decide to rewrite the set_xen_raw_guest_handle/get_xen_guest_handle in an obvious way because they think ours it's too complicate... See the Linux version. TBH, we can't protect ourself for a developer writing it own macro and don't think about the big picture. The comment in the header pretty much explain the constraint. If it doesn't read, well it's not our business. Regards, -- Julien Grall