From: Michal Orzel Date: Wed, 5 May 2021 07:43:01 +0000 (+0200) Subject: arm: Modify type of actlr to register_t X-Git-Tag: archive/raspbian/4.14.3-1+rpi1^2~44^2~30 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=b46af13fa1241ed5d443315313c2f1fd081c0813;p=xen.git arm: Modify type of actlr to register_t AArch64 registers are 64bit whereas AArch32 registers are 32bit or 64bit. MSR/MRS are expecting 64bit values thus we should get rid of helpers READ/WRITE_SYSREG32 in favour of using READ/WRITE_SYSREG. We should also use register_t type when reading sysregs which can correspond to uint64_t or uint32_t. Even though many AArch64 registers have upper 32bit reserved it does not mean that they can't be widen in the future. ACTLR_EL1 system register bits are implementation defined which means it is possibly a latent bug on current HW as the CPU implementer may already have decided to use the top 32bit. Signed-off-by: Michal Orzel Reviewed-by: Julien Grall (cherry picked from commit b80470c84553808fef3a6803000ceee8a100e63c) --- diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c index c94d2f48f1..849fef2f1e 100644 --- a/xen/arch/arm/domain.c +++ b/xen/arch/arm/domain.c @@ -329,7 +329,7 @@ static void schedule_tail(struct vcpu *prev) static void continue_new_vcpu(struct vcpu *prev) { - current->arch.actlr = READ_SYSREG32(ACTLR_EL1); + current->arch.actlr = READ_SYSREG(ACTLR_EL1); processor_vcpu_initialise(current); schedule_tail(prev); diff --git a/xen/include/asm-arm/domain.h b/xen/include/asm-arm/domain.h index 4e2f582006..9c4db75f08 100644 --- a/xen/include/asm-arm/domain.h +++ b/xen/include/asm-arm/domain.h @@ -158,7 +158,7 @@ struct arch_vcpu /* Control Registers */ register_t sctlr; - uint32_t actlr; + register_t actlr; uint32_t cpacr; uint32_t contextidr;