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

Re: [XEN v3 08/12] xen/Arm: GICv3: Define ICH_AP0R<n> and ICH_AP1R<n> for AArch32


  • To: Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Michal Orzel <michal.orzel@xxxxxxx>
  • Date: Fri, 18 Nov 2022 13:26:49 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=f38sHVwwDBo2274oknHPzAXruJunsQYCI4+9TLMWY38=; b=igLrgvcBe9iB/A+9qniZtN1idUfrgVHuaGxqNBoJEjgFsC2/pN0tAyVlwErVp5Lx+TQk6M5guBe7LkvOf6PVBXqnWVepasZnHy5UYdRhe42aBX94bs/PYAkl9rLaBBYtCbcrIfpC+Z1wa5a5nXPs/mQh8yhflvF2Su45995nNQFknqlqHOapcfrf9HsJ5bW/+Ha9vWEURxPaImBtnpKB0ugq4SmdccHVsRyUCLybHHztBUZFSPuPvd5Mn0lyq+Jb6tgUmY+/Wm7+VXMkxuegPmJAnxHlrXgKSDX8kmPBy7nP/75nV4D0wyRYRlblTYoDCOSHs3BIBJFcOlpAVL4HoQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AiflTBViyqM7MYFr/uyW2XbypgNtVxMpDbZEQSkCxNIA+kIwsjPVGpB/RKrAUJSBwYgtMKYiPP0CDaqbttShUUebBByNjtb7QTwBtxHudoCPPkySbEHQlMC+ynQPJo7GGNeJ27PGlO0hG0EhWqSp/P6uzF9iKV93GApZvl/oNJiC//AjmAT0CVLUr/XynJELLMMsW+LbHJW7UIU/G4TLtRoLQdsfMnSSuwOiW3xlnW2nz9sD4cu+yuowGC9n6+ZNjI1j8/TYkkbP5IIF1sMdNiUDkXATv/FGXh6yrkKc78DB9pBLt/X8jcGSGoaXAHGOolS9gdw5/NucdQX3BiM5cQ==
  • Cc: <sstabellini@xxxxxxxxxx>, <stefanos@xxxxxxxxxx>, <julien@xxxxxxx>, <Volodymyr_Babchuk@xxxxxxxx>, <bertrand.marquis@xxxxxxx>, <jgrall@xxxxxxxxxx>, <burzalodowa@xxxxxxxxx>
  • Delivery-date: Fri, 18 Nov 2022 12:27:05 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hi Ayan,

On 11/11/2022 15:17, Ayan Kumar Halder wrote:
> Adapt save_aprn_regs()/restore_aprn_regs() for AArch32.
> 
> For which we have defined the following registers:-
> 1. Interrupt Controller Hyp Active Priorities Group0 Registers 0-3
> 2. Interrupt Controller Hyp Active Priorities Group1 Registers 0-3
> 
> Signed-off-by: Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>
> ---
> 
> Changes from :-
> v1 - 1. Moved coproc register definition to asm/cpregs.h.
> 
> v2 - 1. Defined register alias.
> 2. Style issues.
> 3. Dropped R-b and Ack.
> 
>  xen/arch/arm/include/asm/cpregs.h | 28 ++++++++++++++++++++++++++++
>  1 file changed, 28 insertions(+)
> 
> diff --git a/xen/arch/arm/include/asm/cpregs.h 
> b/xen/arch/arm/include/asm/cpregs.h
> index 242dabaea8..5331ec3448 100644
> --- a/xen/arch/arm/include/asm/cpregs.h
> +++ b/xen/arch/arm/include/asm/cpregs.h
> @@ -259,6 +259,26 @@
>  #define VBAR            p15,0,c12,c0,0  /* Vector Base Address Register */
>  #define HVBAR           p15,4,c12,c0,0  /* Hyp. Vector Base Address Register 
> */
>  
> +/*
> + * CP15 CR12: Interrupt Controller Hyp Active Priorities Group 0 Registers,
> + * n = 0 - 3
> + */
> +#define __AP0Rx(x)      ___CP32(p15, 4, c12, c8, x)
You are using a macro ___CP32 here but it is defined somewhere down the file.
So I think you need to make a change so that the definition appears before use.

> +#define ICH_AP0R0       __AP0Rx(0)
> +#define ICH_AP0R1       __AP0Rx(1)
> +#define ICH_AP0R2       __AP0Rx(2)
> +#define ICH_AP0R3       __AP0Rx(3)
> +
> +/*
> + * CP15 CR12: Interrupt Controller Hyp Active Priorities Group 1 Registers,
> + * n = 0 - 3
> + */
> +#define __AP1Rx(x)      ___CP32(p15, 4, c12, c9, x)
> +#define ICH_AP1R0       __AP1Rx(0)
> +#define ICH_AP1R1       __AP1Rx(1)
> +#define ICH_AP1R2       __AP1Rx(2)
> +#define ICH_AP1R3       __AP1Rx(3)
> +
>  /* CP15 CR12: Interrupt Controller List Registers, n = 0 - 15 */
>  #define ___CP32(coproc, opc1, crn, crm, opc2) coproc, opc1, crn, crm, opc2
>  #define __LR0(x)                  ___CP32(p15, 4, c12, c12, x)
> @@ -360,6 +380,14 @@
>  #define HCR_EL2                 HCR
>  #define HPFAR_EL2               HPFAR
>  #define HSTR_EL2                HSTR
> +#define ICH_AP0R0_EL2           ICH_AP0R0
> +#define ICH_AP0R1_EL2           ICH_AP0R1
> +#define ICH_AP0R2_EL2           ICH_AP0R2
> +#define ICH_AP0R3_EL2           ICH_AP0R3
> +#define ICH_AP1R0_EL2           ICH_AP1R0
> +#define ICH_AP1R1_EL2           ICH_AP1R1
> +#define ICH_AP1R2_EL2           ICH_AP1R2
> +#define ICH_AP1R3_EL2           ICH_AP1R3
>  #define ICH_LR0_EL2             ICH_LR0
>  #define ICH_LR1_EL2             ICH_LR1
>  #define ICH_LR2_EL2             ICH_LR2

~Michal



 


Rackspace

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