From: "Jan Beulich" Subject: Re: [PATCH RFC v12 12/21] pvh: Support guest_kernel_mode for PVH Date: Wed, 18 Sep 2013 15:52:01 +0100 Message-ID: <5239DA3102000078000F4707@nat28.tlf.novell.com> References: <1379089521-25720-1-git-send-email-george.dunlap@eu.citrix.com> <1379089521-25720-13-git-send-email-george.dunlap@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1VMJ6s-0002su-Ek for xen-devel@lists.xenproject.org; Wed, 18 Sep 2013 14:52:06 +0000 In-Reply-To: <1379089521-25720-13-git-send-email-george.dunlap@eu.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: George Dunlap Cc: xen-devel , Keir Fraser , Tim Deegan List-Id: xen-devel@lists.xenproject.org >>> On 13.09.13 at 18:25, George Dunlap wrote: > This will be requred in order to do emulated_privops for PVH. > > Signed-off-by: George Dunlap > Signed-off-by: Mukesh Rathor Reviewed-by: Jan Beulich albeit for generality's sake ... > +#define guest_kernel_mode(v, r) \ > + (is_pvh_vcpu(v) ? hvm_kernel_mode(v) : \ ... this could probably become !is_pv_vcpu() (or has_hvm_container_vcpu(), if that doesn't go away). > + (!is_pv_32bit_vcpu(v) ? \ > + (ring_3(r) && ((v)->arch.flags & TF_kernel_mode)) : \ > + (ring_1(r)))) Jan