All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Liu <wei.liu2@citrix.com>
To: Xen-devel <xen-devel@lists.xenproject.org>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
	Wei Liu <wei.liu2@citrix.com>, Jan Beulich <jbeulich@suse.com>
Subject: Re: [PATCH for-next v3 06/12] x86/domain: push some code down to hvm_domain_initialise
Date: Wed, 31 May 2017 19:06:08 +0100	[thread overview]
Message-ID: <20170531180608.6yun23wv6sgmwbdc@citrix.com> (raw)
In-Reply-To: <20170426155457.10799-7-wei.liu2@citrix.com>

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@citrix.com>
> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
> ---
> v3: update commit message
> 
> v2:
> 1. reorder things to avoid rename labels
> 2. add config to hvm_domain_initialise
> 
> Cc: Jan Beulich <jbeulich@suse.com>
> Cc: Andrew Cooper <andrew.cooper3@citrix.com>
> ---
>  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@lists.xen.org
https://lists.xen.org/xen-devel

  reply	other threads:[~2017-05-31 18:06 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-26 15:54 [PATCH for-next v3 00/12] x86: refactor x86/domain.c Wei Liu
2017-04-26 15:54 ` [PATCH for-next v3 01/12] x86/mm: make free_perdomain_mappings idempotent Wei Liu
2017-04-27 10:40   ` George Dunlap
2017-04-26 15:54 ` [PATCH for-next v3 02/12] x86/domain: provide pv_{create, destroy}_gdt_ldt_l1tab and use them Wei Liu
2017-04-28  8:39   ` Jan Beulich
2017-04-26 15:54 ` [PATCH for-next v3 03/12] x86/domain: make release_compact_l4 NULL tolerant Wei Liu
2017-04-26 15:54 ` [PATCH for-next v3 04/12] x86/domain: factor out pv_vcpu_destroy Wei Liu
2017-04-26 15:54 ` [PATCH for-next v3 05/12] x86/domain: factor out pv_vcpu_initialise Wei Liu
2017-04-28  8:41   ` Jan Beulich
2017-04-26 15:54 ` [PATCH for-next v3 06/12] x86/domain: push some code down to hvm_domain_initialise Wei Liu
2017-05-31 18:06   ` Wei Liu [this message]
2017-06-01 11:10     ` Wei Liu
2017-06-01 11:19       ` Jan Beulich
2017-06-01 11:42         ` Wei Liu
2017-04-26 15:54 ` [PATCH for-next v3 07/12] x86/domain: factor out pv_domain_destroy Wei Liu
2017-04-28  8:41   ` Jan Beulich
2017-04-26 15:54 ` [PATCH for-next v3 08/12] x86/domain: factor out pv_domain_initialise Wei Liu
2017-04-26 15:54 ` [PATCH for-next v3 09/12] x86/domain: move PV specific code to pv/domain.c Wei Liu
2017-04-28  8:47   ` Jan Beulich
2017-04-28 10:54     ` Wei Liu
2017-04-28 12:24       ` Jan Beulich
2017-04-28 12:54         ` Wei Liu
2017-04-26 15:54 ` [PATCH for-next v3 10/12] x86/domain: move HVM specific code to hvm/domain.c Wei Liu
2017-04-26 15:54 ` [PATCH for-next v3 11/12] x86/pv/domain: clean up setup_compat_l4 Wei Liu
2017-04-28  8:49   ` Jan Beulich
2017-04-26 15:54 ` [PATCH for-next v3 12/12] x86/pv/domain: clean up switch_compat Wei Liu
2017-04-28  8:51   ` Jan Beulich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170531180608.6yun23wv6sgmwbdc@citrix.com \
    --to=wei.liu2@citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.