From: "Jan Beulich" Subject: Re: [PATCH 4/4] xen: Add V4V implementation Date: Fri, 05 Oct 2012 09:52:07 +0100 Message-ID: <506EBBD7020000780009FD84@nat28.tlf.novell.com> References: <1348141322-28657-1-git-send-email-jean.guyader@citrix.com> <1348141322-28657-5-git-send-email-jean.guyader@citrix.com> <505B2636020000780009CAA6@nat28.tlf.novell.com> <506D98FE020000780009FA23@nat28.tlf.novell.com> <20121004151214.GG38243@ocelot.phlegethon.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: 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: Jean Guyader Cc: Tim Deegan , Jean Guyader , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org >>> On 04.10.12 at 19:00, Jean Guyader wrote: > On 4 October 2012 16:12, Tim Deegan wrote: >> AIUI you need to use compat_handle_okay() instead of guest_handle_okay() >> to check the handles if is_pv_32on64_domain(current). >> > > How about something like that? Could be done, but not by modifying guest_handle_okay() (which penalizes all its users), nor by (incorrectly) open-coding compat_handle_okay(). And neither should any such implementation use is_pv_32on64_domain() twice - use the conditional operator instead (that way you also avoid evaluating arguments twice). So you could either introduce e.g. any_guest_handle_okay(), or switch all current users of guest_handle_okay() to, say, native_handle_okay() (perhaps with the exception of those where the compat mode wrapper source files #define guest_handle_okay() to compat_handle_okay(), which could then be dropped). Jan