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

Re: [Xen-devel] [PATCH v2 3/6] xen/arm: read ACTLR on the pcpu where the vcpu will run



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@xxxxxxxxxx>

---

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@xxxxxxx>

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@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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