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

Re: [PATCH] xen/arm: fix unmapped access trapping on GICv2 hardware


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>
  • From: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>
  • Date: Wed, 18 Feb 2026 09:21:48 -0500
  • 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 (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=IBmJZqieVx4eMrchRuss9RQRotrVE45CAjOb7dQZ7to=; b=RVmLs2Rh/qIz+dnTxO/y+LAM1xRR89bJswvN6Hgb63VVCyP2SpuuYevk8V5v1m2RlwWpw0Lxj8UazkUT12aaXki4DglrcwLx0pOHJRdIuwK7pEV680RLXyvv8QTHevaFqPkxK0K/Y+M9FSNVRGiJCpn7JkVhXEwvFL0YiO8cIeSEj2JIVHMWR4bhutSL6G2NQE4aF9NAYFdNKC10HG4qR3Hig9PHLZxbi16+1ZfcXCLzYgCHH/ghlGPLdHTXdgkDL8o9cyjILu61ZCHrNRdTQCU5gsQSciXVpna/E11ONCHeViMlq3qWUKaMQu3L4K3abGtTmPgZrltwBHPMJlylNA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=MO/exAmA3sCpidrzd0quy3lj6/rO41qvTcUCpjnQim99Jx2d2S01eNI64O/vQ8J5FnbyK4/pqReufznzs5D/FbBZVvXQvCQMiM6pj/8QiJ5K0i8VbIlaDRmHlSSAQSs3HcVKlTcsY/CEJxLAcIikZzSEmtUlFIvHJtT8GrV5G0gwT2OwDBlstR5tTvPKD912woJakT1tGjDW5aQ7XX2aJGZPPPwsas2AYgqfPYCIt53LJ0SrlaKY0ovSI28wCQzVj+qK6HRceAxOzNA25pBB9ldTDP2aBhbGvqLGKugnKzMuHlPt/v1RcCcSThbg9rlp+yyTyTzG1cVH25BOVaVN4g==
  • Cc: Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Wed, 18 Feb 2026 14:22:19 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Gentle ping.

To be clear, domU interrupts with vGICv2 are currently broken when
XEN_DOMCTL_CDF_trap_unmapped_accesses is not set.

On 2/5/26 14:01, Stewart Hildebrand wrote:
> Since 4dbcb0653621, the vGICv2 CPU interface is mapped in a deferred
> manner. On domains with XEN_DOMCTL_CDF_trap_unmapped_accesses unset on
> GICv2 hardware, the vGICv2 CPU interface fails to be mapped. A visible
> symptom is that a domU gets stuck at:
> 
>   [    0.177983] smp: Bringing up secondary CPUs ...
> 
> Move the 2nd check_p2m earlier so it's prioritized over try_handle_mmio.
> 
> Fixes: 980aff4e8fcd ("xen/arm: Add way to disable traps on accesses to 
> unmapped addresses")
> Signed-off-by: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>
> ---
> This should be backported to 4.21.
> 
> Pipeline: 
> https://gitlab.com/xen-project/people/stewarthildebrand/xen/-/pipelines/2010469665
> ---
>  xen/arch/arm/traps.c | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c
> index 040c0f2e0db1..0c01f37ad6b4 100644
> --- a/xen/arch/arm/traps.c
> +++ b/xen/arch/arm/traps.c
> @@ -1915,6 +1915,14 @@ static void do_trap_stage2_abort_guest(struct 
> cpu_user_regs *regs,
>          if ( info.dabt_instr.state == INSTR_ERROR )
>              goto inject_abt;
>  
> +        /*
> +         * If the instruction syndrome was invalid, then we already checked 
> if
> +         * this was due to a P2M fault. So no point to check again as the 
> result
> +         * will be the same.
> +         */
> +        if ( (info.dabt_instr.state == INSTR_VALID) && check_p2m(is_data, 
> gpa) )
> +            return;
> +
>          state = try_handle_mmio(regs, &info);
>  
>          switch ( state )
> @@ -1939,14 +1947,6 @@ static void do_trap_stage2_abort_guest(struct 
> cpu_user_regs *regs,
>                  break;
>          }
>  
> -        /*
> -         * If the instruction syndrome was invalid, then we already checked 
> if
> -         * this was due to a P2M fault. So no point to check again as the 
> result
> -         * will be the same.
> -         */
> -        if ( (info.dabt_instr.state == INSTR_VALID) && check_p2m(is_data, 
> gpa) )
> -            return;
> -
>          break;
>      }
>      default:




 


Rackspace

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