All of lore.kernel.org
 help / color / mirror / Atom feed
From: Don Slutz <dslutz@verizon.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>,
	Xen-devel <xen-devel@lists.xen.org>
Cc: Keir Fraser <keir@xen.org>, Jan Beulich <JBeulich@suse.com>
Subject: Re: [PATCH] xen/x86: Don't unconditionally touch the hvm_domain union during domain construction
Date: Wed, 20 May 2015 13:36:29 -0400	[thread overview]
Message-ID: <555CC61D.6030008@one.verizon.com> (raw)
In-Reply-To: <1432066371-2612-1-git-send-email-andrew.cooper3@citrix.com>

On 05/19/15 16:12, Andrew Cooper wrote:
> It may not be the appropriate half to touch.
> 
> Drop the superfluous mem_sharing_enabled assignment, and move the hap_enabled
> assignment to a suitable conditional before it is actually needed.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
> CC: Keir Fraser <keir@xen.org>
> CC: Jan Beulich <JBeulich@suse.com>
> ---
>  xen/arch/x86/domain.c |   11 +++++------
>  1 file changed, 5 insertions(+), 6 deletions(-)
> 
> diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c
> index 1f1550e..6e9464c 100644
> --- a/xen/arch/x86/domain.c
> +++ b/xen/arch/x86/domain.c
> @@ -513,12 +513,6 @@ int arch_domain_create(struct domain *d, unsigned int domcr_flags,
>      int i, paging_initialised = 0;
>      int rc = -ENOMEM;
>  
> -    d->arch.hvm_domain.hap_enabled =
> -        has_hvm_container_domain(d) &&
> -        hvm_funcs.hap_supported &&
> -        (domcr_flags & DOMCRF_hap);
> -    d->arch.hvm_domain.mem_sharing_enabled = 0;
> -
>      d->arch.s3_integrity = !!(domcr_flags & DOMCRF_s3_integrity);
>  
>      INIT_LIST_HEAD(&d->arch.pdev_list);
> @@ -541,7 +535,12 @@ int arch_domain_create(struct domain *d, unsigned int domcr_flags,
>      }
>  
>      if ( has_hvm_container_domain(d) )
> +    {
> +        d->arch.hvm_domain.hap_enabled =
> +            hvm_funcs.hap_supported && (domcr_flags & DOMCRF_hap);
> +
>          rc = create_perdomain_mapping(d, PERDOMAIN_VIRT_START, 0, NULL, NULL);
> +    }
>      else if ( is_idle_domain(d) )
>          rc = 0;
>      else
> 

Looks good to me.

Reviewed-by: Don Slutz <dslutz@verizon.com>

   -Don Slutz

      reply	other threads:[~2015-05-20 17:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-19 20:12 [PATCH] xen/x86: Don't unconditionally touch the hvm_domain union during domain construction Andrew Cooper
2015-05-20 17:36 ` Don Slutz [this message]

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=555CC61D.6030008@one.verizon.com \
    --to=dslutz@verizon.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=keir@xen.org \
    --cc=xen-devel@lists.xen.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.