All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@arm.com>
To: Stefano Stabellini <sstabellini@kernel.org>
Cc: xen-devel@lists.xen.org
Subject: Re: [PATCH v2 3/6] xen/arm: read ACTLR on the pcpu where the vcpu will run
Date: Tue, 20 Feb 2018 10:56:37 +0000	[thread overview]
Message-ID: <76df2496-0f45-1c39-7b5e-6f6e0e7480ac@arm.com> (raw)
In-Reply-To: <1519077510-22405-3-git-send-email-sstabellini@kernel.org>

Hi Stefano,

On 19/02/18 21:58, Stefano Stabellini wrote:
> On big.LITTLE systems not all cores have the same ACTLR. Instead of
> reading ACTLR and setting v->arch.actlr in vcpu_initialise, do it later
> on the same pcpu where the vcpu will run.
> 
> This way, assuming that the vcpu has been created with the right pcpu
> affinity, the guest will be able to read the right ACTLR value, matching
> the one of the physical cpu.
> 
> Also move processor_vcpu_initialise(v) to continue_new_vcpu as it
> can modify v->arch.actlr.
> 
> Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
> 
> ---
> 
> Changes in v2:
> - move processor_vcpu_initialise to continue_new_vcpu
> - remove inaccurate sentence from commit message
> ---
>   xen/arch/arm/domain.c | 7 +++----
>   1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c
> index a010443..fb51415 100644
> --- a/xen/arch/arm/domain.c
> +++ b/xen/arch/arm/domain.c
> @@ -314,6 +314,9 @@ static void schedule_tail(struct vcpu *prev)
>   
>   static void continue_new_vcpu(struct vcpu *prev)
>   {
> +    current->arch.actlr = READ_SYSREG32(ACTLR_EL1);

Hmmm, I just realised that ACTLR_EL1 has been extended to 64-bit for 
AArch64 state in recent spec.

I don't think this necessary to update it in this series so:

Reviewed-by: Julien Grall <julien.grall@arm.com>

Cheers,


> +    processor_vcpu_initialise(current);
> +
>       schedule_tail(prev);
>   
>       if ( is_idle_vcpu(current) )
> @@ -540,12 +543,8 @@ int vcpu_initialise(struct vcpu *v)
>   
>       v->arch.vmpidr = MPIDR_SMP | vcpuid_to_vaffinity(v->vcpu_id);
>   
> -    v->arch.actlr = READ_SYSREG32(ACTLR_EL1);
> -
>       v->arch.hcr_el2 = get_default_hcr_flags();
>   
> -    processor_vcpu_initialise(v);
> -
>       if ( (rc = vcpu_vgic_init(v)) != 0 )
>           goto fail;
>   
> 

Cheers,

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2018-02-20 10:56 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-19 21:58 [PATCH v2 0/6] unsafe big.LITTLE support Stefano Stabellini
2018-02-19 21:58 ` [PATCH v2 1/6] xen/arm: Park CPUs with a MIDR different from the boot CPU Stefano Stabellini
2018-02-19 21:58   ` [PATCH v2 2/6] xen/arm: make processor a per cpu variable Stefano Stabellini
2018-02-20 10:39     ` Julien Grall
2018-02-19 21:58   ` [PATCH v2 3/6] xen/arm: read ACTLR on the pcpu where the vcpu will run Stefano Stabellini
2018-02-20 10:56     ` Julien Grall [this message]
2018-02-19 21:58   ` [PATCH v2 4/6] xen/arm: make vpidr per vcpu Stefano Stabellini
2018-02-20 11:02     ` Julien Grall
2018-02-20 20:47       ` Stefano Stabellini
2018-02-19 21:58   ` [PATCH v2 5/6] xen/arm: read cacheline size when needed Stefano Stabellini
2018-02-20 11:33     ` Julien Grall
2018-02-20 21:03       ` Stefano Stabellini
2018-02-20 21:16         ` Julien Grall
2018-02-20 21:49           ` Julien Grall
2018-02-20 23:28             ` Stefano Stabellini
2018-02-21  7:58               ` Julien Grall
2018-02-19 21:58   ` [PATCH v2 6/6] xen/arm: update the docs about heterogeneous computing Stefano Stabellini
2018-02-20 11:38     ` Julien Grall
2018-02-20 16:40       ` Stefano Stabellini

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=76df2496-0f45-1c39-7b5e-6f6e0e7480ac@arm.com \
    --to=julien.grall@arm.com \
    --cc=sstabellini@kernel.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.