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

Re: [Xen-devel] [PATCH] xen: arm: Fixing ttbcr (TCR_EL1 for AArch64) size.



On Tue, 2013-12-03 at 17:33 +0530, Pranavkumar Sawargaonkar wrote:
> This patch fixes size of ttbcr register (TCR_EL1 in case of AArch64)
> and it's programming considering size in case of context switch.
> 
> Currently ttbcr is defined as 32b register but for AArch64 TCR_EL1
> size is 64b.

Thanks for tracking this down.

> Signed-off-by: Anup Patel <anup.patel@xxxxxxxxxx>
> Signed-off-by: Pranavkumar Sawargaonkar <pranavkumar@xxxxxxxxxx>
[...]
> diff --git a/xen/include/asm-arm/domain.h b/xen/include/asm-arm/domain.h
> index d5cae2e..2aa4443 100644
> --- a/xen/include/asm-arm/domain.h
> +++ b/xen/include/asm-arm/domain.h
> @@ -165,7 +165,11 @@ struct arch_vcpu
>  
>      /* MMU */
>      register_t vbar;
> +#ifdef CONFIG_ARM_32
>      uint32_t ttbcr;
> +#else
> +    uint64_t ttbcr;
> +#endif

I think that actually only this hunk is required. 

Actually, the correct type to use is register_t (which is defined to be
the "native" register size, 32- or 64-bit as appropriate). That avoids
the ifdef.

The READ/WRITE_SYSREG macros are also defined to deal in the "native"
bit width so the other hunks are unnecessary.

The SYSREG32/64 variants are for use with a register which is a fixed
width independent of the platform.

Thanks,
Ian.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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