All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>,
	xen-devel <xen-devel@lists.xenproject.org>
Cc: Tim Deegan <tim@xen.org>, Keir Fraser <keir@xen.org>
Subject: Re: [PATCH 1/4] x86: skip further initialization for idle domains
Date: Wed, 28 Jan 2015 11:00:09 +0000	[thread overview]
Message-ID: <54C8C139.8080306@citrix.com> (raw)
In-Reply-To: <54C8A77F020000780005A2AD@mail.emea.novell.com>

On 28/01/15 08:10, Jan Beulich wrote:
> While in the end not really found necessary, early versions of the
> patches to follow pointed out that we needlessly set up paging for idle
> domains. Arranging for that to be skipped made me notice that we can at
> once skip vMCE setup for them. Leverage to adjustment to further
> re-arrange the way FPU setup gets skipped.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>

>
> --- a/xen/arch/x86/domain.c
> +++ b/xen/arch/x86/domain.c
> @@ -427,12 +427,15 @@ int vcpu_initialise(struct vcpu *v)
>      if ( rc )
>          return rc;
>  
> -    paging_vcpu_init(v);
> +    if ( !is_idle_domain(d) )
> +    {
> +        paging_vcpu_init(v);
>  
> -    if ( (rc = vcpu_init_fpu(v)) != 0 )
> -        return rc;
> +        if ( (rc = vcpu_init_fpu(v)) != 0 )
> +            return rc;
>  
> -    vmce_init_vcpu(v);
> +        vmce_init_vcpu(v);
> +    }
>  
>      if ( has_hvm_container_domain(d) )
>      {
> @@ -559,12 +562,12 @@ int arch_domain_create(struct domain *d,
>      HYPERVISOR_COMPAT_VIRT_START(d) =
>          is_pv_domain(d) ? __HYPERVISOR_COMPAT_VIRT_START : ~0u;
>  
> -    if ( (rc = paging_domain_init(d, domcr_flags)) != 0 )
> -        goto fail;
> -    paging_initialised = 1;
> -
>      if ( !is_idle_domain(d) )
>      {
> +        if ( (rc = paging_domain_init(d, domcr_flags)) != 0 )
> +            goto fail;
> +        paging_initialised = 1;
> +
>          d->arch.cpuids = xmalloc_array(cpuid_input_t, MAX_CPUID_INPUT);
>          rc = -ENOMEM;
>          if ( d->arch.cpuids == NULL )
> --- a/xen/arch/x86/i387.c
> +++ b/xen/arch/x86/i387.c
> @@ -303,12 +303,8 @@ void save_fpu_enable(void)
>  /* Initialize FPU's context save area */
>  int vcpu_init_fpu(struct vcpu *v)
>  {
> -    int rc = 0;
> +    int rc;
>      
> -    /* Idle domain doesn't have FPU state allocated */
> -    if ( is_idle_vcpu(v) )
> -        goto done;
> -
>      if ( (rc = xstate_alloc_save_area(v)) != 0 )
>          return rc;
>  
> @@ -318,13 +314,9 @@ int vcpu_init_fpu(struct vcpu *v)
>      {
>          v->arch.fpu_ctxt = _xzalloc(sizeof(v->arch.xsave_area->fpu_sse), 16);
>          if ( !v->arch.fpu_ctxt )
> -        {
>              rc = -ENOMEM;
> -            goto done;
> -        }
>      }
>  
> -done:
>      return rc;
>  }
>  
>
>
>

  reply	other threads:[~2015-01-28 11:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-28  8:00 [PATCH 0/4] x86: allow for more memory to be used Jan Beulich
2015-01-28  8:10 ` [PATCH 1/4] x86: skip further initialization for idle domains Jan Beulich
2015-01-28 11:00   ` Andrew Cooper [this message]
2015-01-28  8:11 ` [PATCH 2/4] x86/mm: allow for building without shadow mode support Jan Beulich
2015-01-28 11:10   ` Andrew Cooper
2015-01-29 17:34     ` Tim Deegan
2015-01-30  9:28       ` Jan Beulich
2015-01-28  8:11 ` [PATCH 3/4] x86: provide build time option to support up to 123Tb of memory Jan Beulich
2015-01-28 12:10   ` Andrew Cooper
2015-01-28 14:16     ` Jan Beulich
2015-01-28  8:12 ` [PATCH 4/4] x86/shadow: make some log‑dirty handling functions static Jan Beulich
2015-01-28 11:18   ` Andrew Cooper
2015-01-29 11:21   ` [PATCH 4/4] x86/shadow: make some log?dirty " Tim Deegan

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=54C8C139.8080306@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=keir@xen.org \
    --cc=tim@xen.org \
    --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.