[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH for-next v3 06/12] x86/domain: push some code down to hvm_domain_initialise



On Wed, Apr 26, 2017 at 04:54:51PM +0100, Wei Liu wrote:
> We want to have a single entry point to initialise hvm guest.  To do
> this, the setting of hap_enabled and creation of the per domain mappings
> is deferred, but that's not a problem.
> 
> No functional change.
> 
> Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
> Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> ---
> v3: update commit message
> 
> v2:
> 1. reorder things to avoid rename labels
> 2. add config to hvm_domain_initialise
> 
> Cc: Jan Beulich <jbeulich@xxxxxxxx>
> Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> ---
>  xen/arch/x86/domain.c         | 14 +++-----------
>  xen/arch/x86/hvm/hvm.c        | 11 ++++++++++-
>  xen/include/asm-x86/hvm/hvm.h |  3 ++-
>  3 files changed, 15 insertions(+), 13 deletions(-)
> 
> diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c
> index cea80803a5..80775a0362 100644
> --- a/xen/arch/x86/domain.c
> +++ b/xen/arch/x86/domain.c
> @@ -598,16 +598,8 @@ int arch_domain_create(struct domain *d, unsigned int 
> domcr_flags,
>          d->arch.emulation_flags = emflags;
>      }
>  
> -    if ( is_hvm_domain(d) )
> -    {
> -        d->arch.hvm_domain.hap_enabled =
> -            hvm_funcs.hap_supported && (domcr_flags & DOMCRF_hap);

paging_domain_init calls hap_enabled. hap_enabled uses
d->arch.hvm_domain.hap_enabled to determine if it should call hap_init.

We can't call hvm_domain_initialise before paging_domain_init because
it needs paging to be initialised.

So I can't push setting this field to hvm_domain_initialise.

If you think there is a better way to clean this up please let me know.

Wei.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.