From: Tim Deegan Subject: Re: [PATCH RFC v13 02/20] pvh prep: code motion Date: Thu, 26 Sep 2013 10:20:23 +0100 Message-ID: <20130926092023.GB54428@ocelot.phlegethon.org> References: <1379955000-11050-1-git-send-email-george.dunlap@eu.citrix.com> <1379955000-11050-3-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: Content-Disposition: inline In-Reply-To: <1379955000-11050-3-git-send-email-george.dunlap@eu.citrix.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: George Dunlap Cc: Keir Fraser , Jan Beulich , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org Hi, At 17:49 +0100 on 23 Sep (1379958582), George Dunlap wrote: > There are many functions where PVH requires some code in common with > HVM. Rearrange some of these functions so that the code is together. > > In general, the HVM code that PVH also uses includes: > - cacheattr functionality > - paging > - hvm_funcs > - hvm_assert_evtchn_irq tasklet > - tm_list > - hvm_params > > And code that PVH shares with PV but not with PVH: > - updating the domain wallclock > - setting v->is_initialized > > There should be no end-to-end changes in behavior. > --- a/xen/arch/x86/domain.c > +++ b/xen/arch/x86/domain.c > @@ -945,17 +945,16 @@ int arch_set_info_guest( > > clear_bit(_VPF_in_reset, &v->pause_flags); > > - if ( v->vcpu_id == 0 ) > - update_domain_wallclock_time(d); > - > - /* Don't redo final setup */ > - v->is_initialised = 1; > - > if ( paging_mode_enabled(d) ) > paging_update_paging_modes(v); > > update_cr3(v); > > + if ( v->vcpu_id == 0 ) > + update_domain_wallclock_time(d); > + > + /* Don't redo final setup */ > + v->is_initialised = 1; This will change behaviour for at least some cases, e.g. update_cr3() -> sh_update_cr3() -> ``if ( !is_hvm_domain(d) && !v->is_initialised ) ...'' Tim.