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

Re: [Xen-devel] [PATCH 6/7] xen/arm: vsmc: The function identifier is always 32-bit


  • To: Julien Grall <julien.grall@xxxxxxx>
  • From: Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Date: Fri, 26 Jul 2019 12:39:54 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=epam.com;dmarc=pass action=none header.from=epam.com;dkim=pass header.d=epam.com;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-SenderADCheck; bh=U2NZia1pPDUriGStJgTWAOu0pX35sZdx/rA+U54qkLw=; b=XqAIXS6sU9/i7B5jWdVArIub/N3FnBQBetuKGQpjf/rDV0OBK+Q79CMQoxeULFNtkc+SMJrvQZC+BfvYOsWV/1O//KP6WWmOl7poo1JGtf1mEl1FyFEbJPqK7Xx9pt9KsWowY87iL6Xb8Zuv+nzQY92sT4F4lZx48kD8C91Dm6s8l4gURw3AMumCmBfQ0hMy5fP1cVy4qExLGAbVLcaM+8MxlJtxRxFQiSpONffmSr4WXecQSurry81em3g5sIYwSqzKePcG5+bUMEK7KvJaq/nJNwolETYJsbB12DHoJNiDM+oPBaFXWy1Fnjs5B6vFaIZLSJwBsgMNKyhnBNQLJA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=B+6R0CPIeGcxtTdmfyVqHsZwrAmuMIs5vSfy6emmYzKwSTlL8X3RbiCalOAZVpoctHojKJI6lqtmI/Qz5XKb9llVHbKse6K+TeswvBnz7gHeoSmKhpwLhRq/nyaFN73B2TKfTmLsOK7wrtilXkC0Jc3jrEk2kD4YLKFEZRebYwDQVgCnTpuDMOgBTlygV+cW38QATiiXSFvLF+pNGXwYDBiEPLM+l+l1nDvGSfylVxCbuN29j9Nj3Gjlayc6gcn+BtSSMfrhhNK1W027sb48TDZt+ij4IeL411e7QmI8a/Ih8jbkaH+RL++CsLcQGPUFUZz/KrgzzcB8PKXIQ1PItg==
  • Authentication-results: spf=none (sender IP is ) smtp.mailfrom=Volodymyr_Babchuk@xxxxxxxx;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Fri, 26 Jul 2019 12:40:03 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHVQZ6lsgh58N9rYkqF8h5QSg2aJ6bc2zSA
  • Thread-topic: [PATCH 6/7] xen/arm: vsmc: The function identifier is always 32-bit

Julien Grall writes:

> On Arm64, the SMCCC function identifier is always stored in the first 32-bit
> of x0 register. The rest of the bits are not defined and should be
> ignored.
>
> This means the variable funcid should be an uint32_t rather than
> register_t.
>
> Signed-off-by: Julien Grall <julien.grall@xxxxxxx>
Reviewed-by: Volodymyr Babchuk <volodymyr_babchuk@xxxxxxxx>

> ---
>  xen/arch/arm/vsmc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/xen/arch/arm/vsmc.c b/xen/arch/arm/vsmc.c
> index f8e350311d..a36db15fff 100644
> --- a/xen/arch/arm/vsmc.c
> +++ b/xen/arch/arm/vsmc.c
> @@ -220,7 +220,7 @@ static bool vsmccc_handle_call(struct cpu_user_regs *regs)
>  {
>      bool handled = false;
>      const union hsr hsr = { .bits = regs->hsr };
> -    register_t funcid = get_user_reg(regs, 0);
> +    uint32_t funcid = get_user_reg(regs, 0);
>  
>      /*
>       * Check immediate value for HVC32, HVC64 and SMC64.
> @@ -286,7 +286,7 @@ static bool vsmccc_handle_call(struct cpu_user_regs *regs)
>  
>      if ( !handled )
>      {
> -        gprintk(XENLOG_INFO, "Unhandled SMC/HVC: %08"PRIregister"\n", 
> funcid);
> +        gprintk(XENLOG_INFO, "Unhandled SMC/HVC: %#x\n", funcid);
>  
>          /* Inform caller that function is not supported. */
>          set_user_reg(regs, 0, ARM_SMCCC_ERR_UNKNOWN_FUNCTION);


-- 
Volodymyr Babchuk at EPAM
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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