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

Re: [XEN PATCH] xen/arm: ffa: fix bind/unbind notification


  • To: Jens Wiklander <jens.wiklander@xxxxxxxxxx>, Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
  • From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • Date: Mon, 3 Feb 2025 10:42:05 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=arm.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=2; 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=SPK00qTM4XZC8QYyqmoY04nPBIJVW12pPbP7HtxHtP8=; b=DjRPfuKSD0Xbxmfr4Y0u32XPavTMAEqsG6vffu7YRzVO+4Elo5OAckuO+1VgApqOjqrrnPSo5CGt9derASkmrbEbmu+0DgcTH0jF4ORCo3ZSp2W0XCrT6ZyC+uTpWd8tMAvrnO+2XdnAgl98nIXpyTQQ6YOo0C8kWM+4lgYuTnMwOhYQVW4qr9nPUynitvax6/QpilRiFSjkIGtxnGO5h3160ISqNbEYa2o+7PmE91CQM1MyzBrccldbVynWm4mSd2+oO4ZCR3psLnaEieI3901+Zvor2xWYb8yhYyBZjxdsJplq2FgYKPs20eJozEUEFRhw4OHu/2WPtrbqe1IdLg==
  • 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=SPK00qTM4XZC8QYyqmoY04nPBIJVW12pPbP7HtxHtP8=; b=Y6N3uzb4T0jqkYx4en6dY5s8kOIgNTYOE3BctkCUX3RGPN3ap9lEXeS9dxEyr0TOR/FIAUtgsYQlo0Ka6ZCctodyMLuXl2XmXVIWjAPopZM4shyscihKM3URctRPJsy8uJmQoQSflEy1NxYDF42y/Nl/VrYdFUpaT2gWfR8n+o7pTlIVGVXTg1V2bjyS5fuFstLxEjq9/0FOxNIpb96KRtIPJ9ppaP6boZ/Wbr1bASetxlxSvKSh5T5SSyeegiNudrrCzal8ZvpF4qUJdPuGP9Z5/+0Vi8iKh0XpSGSiSzMJ0oQegI60CBDUI4s2Vq2QFXrLTJQevLxvOdnyVVWdAQ==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=YvHlEF5gAPrnwpGhw73JmSmkpvf5I2x+VD9HWeHZ/uEbZz0+v1rkdOdk60OkyJ1FTBTV1f0+D2T7zpZhCoiZxh1DSa9kXzs/h1CWLKuVocOuXzvq3atdPHCPlwGGIvAyTo/El1hvjgX36zZR0WPg2yy9bk1sqdxlgYzt/3Djmnb/MiZ9AcHA2R+rHWxrr5S+Ny1qKmAtOz7lD2IfYYXRQOT9GN1tSa9DlO1mD8ztSVL8OyAkzUrXdI4WeyEhdttqRwzJHOShnq/ZT3C5UD7+wGGfYLON1jpPJicekO/S4xiGG8S6HiaZKuXeV1zBqvm/8F6wQFP0rAvjjc7114Geag==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=gIt9KMz46qfDqTo4Gx5Cjr9Qq/dXYV5PRbc0mNJF7ceIWfBmSSPGeO8XcHKoQfIMhpbbWehoxCpxO0GG+y+M0skRoXYWjPttpplQqQCBesp4wb1hn9s4+PKQjAC6yRnQOWiMwzrIFIS6hBAsaS9Jrx7BJo0s3Y1/QJMFNP2YtdbFbyOfJFDqlrSn+MrFTX6xw3YpSqkaaskPHe6iMaMrGWlXv6RRAWC+PXMaeDQch5gNq8LlA6Yhj/91ODC+Yqix3V1yutFw/SM5u6RFfwc1KjO9PkLe0OMNqON0G6Gkt606kjv73NXHQA7xTLwX0LT2SqNMxxQ4lrSedomdUgYbtg==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "patches@xxxxxxxxxx" <patches@xxxxxxxxxx>, Volodymyr Babchuk <volodymyr_babchuk@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>
  • Delivery-date: Mon, 03 Feb 2025 10:45:36 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHbdiVuvpwzLBgvuEa9DOMuEIYWPLM1ZDAA
  • Thread-topic: [XEN PATCH] xen/arm: ffa: fix bind/unbind notification

Hi Jens,

Thanks a lot for the finding.

> On 3 Feb 2025, at 11:21, Jens Wiklander <jens.wiklander@xxxxxxxxxx> wrote:
> 
> The notification bitmask is in passed in the FF-A ABI in two 32-bit
> registers w3 and w4. The lower 32-bits should go in w3 and the higher in
> w4. These two registers has unfortunately been swapped for
> FFA_NOTIFICATION_BIND and FFA_NOTIFICATION_UNBIND in the FF-A mediator.
> So fix that by using the correct registers.
> 
> Fixes: b490f470f58d ("xen/arm: ffa: support notification")
> Signed-off-by: Jens Wiklander <jens.wiklander@xxxxxxxxxx>

Reviewed-by: Bertrand Marquis <bertrand.marquis@xxxxxxx>

@Oleksii: This is a fix of a bug, can this be considered for 4.20 ?

Thanks
Bertrand

> ---
> xen/arch/arm/tee/ffa_notif.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/xen/arch/arm/tee/ffa_notif.c b/xen/arch/arm/tee/ffa_notif.c
> index 21b9e78f6399..00efaf8f7353 100644
> --- a/xen/arch/arm/tee/ffa_notif.c
> +++ b/xen/arch/arm/tee/ffa_notif.c
> @@ -40,8 +40,8 @@ int ffa_handle_notification_bind(struct cpu_user_regs *regs)
>      * We only support notifications from SP so no need to check the sender
>      * endpoint ID, the SPMC will take care of that for us.
>      */
> -    return ffa_simple_call(FFA_NOTIFICATION_BIND, src_dst, flags, bitmap_hi,
> -                           bitmap_lo);
> +    return ffa_simple_call(FFA_NOTIFICATION_BIND, src_dst, flags, bitmap_lo,
> +                           bitmap_hi);
> }
> 
> int ffa_handle_notification_unbind(struct cpu_user_regs *regs)
> @@ -61,8 +61,8 @@ int ffa_handle_notification_unbind(struct cpu_user_regs 
> *regs)
>      * We only support notifications from SP so no need to check the
>      * destination endpoint ID, the SPMC will take care of that for us.
>      */
> -    return  ffa_simple_call(FFA_NOTIFICATION_UNBIND, src_dst, 0, bitmap_hi,
> -                            bitmap_lo);
> +    return  ffa_simple_call(FFA_NOTIFICATION_UNBIND, src_dst, 0, bitmap_lo,
> +                            bitmap_hi);
> }
> 
> void ffa_handle_notification_info_get(struct cpu_user_regs *regs)
> -- 
> 2.43.0
> 




 


Rackspace

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