From mboxrd@z Thu Jan 1 00:00:00 1970 From: George Dunlap Subject: Re: [PATCH 3/3] x86/mm: use is_..._vcpu() instead of open coding it Date: Tue, 23 Jun 2015 17:13:33 +0100 Message-ID: <558985AD.3060602@eu.citrix.com> References: <558993E902000078000886B3@mail.emea.novell.com> <5589955E02000078000886E3@mail.emea.novell.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 1Z7Qpz-00012b-MY for xen-devel@lists.xenproject.org; Tue, 23 Jun 2015 16:14:15 +0000 In-Reply-To: <5589955E02000078000886E3@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 , Tim Deegan List-Id: xen-devel@lists.xenproject.org On 06/23/2015 04:20 PM, Jan Beulich wrote: > Signed-off-by: Jan Beulich Reviewed-by: George Dunlap > > --- a/xen/arch/x86/mm/p2m.c > +++ b/xen/arch/x86/mm/p2m.c > @@ -1851,9 +1851,7 @@ unsigned long paging_gva_to_gfn(struct v > struct p2m_domain *hostp2m = p2m_get_hostp2m(v->domain); > const struct paging_mode *hostmode = paging_get_hostmode(v); > > - if ( is_hvm_domain(v->domain) > - && paging_mode_hap(v->domain) > - && nestedhvm_is_n2(v) ) > + if ( is_hvm_vcpu(v) && paging_mode_hap(v->domain) && nestedhvm_is_n2(v) ) > { > unsigned long gfn; > struct p2m_domain *p2m; > --- a/xen/arch/x86/mm/shadow/common.c > +++ b/xen/arch/x86/mm/shadow/common.c > @@ -971,7 +971,7 @@ int sh_unsync(struct vcpu *v, mfn_t gmfn > if ( pg->shadow_flags & > ((SHF_page_type_mask & ~SHF_L1_ANY) | SHF_out_of_sync) > || sh_page_has_multiple_shadows(pg) > - || is_pv_domain(v->domain) > + || is_pv_vcpu(v) > || !v->domain->arch.paging.shadow.oos_active ) > return 0; > > --- a/xen/arch/x86/mm/shadow/none.c > +++ b/xen/arch/x86/mm/shadow/none.c > @@ -73,6 +73,6 @@ static const struct paging_mode sh_pagin > > void shadow_vcpu_init(struct vcpu *v) > { > - ASSERT(is_pv_domain(v->domain)); > + ASSERT(is_pv_vcpu(v)); > v->arch.paging.mode = &sh_paging_none; > } > > >