|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v2 36/40] xen/mpu: Use secure hypervisor timer for AArch64v8R
Hi Penny, On 13/01/2023 05:29, Penny Zheng wrote:
Above, you suggest that the Armv8r will always use the secure EL2 timer. But here you allow the integrator to disable it. Why? Why is this removed? #ifdef CONFIG_HAS_MPU/* EL2 MPU Protection Region Base Address Register encode */@@ -510,6 +509,26 @@#endif +#ifdef CONFIG_ARM_SECURE_STATE+/* + * The Armv8-R AArch64 architecture always executes code in Secure + * state with EL2 as the highest Exception. + * + * Hypervisor timer registers for Secure EL2. + */ +#define CNTHPS_TVAL_EL2 S3_4_C14_C5_0 +#define CNTHPS_CTL_EL2 S3_4_C14_C5_1 +#define CNTHPS_CVAL_EL2 S3_4_C14_C5_2 +#define CNTHPx_TVAL_EL2 CNTHPS_TVAL_EL2 +#define CNTHPx_CTL_EL2 CNTHPS_CTL_EL2 +#define CNTHPx_CVAL_EL2 CNTHPS_CVAL_EL2 +#else +/* Hypervisor timer registers for Non-Secure EL2. */ +#define CNTHPx_TVAL_EL2 CNTHP_TVAL_EL2 +#define CNTHPx_CTL_EL2 CNTHP_CTL_EL2 +#define CNTHPx_CVAL_EL2 CNTHP_CVAL_EL2 +#endif /* CONFIG_ARM_SECURE_STATE */ Given there is only one state, I would actually prefer if we alias CNTHP_*_EL2 to CNTHPS_*_EL2. So there is no renaming. + /* Access to system registers */#define WRITE_SYSREG64(v, name) do { \diff --git a/xen/arch/arm/include/asm/cpregs.h b/xen/arch/arm/include/asm/cpregs.h index 6b083de204..a704677fbc 100644 --- a/xen/arch/arm/include/asm/cpregs.h +++ b/xen/arch/arm/include/asm/cpregs.h @@ -374,8 +374,8 @@ #define CLIDR_EL1 CLIDR #define CNTFRQ_EL0 CNTFRQ #define CNTHCTL_EL2 CNTHCTL -#define CNTHP_CTL_EL2 CNTHP_CTL -#define CNTHP_CVAL_EL2 CNTHP_CVAL +#define CNTHPx_CTL_EL2 CNTHP_CTL +#define CNTHPx_CVAL_EL2 CNTHP_CVAL #define CNTKCTL_EL1 CNTKCTL #define CNTPCT_EL0 CNTPCT #define CNTP_CTL_EL0 CNTP_CTL diff --git a/xen/arch/arm/time.c b/xen/arch/arm/time.c index 433d7be909..3bba733b83 100644 --- a/xen/arch/arm/time.c +++ b/xen/arch/arm/time.c @@ -196,13 +196,13 @@ int reprogram_timer(s_time_t timeout)if ( timeout == 0 ) Cheers, -- Julien Grall
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |