From mboxrd@z Thu Jan 1 00:00:00 1970 From: Boris Ostrovsky Subject: Re: [PATCH 1/3] x86: drop is_pv_32on64_vcpu() Date: Wed, 24 Jun 2015 17:35:09 -0400 Message-ID: <558B228D.80404@oracle.com> References: <558993E902000078000886B3@mail.emea.novell.com> <558994ED02000078000886DB@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" 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 1Z7sKE-0002Kz-6A for xen-devel@lists.xenproject.org; Wed, 24 Jun 2015 21:35:18 +0000 In-Reply-To: <558994ED02000078000886DB@mail.emea.novell.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: Jan Beulich , xen-devel Cc: Andrew Cooper , Keir Fraser List-Id: xen-devel@lists.xenproject.org On 06/23/2015 11:18 AM, Jan Beulich wrote: > ... as being identical to is_pv_32bit_vcpu() after the x86-32 removal. > > In a few cases this includes an additional is_pv_32bit_vcpu() -> > is_pv_32bit_domain() conversion. > > Signed-off-by: Jan Beulich We have struct arch_domain { ... /* Is a 32-bit PV (non-HVM) guest? */ bool_t is_32bit_pv; /* Is shared-info page in 32-bit format? */ bool_t has_32bit_shinfo; ... } and currently both of these fields are set/unset together (except for one HVM case --- hvm_latch_shinfo_size()). Why not have a single 'bool is_32bit' and then replace macros at the top of include/asm-x86/domain.h with is_32bit_vcpu/domain()? I think in majority of places when we test for is_pv_32bit_vcpu/domain() we already know that we are PV so it shouldn't add any additional tests. -boris